feathr
feathr copied to clipboard
[FR] Use pytest custom markers to target platform specific tests
Willingness to contribute
Yes. I would be willing to contribute a fix for this bug with guidance from the Feathr community.
Feature Request Proposal
We may use custom markers such as "databricks", "synapse", "local" to specify target platform for platform-specific tests and run them for each github workflow.
Motivation
What is the use case for this feature?
Currently databricks and synapse test workflow run all the tests:
# under databricks_test section,
pytest -n 6 feathr_project/test/
# under azure_synapse_test section
pytest -n 6 feathr_project/test/
Details
We may define custom markers, add at pyproject.toml like:
[tool.pytest.ini_options]
markers = [
"databricks: test Databricks functions",
"synapse: test Azure Synapse functions",
"local :test Local Spark functions",
"integration: test e2e"
]
Use it at pytest files:
@pytest.mark.databricks
def test_databricks_some_functions(...) {...}
@pytest.mark.databricks
@pytest.mark.integration
def test_databricks_e2e(...) {...}
And run them at github workflow:
# For PR-triggered tests
pytest -n 6 feathr_project/test/ -m "databricks and not integration"
# For nightly tests
pytest -n 6 feathr_project/test/ -m "databricks"
What component(s) does this feature request affect?
- [ ]
Python Client
: This is the client users use to interact with most of our API. Mostly written in Python. - [ ]
Computation Engine
: The computation engine that execute the actual feature join and generation work. Mostly in Scala and Spark. - [ ]
Feature Registry API
: The frontend API layer supports SQL, Purview(Atlas) as storage. The API layer is in Python(FAST API) - [ ]
Feature Registry Web UI
: The Web UI for feature registry. Written in React