Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block merging PRs with test cases failures #1064

Merged
merged 32 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/pull_request_push_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
run: |
# run only test with databricks. run in 6 parallel jobs
pytest -n 6 --cov-report term-missing --cov=feathr_project/feathr feathr_project/test --cov-config=.github/workflows/.coveragerc_db

azure_synapse_test:
# might be a bit duplication to setup both the azure_synapse test and databricks test, but for now we will keep those to accelerate the test speed
runs-on: ubuntu-latest
Expand Down Expand Up @@ -263,7 +264,7 @@ jobs:
run: |
# skip cloud related tests
pytest --cov-report term-missing --cov=feathr_project/feathr/spark_provider feathr_project/test/test_local_spark_e2e.py --cov-config=.github/workflows/.coveragerc_local

registry_test:
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'registry test'))
Expand Down Expand Up @@ -296,10 +297,25 @@ jobs:
run: |
pytest --cov-report term-missing --cov=registry/sql-registry/registry --cov-config=registry/test/.coveragerc registry/test/test_sql_registry.py
pytest --cov-report term-missing --cov=registry/purview-registry/registry --cov-config=registry/test/.coveragerc registry/test/test_purview_registry.py


test_status:
runs-on: ubuntu-latest
if: always() && github.event_name == 'pull_request_target'
needs: [gradle_test, python_lint, databricks_test, azure_synapse_test, local_spark_test, registry_test]
steps:
- name: Test status failure
if: contains(needs.*.result, 'failure')
run: |
echo "Merging is blocked because one or more test jobs failed."
exit 1
- name: Test status success
if: ${{ !contains(needs.*.result, 'failure') }}
run: |
echo "All required CI test jobs passed."

failure_notification:
# If any failure, warning message will be sent
needs: [gradle_test, python_lint, databricks_test, azure_synapse_test, local_spark_test]
needs: [gradle_test, python_lint, databricks_test, azure_synapse_test, local_spark_test, registry_test]
runs-on: ubuntu-latest
if: failure() && github.event_name == 'schedule'
steps:
Expand All @@ -309,7 +325,7 @@ jobs:

notification:
# Final Daily Report with all job status
needs: [gradle_test, python_lint, databricks_test, azure_synapse_test, local_spark_test]
needs: [gradle_test, python_lint, databricks_test, azure_synapse_test, local_spark_test, registry_test]
runs-on: ubuntu-latest
if: always() && github.event_name == 'schedule'
steps:
Expand Down
4 changes: 2 additions & 2 deletions feathr_project/feathr/definition/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ def to_feature_config(self) -> str:
{% if source.mode is defined %}
mode: "{{source.mode}}"
{% endif %}
{% for option in source.options %}
{{option.key}}: "{{option.value}}"
{% for key,value in source.options.items() %}
"{{key}}":"{{value}}"
{% endfor %}
}
{% if source.event_timestamp_column %}
Expand Down