Fix check_deployments never deploying missing workflows - #1319
Open
mvdbeek wants to merge 1 commit into
Open
Conversation
The deploy job depends on the check job, but its `if` lacked always(), so it was skipped whenever check failed -- which is exactly when there is something to deploy. Since the check script exited 1 on finding missing deployments, the deploy job could only run when there was nothing to do. The script now reports through the has-missing output and exits 0 under Actions; --fail-on-missing, and running outside Actions, keep the old non-zero exit. A failing deploy job still turns the run red. Also: - release_exists treated any non-zero gh exit as a missing release, so a rate limit or network error looked like ~100 missing deployments. Only a genuine 404 counts as missing now; other errors are retried and then raised. - The deploy loop records per-repo failures and continues instead of aborting on the first one, then exits 1 with a summary, so one bad repository no longer strands the rest. - missing-repos is passed via the environment rather than interpolated into the shell script.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The
Check and fix missing deploymentsworkflow can never fix anything.The
deployjob depends oncheck, but itsiflackedalways(), so GitHub Actions skips it whenevercheckfails. Sincescripts/check_missing_deployments.pyexited 1 precisely when it found missing deployments,deploycould only ever run when there was nothing to deploy. The weekly scheduled run has been going red without redeploying anything.Most recent failing run: https://github.com/galaxyproject/iwc/actions/runs/29723072857 — 5 missing deployments out of 106 repos.
Changes
always()to the deploy job'sif, so it survives a failing check job.has-missingoutput and exits 0 under Actions.--fail-on-missing, and running outside Actions, keep the old non-zero exit.release_existstreated any non-zeroghexit as a missing release, so a rate limit or network error looked like ~100 missing deployments. Only a genuine 404 counts as missing now; other errors are retried 3x and then raised, failing the job loudly instead of triggering a mass redeploy.planemo-ci-action'smode: deploydoes|| exit 1per repo, so switching to it would reintroduce this.)missing-reposis passed via the environment rather than interpolated into the shell script.CI status semantics after this change
Verification
run:block and executed it against a stubplanemofailing for one of three repos: it deployed the other two and still exited 1.release_existsfor present / 404 / persistent 403 / transient-then-success.release_existsagainst the live API:amr_gene_detection v1.1.7-> True,v1.1.8-> False,repeatmasking v0.1-> False.flake8clean.Follow-up, not in this PR
The 5 workflows currently missing deployment need a decision before the deploy is dispatched, because this workflow deploys directly without a test gate:
gromacs-dctmdv0.1.7functional-annotation-of-sequencesv0.3amr_gene_detectionv1.1.8clinicalmp-verificationv0.2repeatmaskingv0.1wftest.ymlfailing 8 of last 8 runsSeparately:
workflows/enable_ci_workflows.pycalls/orgs/iwc-workflows/reposwithout pagination, so it only ever sees the first 30 of the org's 112 repos. Repos outside that first page are never re-enabled afterdisabled_inactivity—amr_gene_detectionandclinicalmp-verificationare both stuck disabled for this reason.