Commit 2ece734
authored
chore: standalone release jobs are always skipped (#1589)
The release workflow's three "standalone" jobs — publish the standalone
CLI to ADC, record the publishing timestamp in SSM, and publish the
toolkit-lib api-extractor model to S3 — were skipped on virtually every
release, including releases where `aws-cdk` and `@aws-cdk/toolkit-lib`
were actually published. For example, run
[26519804668](https://github.com/aws/aws-cdk-cli/actions/runs/26519804668)
published both `aws-cdk` and `toolkit-lib` to npm successfully and
created their GitHub releases, yet all three standalone jobs skipped.
The cause is GitHub's implicit success gate. When a job's `if` contains
no status-check function, GitHub evaluates an implicit `success()` over
the job's entire transitive `needs` graph, and a skipped job anywhere
upstream makes that gate `false` regardless of what the `if` expression
itself says. The package publish jobs survive skipped upstreams only
because they use `!cancelled() && !failure()`; the standalone jobs did
not. Since almost every release leaves at least one package
un-republished — its publish job is skipped because the version was
unchanged — the transitive gate was poisoned and the standalone jobs
were skipped even though their own publish job succeeded.
The fix adds `!cancelled()` so these jobs opt out of the implicit
transitive gate, and gates them explicitly on the result of the direct
npm publish job they care about (`needs.<pkg>_release_npm.result ==
'success'`). That preserves the original intent — only run once the
relevant package has actually been published — without being dragged
down by unrelated packages that were not part of this release. The
redundant `latest_commit == github.sha` check is dropped because a
successful publish of that job already implies it.
The condition is centralized in a new `runAfterPublish` helper in
`projenrc/util.ts` so the three jobs share a single definition.
Fixes #
### Checklist
- [ ] This change contains a major version upgrade for a dependency and
I confirm all breaking changes are addressed
- Release notes for the new version:
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license1 parent c23d53a commit 2ece734
5 files changed
Lines changed: 20 additions & 6 deletions
File tree
- .github/workflows
- projenrc
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments