chore(cli): bump pinned lablink-template to v0.3.1 - #498
Merged
Conversation
Updates TEMPLATE_VERSION and TEMPLATE_SHA256 (SHA-256 of the v0.3.1 source tarball, verified through get_tofu_files()'s real download path). v0.3.1 replaces the hardcoded allocator AMI with a per-region SSM lookup (data.aws_ssm_parameter.allocator_ami), so deploy credentials now need ssm:GetParameter on /aws/service/canonical/*. The least-privilege policy documented in docs/aws-setup.md did not grant it, which would have failed `tofu plan` for anyone following that section; the statement is added there. No CLI code change is needed: main.tf still declares region, deployment_name and environment, and the CLI's config schema has no `db` sub-keys, so the release's strict-`db` requirement does not affect it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
7174Andy
added a commit
that referenced
this pull request
Sep 8, 2026
Release prep. publish-pip.yml's version guardrail rejects a tag whose version does not match pyproject.toml, so the bumps land on main before the release tags are cut. Allocator and client stay in lockstep at 0.4.0 as they have since 0.1.0; the CLI is versioned independently and goes to 0.3.0. The CLI's allocator pin is raised to >=0.4.0 this time: the CLI re-exports MachineConfig, whose ami_id default became empty (= resolve the per-region Deep Learning Base AMI, #489) in allocator 0.4.0. An older allocator would silently reintroduce the stale hardcoded us-west-2 AMI default that doctor's #490 fallback logic assumes gone. CHANGELOG (CLI): new 0.3.0 section (#484, #485, #490, #491, #498), and a backfilled 0.2.0 section — #481 tagged 0.2.0 without adding one (#467, #472, #474, #479). Also: README Docker <version> example moved to 0.4.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7174Andy
added a commit
that referenced
this pull request
Sep 8, 2026
Release prep. publish-pip.yml's version guardrail rejects a tag whose version does not match pyproject.toml, so the bumps land on main before the release tags are cut. Allocator and client stay in lockstep at 0.4.0 as they have since 0.1.0; the CLI is versioned independently and goes to 0.3.0. The CLI's allocator pin is raised to >=0.4.0 this time: the CLI re-exports MachineConfig, whose ami_id default became empty (= resolve the per-region Deep Learning Base AMI, #489) in allocator 0.4.0. An older allocator would silently reintroduce the stale hardcoded us-west-2 AMI default that doctor's #490 fallback logic assumes gone. CHANGELOG (CLI): new 0.3.0 section (#484, #485, #490, #491, #498), and a backfilled 0.2.0 section — #481 tagged 0.2.0 without adding one (#467, #472, #474, #479). Also: README Docker <version> example moved to 0.4.0. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
TEMPLATE_VERSION+TEMPLATE_SHA256).ssm:GetParameterpermission that v0.3.1 now requires to the least-privilege policy indocs/aws-setup.md— without it,tofu planfails for anyone following that section.Changes Made
packages/cli/src/lablink_cli/__init__.pyTEMPLATE_VERSION:v0.3.0→v0.3.1TEMPLATE_SHA256:97f2f96c7bbdcaeeec8bd681394883409357613bbe40f97115a7a974d61a7660docs/aws-setup.mdAllocatorAmiLookupstatement in the Option B custom policy:ssm:GetParameteronarn:aws:ssm:*::parameter/aws/service/canonical/*, plus an SSM row in the service table.packages/cli/CHANGELOG.md[Unreleased] → Changedentry noting theapp.regionfix, the stock-Ubuntu-via-SSM allocator boot, the new IAM requirement, and that existingus-west-2resources are not moved when a config names another region.Why the docs change belongs here
v0.3.1 drops the hardcoded allocator AMI in favor of
The template's own
scripts/setup.shattachesssm:GetParameterto the CI OIDC role, but CLI users deploy with their own credentials. The custom policy indocs/aws-setup.mdhad no SSM statement, so this bump would have broken every deploy that follows the least-privilege path. The managed-policy option (Option A) is unaffected —AmazonEC2FullAccessdoes not cover SSM either, but that path is already documented as intentionally broad; the fix targets the policy the docs actually enumerate.Testing
Computed the tarball SHA-256 twice from
https://github.com/talmolab/lablink-template/archive/refs/tags/v0.3.1.tar.gz— stable across both fetches.Cleared
~/.lablink/cache/terraform/v0.3.1and ran the real code path:Checksum verification passes and all 21 template files extract (
main.tf,alb.tf,backend*.hcl,user_data.sh,config/*.yaml).PYTHONPATH=src uv run pytestinpackages/cli: 829 passed, 1 deselected.ruff checkclean on the changed file.Compatibility audit (why no CLI code changed)
Two items in v0.3.1's "Upgrading" notes looked like they could reach the CLI; neither does:
db:block must bepassword:only (#64, #65)dbsub-keys at all, so generated configs already satisfy the strict schema.app.regionnow drives the deployment (#70)main.tfstill declaresregion,deployment_nameandenvironment, sodeploy.py's-var=calls remain valid.AMI_MAP's comment inschema.pyalready documented the SSM-based allocator boot.The
dev-uses-S3-state change (#63) only affects the template's owndevenvironment, which the CLI does not expose.