fix(ci): repair invalid expressions breaking ci.yml and docker.yml on every push to main - #986
Open
Junirezz wants to merge 1 commit into
Open
Conversation
… every push to main
Both .github/workflows/ci.yml and .github/workflows/docker.yml have
been failing on every single push to main since at least July 25
(verified across 15+ merge commits) -- not because any job's steps
actually failed, but because both workflow files contain invalid
GitHub Actions expressions that GitHub rejects before scheduling any
jobs at all (confirmed via the GitHub API: both failing runs show
zero jobs and zero billable minutes -- a startup-level rejection, not
a runtime failure).
### ci.yml
Every job (node-ci, sdk, frontend, rust-ci) used the `runner` context
inside a job-level `env:` block:
env:
COMMAND_LOG_DIR: ${{ runner.temp }}/bridge-watch-command-logs/node-ci
The `runner` context is not available at job-level env -- it only
becomes available once a runner has actually been provisioned (i.e.
inside step-level env/run), which is exactly why GitHub rejects the
whole workflow file before any job can start.
Fix: removed these two vars from job-level env in all four jobs, and
instead compute them in each job's existing "Initialize command log
archive" step (already the first step in every job) using the
shell-native $RUNNER_TEMP variable, exporting them via $GITHUB_ENV so
every subsequent step in the job still sees them exactly as before.
### docker.yml
tags: ${{ id.meta.outputs.tags }}
labels: ${{ id.meta.outputs.labels }}
`id` is not a valid expression context. The step in question has
`id: meta`, so its outputs live under the `steps` context.
Fix: `id.meta.outputs.*` -> `steps.meta.outputs.*`.
### Verification (actually run, not assumed)
- Installed actionlint (a GitHub-Actions-schema-aware linter, not just
generic YAML validation) via its official release binary and ran it
against both fixed files: zero errors on either.
- Re-ran actionlint against every workflow file currently in
.github/workflows/ as a full sweep to confirm nothing else in this
class of bug exists repo-wide; the only remaining findings are
pre-existing, unrelated, info/style-level shellcheck nits in three
already-passing workflows (code-quality.yml, release.yml,
release-dry-run.yml, load-testing.yml), which I left untouched since
they're out of scope for this fix and those workflows aren't failing.
- Confirmed via the GitHub REST API (workflow run history, per-job
breakdown, check-suites) that these two files' failures are
independent of any recently merged PR -- every merge to main since
July 25 shows the identical zero-job failure signature, including
merges that long predate this PR.
### Other currently-red workflows on main -- NOT touched here, and NOT fixable by a code PR
While auditing every workflow's latest status on main, I found three
more that are currently failing, but for reasons outside what any
code change can fix:
- db-backup.yml: depends on real POSTGRES_*/AWS_* secrets. Its
"Run backup" step is the failure point, consistent with those
secrets being unset or pointing at infrastructure this project
doesn't actually have configured -- a secrets/ops decision for a
repo admin, not a workflow bug.
- dependency-update.yml: both jobs get through every step and fail
specifically at "Create Pull Request" (peter-evans/create-pull-request@v6).
That is the textbook signature of the repository's "Allow GitHub
Actions to create and approve pull requests" setting being
disabled -- a Settings toggle only a repo admin can change, not
something in the YAML. Two pre-existing branches
(chore/npm-dependency-updates, chore/cargo-dependency-updates)
already exist and may also be blocking re-creation.
- deploy.yml: triggers via `workflow_run: ["Docker Build & Push"]`,
i.e. it's chained off docker.yml. Since docker.yml has been failing
its startup check, deploy.yml has simply never fired since -- once
this PR lands, it should start running again. Its last real failure
(March) predates that and is most likely a GitHub Environment
approval-gate issue, since the "Deploy to Production" step is
literally just a placeholder `echo`, not real deployment logic.
Contributor
|
Please fix the failing checks. |
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.
Closes #931
What's broken
Both
.github/workflows/ci.ymland.github/workflows/docker.ymlhave been failing on every single push to main since at least July 25 -- verified across 15+ merge commits. Not because a job's steps actually failed, but because both files contain invalid GitHub Actions expressions that GitHub rejects before scheduling any jobs at all. Confirmed via the GitHub API: both failing runs showjobs: []and zero billable minutes -- a startup-level rejection, not a runtime failure.ci.ymlEvery job (
node-ci,sdk,frontend,rust-ci) used therunnercontext inside a job-levelenv:block:The
runnercontext isn't available at job-levelenv:-- it only becomes available once a runner has actually been provisioned (i.e. inside step-levelenv:/run:), which is exactly why GitHub rejects the whole workflow file before any job can start.Fix: removed these two vars from job-level
env:in all four jobs, and instead compute them inside each job's existing "Initialize command log archive" step (already the first step in every job) using the shell-native$RUNNER_TEMPvariable, exporting them via$GITHUB_ENVso every later step in the job sees them exactly as before.docker.ymlidisn't a valid expression context. The step isid: meta, so its outputs live understeps.Fix:
id.meta.outputs.*->steps.meta.outputs.*.Verification (actually run, not assumed)
.github/workflows/as a full sweep, to confirm nothing else in this class of bug exists repo-wide. The only remaining findings are pre-existing, unrelated, info/style-level shellcheck nits in three already-passing workflows (code-quality.yml,release.yml,release-dry-run.yml,load-testing.yml), which I left untouched -- out of scope, and those workflows aren't failing.mainsince July 25 shows the identical zero-job failure signature, including merges that long predate this PR.Other currently-red workflows on main -- not touched here, and not fixable by a code PR
While auditing every workflow's latest status on
main, I found three more that are currently failing, but for reasons no code change can fix:db-backup.yml-- depends on realPOSTGRES_*/AWS_*secrets. Its "Run backup" step is the failure point, consistent with those secrets being unset or pointing at infrastructure this project doesn't actually have configured. A secrets/ops decision for a repo admin, not a workflow bug.dependency-update.yml-- both jobs get through every step and fail specifically at "Create Pull Request" (peter-evans/create-pull-request@v6). That's the textbook signature of the repository's "Allow GitHub Actions to create and approve pull requests" setting being disabled -- a Settings toggle only a repo admin can change, not something in the YAML. Two pre-existing branches (chore/npm-dependency-updates,chore/cargo-dependency-updates) already exist and may also be blocking re-creation.deploy.yml-- triggers viaworkflow_run: ["Docker Build & Push"], i.e. it's chained offdocker.yml. Sincedocker.ymlhas been failing its startup check,deploy.ymlhas simply never fired since -- once this PR lands, it should start running again. Its last real failure (March) predates that and is most likely a GitHub Environment approval-gate issue, since the "Deploy to Production" step is literally just a placeholderecho, not real deployment logic.Happy to take a pass at any of those three if you can confirm whether the relevant secrets/settings are meant to be configured, or whether this project doesn't have that infrastructure in the first place.