STAC-25590 Publish pre-release DEBs to the tooling bucket - #460
STAC-25590 Publish pre-release DEBs to the tooling bucket#460LouisParkin wants to merge 1 commit into
Conversation
|
Unblocked: terraform-infra #89 applied at 11:36 UTC — Two things verified before marking this ready:
Note for whoever validates the README URL: the bucket is ~2h old, so |
c9cbe0d to
b5adfdb
Compare
LouisLotter
left a comment
There was a problem hiding this comment.
Requesting changes for two issues:
- GitHub reports the head commit as unsigned. Repository policy requires every commit to be cryptographically signed; please amend and sign it. While amending, correct the dependency reference: terraform-infra #89 created and applied the tooling bucket, not #88.
- See the inline comment for the branch-install documentation gap.
| If you want to install a branch version use the test repository: | ||
|
|
||
| $ curl -o- https://stackstate-agent-3-test.s3.amazonaws.com/install.sh | STS_API_KEY="xxx" STS_URL="yyy" CODE_NAME="PR_NAME" bash | ||
| $ curl -o- https://sts-agent-prerelease.s3.amazonaws.com/install.sh | STS_API_KEY="xxx" STS_URL="yyy" CODE_NAME="PR_NAME" bash |
There was a problem hiding this comment.
This new URL does not preserve the branch-install contract described below. build-deb.yml only publishes pushes to stackstate-7.78.2, and publish_package.sh uses that ref as the APT codename, so the new bucket will never receive the documented master or STAC-xxxx codenames. The old dists/master/Release is live, while the new one is 404. Either migrate/continue publishing the supported codenames, retain the old endpoint for historical builds, or document that only the release branch is supported.
There was a problem hiding this comment.
Good catch, and it goes back further than this PR. dists/master/Release in the old bucket has Last-Modified: Mon, 23 Sep 2024 — the per-branch contract broke when publishing moved to Actions and became push-gated on the release branch, with publish_package.sh taking the codename from the ref. The old bucket kept serving two-year-old artifacts for those codenames, which is why the docs still looked correct.
Taken your third option: the README now documents release-branch-only and points at stackstate-agent-3-test for the historical codenames, which keeps working since this PR does not delete that bucket. Migrating the codenames would mean copying those stale builds into the new bucket, and the new bucket deliberately denies anonymous ListBucket — the old one returns 200 and enumerates every historical branch name.
Also added -fL to the curl one-liner so the regional 307 is followed rather than piped into bash.
The publish lane was denied s3:PutObject because stackstate-agent-3-test lives in the master account while the OIDC role lives in tooling, so the write crossed an account boundary. terraform-infra#89 creates a tooling-owned replacement, sts-agent-prerelease, rather than granting cross-account access to a bucket whose policy serves the public apt repository. S3 names are global, so the new bucket could not keep the old name. The yum and Windows repositories are deliberately left pointing at the master buckets: nothing in this lane publishes to them, and that is where their content is. install.sh therefore renders a deb URL in tooling and yum/Windows URLs in master until those buckets move too. The README described a per-branch install contract that this lane has not honoured since the move to GitHub Actions: the publish job is gated on pushes to the release branch and publish_package.sh takes the apt codename from the ref, so master and STAC-xxxx codenames stopped being produced. The old bucket still serves them from 2024, which masked the gap. Document what is actually published and point at the old bucket for the historical ones. The install fetch gains -fL so the pre-release bucket's regional 307 is followed rather than piped into bash. Depends on terraform-infra#89, which is applied. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b5adfdb to
511b635
Compare
|
All three points addressed in
|
The DEB publish lane assumes its OIDC role and signs the package, then gets denied
s3:PutObject.stackstate-agent-3-testlives in themasteraccount while the role lives intooling, so the write crosses an account boundary and would need a bucket policy the bucket does not have.StackVista/terraform-infra#89 creates a tooling-owned replacement,
sts-agent-prerelease, instead of granting cross-account access to a bucket whose existing policy is what serves the public apt repository. S3 names are global, so it could not keep the old name. It was applied on 17 Aug, so the bucket now exists.STS_AWS_TEST_BUCKET_YUMandSTS_AWS_TEST_BUCKET_WINdeliberately still point at themasterbuckets — nothing in this lane publishes to them, and that is where their content is.install.shtherefore renders a deb URL in tooling and yum/Windows URLs in master until those buckets move too.The README's per-branch install instructions are corrected to describe what the lane actually publishes. That contract broke at the GitLab-to-Actions port, not here: the publish job is gated on pushes to the release branch and
publish_package.shderives the apt codename from the ref, somasterandSTAC-xxxxcodenames stopped being produced.dists/master/Releasein the old bucket is unchanged since September 2024 — stale content that made the docs look correct.Validation
zizmorclean on the changed workflowSTAC-25590