Skip to content

ci(release): honor codegen_cs_version override only on dry runs#37

Merged
peaceful-bot merged 1 commit into
mainfrom
ci/codegen-cs-version-dry-run-guard
Jul 21, 2026
Merged

ci(release): honor codegen_cs_version override only on dry runs#37
peaceful-bot merged 1 commit into
mainfrom
ci/codegen-cs-version-dry-run-guard

Conversation

@monsieurleberre

Copy link
Copy Markdown
Contributor

Pre-open

  • pre-open review completed — findings addressed locally or explicitly deferred below

Skipped the multi-agent pre-open fan-out: the diff is a single conditional shell line in one CI workflow. Verified manually instead — actionlint .github/workflows/release.yaml is clean (exit 0, no findings) and both logic branches were walked through (see Testing).

Summary

Hardens the resolve job in the tag-triggered release orchestrator (added in #36). The codegen_cs_version input is documented as dry-run-only, but the previously-flagged behavior applied any override unconditionally. This forces the resolved codegen-cs version back to the release VERSION on every non-dry run, so a live release can never pick up a stale or wrong codegen-cs image override. Harmless on the real tag-push path today (no override is passed there); this is defense-in-depth.

Changes

  • .github/workflows/release.yaml, resolve job: after CGV is resolved from the input, add [ "$DRY" = "true" ] || CGV="${VERSION}" so a non-dry run always uses VERSION regardless of any codegen_cs_version override.

Testing

  • actionlint .github/workflows/release.yaml → exit 0, no findings. Repo-wide actionlint reports only the pre-existing SC2129 style warning in the untouched build-oci-codegen-cs.yaml (not introduced here).
  • Logic walk-through:
    • dry_run=true[ "$DRY" = "true" ] is true, the || short-circuits, CGV keeps the input override (or its VERSION fallback when no override was passed).
    • dry_run=false[ "$DRY" = "true" ] is false, so CGV is reassigned to ${VERSION} even when an override was supplied.

The resolve job documented codegen_cs_version as dry_run-only but applied any override unconditionally. Force CGV back to VERSION on non-dry runs so a live release can never pick up a stale codegen-cs image override.
@github-actions

Copy link
Copy Markdown
Contributor

Scala coverage

Code Coverage

Package Line Rate Branch Rate Health
studio.peaceful.daml.codegen.helper 97% 95%
Summary 97% (642 / 663) 95% (145 / 152)

@github-actions

Copy link
Copy Markdown
Contributor

C# coverage

Code Coverage

Package Line Rate Branch Rate Complexity Health
Daml.Codegen.CSharp 98% 97% 1195
Daml.Codegen.CSharp.Cli 100% 100% 3
Daml.Codegen.Testing.Conformance 78% 98% 73
Daml.Ledger.Abstractions 73% 89% 21
Daml.Ledger.Abstractions.Testing.Conformance 59% 50% 16
Daml.Runtime 94% 84% 538
Summary 96% (4136 / 4330) 93% (1623 / 1743) 1846

@github-actions

Copy link
Copy Markdown
Contributor

C# build matrix

shard result duration
macos-amd64 ✅ success 1m 02s
macos-arm64 ✅ success 1m 06s
ubuntu-amd64 ✅ success 1m 10s
ubuntu-arm64 ✅ success 1m 03s
windows-amd64 ✅ success 1m 43s
windows-arm64 ✅ success 1m 59s

@github-actions

Copy link
Copy Markdown
Contributor

Scala build matrix

shard result duration
macos-amd64 ✅ success 1m 56s
macos-arm64 ✅ success 1m 08s
ubuntu-amd64 ✅ success 56s
ubuntu-arm64 ✅ success 1m 01s
windows-amd64 ✅ success 1m 39s

@peaceful-bot
peaceful-bot merged commit 691ffb3 into main Jul 21, 2026
24 checks passed
@peaceful-bot
peaceful-bot deleted the ci/codegen-cs-version-dry-run-guard branch July 21, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants