-
-
Notifications
You must be signed in to change notification settings - Fork 6
MVP improvements to automated archive runs #357
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 all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
7ca2750
Add validation failures to slackbot
e-belfer 13302d9
Fix skipping failed tests
e-belfer 9425dd5
Add format_message and reduce duplicated code
e-belfer 4cf7715
Merge branch 'main' into add-failures-to-slackbot
e-belfer 9610964
Test by running on some busted and non-busted archives
e-belfer bf58f1c
Fix issue in test run-archiver.yml
e-belfer 68c6edf
Shrink test and flatten validation test lists
e-belfer 83961e3
Update issue template, add template creation to workflow
e-belfer 60a76c5
Fix workflow format
e-belfer dd270b4
Fix link formatting
e-belfer a2cb688
Make slack validation failures more succinct
e-belfer f304b4e
Attempt to add dataset selection in manual run
e-belfer ce9158e
Try to fix inputs
e-belfer 7cb879a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3d31147
Try to fix matrix strategy
e-belfer 53c12d4
Try to fix matrix strategy
e-belfer 6242c47
Try to fix matrix strategy
e-belfer 8bbdf9c
Fix syntax
e-belfer 6094cb4
Test syntax and aditional quotes
e-belfer a7622b0
Remove epacems from large, try to get filtering to work
e-belfer ec4eea9
Add back large runner
e-belfer ad7464c
Remove epacems from default small runner list
e-belfer 5883670
Fix github issue creation
e-belfer 71bd627
Deal with foolish boolean formats
e-belfer 4bf7d5c
Appease the GHA formatting nightmare
e-belfer a1301a0
More playing around with github issue creation
e-belfer 4829753
Even more tooling with github issue creation
e-belfer 0d51e24
Just try everything
e-belfer 0e015c6
Try different tack for boolean
e-belfer 6fdd347
Try different tack for boolean
e-belfer 1fe8ba0
Try false instead of false
e-belfer f179acc
Handle skips and irrational GHA format requirements
e-belfer 02d0eb6
Make scheduled run workflow more explicit, remove redundant logs in i…
e-belfer 844ecc2
Workflow dispatch doesn't like env variables as input
e-belfer 140473c
Roll back env vars due to difficult GHA behavior
e-belfer 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
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 |
---|---|---|
|
@@ -3,6 +3,23 @@ name: run-archiver | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
small_runner: | ||
jdangerx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: 'Small runner: Comma-separated list of datasets to archive (e.g., "ferc2","ferc6").' | ||
# We can't pass env variables to the workflow_dispatch, so we manually list all small datasets here. | ||
default: '"eia176","eia191","eia757a","eia860","eia860m","eia861","eia923","eia930","eiaaeo","eiawater","eia_bulk_elec","epacamd_eia","ferc1","ferc2","ferc6","ferc60","ferc714","mshamines","nrelatb","phmsagas"' | ||
jdangerx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
required: true | ||
type: string | ||
large_runner: | ||
description: "Kick off large runners (for epacems)?" | ||
required: true | ||
default: false | ||
type: boolean | ||
create_github_issue: | ||
description: "Create a Github issue from this run?" | ||
default: false | ||
required: true | ||
type: boolean | ||
schedule: | ||
- cron: "21 8 1 * *" # 8:21 AM UTC, first of every month | ||
|
||
|
@@ -13,28 +30,8 @@ jobs: | |
shell: bash -l {0} | ||
strategy: | ||
matrix: | ||
dataset: | ||
- eia176 | ||
- eia191 | ||
- eia757a | ||
- eia860 | ||
- eia861 | ||
- eia860m | ||
- eia923 | ||
- eia930 | ||
- eiaaeo | ||
- eiawater | ||
- eia_bulk_elec | ||
- epacamd_eia | ||
- ferc1 | ||
- ferc2 | ||
- ferc6 | ||
- ferc60 | ||
- ferc714 | ||
- mshamines | ||
- nrelatb | ||
- phmsagas | ||
|
||
# Note that we can't pass global env variables to the matrix, so we manually reproduce the list of datasets here. | ||
dataset: ${{ fromJSON(format('[{0}]', inputs.small_runner || '"eia176","eia191","eia757a","eia860","eia860m","eia861","eia923","eia930","eiaaeo","eiawater","eia_bulk_elec","epacamd_eia","ferc1","ferc2","ferc6","ferc60","ferc714","mshamines","nrelatb","phmsagas"' )) }} | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -78,20 +75,20 @@ jobs: | |
path: ${{ matrix.dataset }}_run_summary.json | ||
|
||
archive-run-large: | ||
if: ${{ github.event_name == 'schedule' || inputs.large_runner }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
matrix: | ||
dataset: | ||
- epacems | ||
# Note that we can't pass global env variables to the matrix, so we manually list the datasets here. | ||
dataset: ${{ fromJSON(format('[{0}]', '"epacems"' )) }} | ||
jdangerx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fail-fast: false | ||
runs-on: | ||
group: large-runner-group | ||
labels: ubuntu-22.04-4core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Conda environment using mamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
|
@@ -160,3 +157,19 @@ jobs: | |
payload: ${{ steps.all_summaries.outputs.SLACK_PAYLOAD }} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.PUDL_DEPLOY_SLACK_TOKEN }} | ||
|
||
make-github-issue: | ||
if: ${{ always() && (github.event_name == 'schedule' || inputs.create_github_issue == true) }} | ||
runs-on: ubuntu-latest | ||
needs: | ||
- archive-run-small | ||
- archive-run-large | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Create an issue | ||
uses: JasonEtco/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
with: | ||
filename: .github/ISSUE_TEMPLATE/monthly-archive-update.md |
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.