-
Notifications
You must be signed in to change notification settings - Fork 1
Integrate daily pipeline health GitHub Action with Discord failure alerts #7
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e953088
update npm script name in README to correct one: buildExtension
7b07763
add discord alerter dependencies to requirements
41f672c
update README with info about discord alerter and GH action
d30eaf9
add test-pipelines.yml gh action workflow
efd0d9a
bump python version to 3.11
f0cbc26
include project root in python path so pipelines can fidn the utils m…
1490198
simplify workflow, remove @here pings, and only alert once even if al…
daad4c4
simplify README
45675b2
wrap robust_pipeline demo in try/except so it always exits 0 on expec…
4662a90
revert change to pipeline code, skip expected failure for robust_pipe…
3f2348c
remove discord integration -- not needed for pipelines
b4279c2
clean up requirements and README
9a5a70a
install aws s3 integrations in gh runner
d501746
Update requirements.txt
htahir1 957fb02
Update requirements.txt
htahir1 1a7b7a8
Update requirements.txt
htahir1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| name: Test Tutorial Pipelines | ||
|
|
||
| on: | ||
| schedule: | ||
| # Run daily at 9 AM UTC | ||
| - cron: "0 9 * * *" | ||
| push: | ||
| branches: [main, develop] | ||
| pull_request: | ||
| branches: [main, develop] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| test-pipelines: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| ZENML_ANALYTICS_OPT_IN: false | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install zenml[server] --upgrade | ||
| pip install -r requirements.txt | ||
|
|
||
| - name: Initialize ZenML | ||
| run: | | ||
| zenml init | ||
| zenml integration install aws s3 -y | ||
|
|
||
| - name: Run all tutorial pipelines | ||
| id: run_all | ||
| run: | | ||
| failed=() | ||
| for p in \ | ||
| "pipelines/helloWorld/hello_pipeline.py" \ | ||
| "pipelines/caching/cache_pipeline.py" \ | ||
| "pipelines/fanOut/fan_pipeline.py" \ | ||
| "pipelines/metadata/meta_pipeline.py" \ | ||
| "pipelines/parameters/param_pipeline.py" \ | ||
| "pipelines/retries/robust_pipeline.py" \ | ||
| "pipelines/stepIO/io_pipeline.py" \ | ||
| "pipelines/tagging/tagged_pipeline.py" \ | ||
| "pipelines/visualizations/viz_pipeline.py" \ | ||
| "pipelines/yamlConfig/yaml_pipeline.py"; do | ||
|
|
||
| echo "Running $p…" | ||
| if [[ "$p" == *"retries/robust_pipeline.py" ]]; then | ||
| PYTHONPATH=$GITHUB_WORKSPACE:$PYTHONPATH python "$p" || echo "⚠ robust_pipeline demo: failure expected" | ||
| else | ||
| PYTHONPATH=$GITHUB_WORKSPACE:$PYTHONPATH python "$p" || failed+=("$p") | ||
| fi | ||
| done | ||
|
|
||
| if [ "${#failed[@]}" -gt 0 ]; then | ||
| echo "Failed pipelines:" | ||
| printf " - %s\n" "${failed[@]}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| notify-discord: | ||
| needs: test-pipelines | ||
| if: ${{ failure() }} | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Send Discord notification on failure | ||
| uses: Ilshidur/action-discord@master | ||
| env: | ||
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_SRE }} | ||
| with: | ||
| args: | | ||
| **Pipeline Test Failure Alert** | ||
|
|
||
| Repository: ${{ github.repository }} | ||
| Branch: ${{ github.ref_name }} | ||
| Workflow: ${{ github.workflow }} | ||
| Run ID: ${{ github.run_id }} | ||
|
|
||
| One or more tutorial pipelines failed with the latest ZenML version. | ||
| Details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.