Repository navigation
fix: treat an empty machine.ami_id as the fallback, not a missing value - #490
Merged
Merged
Conversation
This check and #489 disagreed about what empty means. #489 makes an empty machine.ami_id resolve AWS's Deep Learning Base AMI for the deployment's region (data.aws_ami.default_client), which is the recommended way to run somewhere LabLink publishes no image. doctor still reported it as 'No machine.ami_id set' and failed — so the recommended configuration failed its own preflight. Empty now resolves the same image the deployment would, picking the newest to match most_recent, and reports which one: Client AMI PASS empty → ami-0d7a7be9ba394534e (Deep Learning Base ...) in eu-west-1 It fails only where AWS publishes no such image to fall back to, and warns rather than failing when the lookup itself cannot run. The filter is duplicated from the terraform with a comment saying so, because verifying a different image than the deployment uses would be worse than not checking. Also: a wrong-region AMI in a region with no published LabLink image now suggests clearing the field, which is the one-step fix, instead of only suggesting a copy-image job. Depends on #489 for the terraform side; merge this after 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
lablink doctorfails the configuration #489 recommends.#489 makes an empty
machine.ami_idresolve AWS's Deep Learning Base AMI for thedeployment's region (
data.aws_ami.default_client), which is how a lab runs somewhereLabLink publishes no image of its own. But
_check_ami, merged in #484, treats empty as amissing value:
I wrote both, and they disagreed. Empty is not a gap — it's a request.
What changes
Empty now resolves the same image the deployment would, picks the newest to match
most_recent, and reports it:suggesting the region's published LabLink image when there is one.
ec2:DescribeImages, network trouble. Unverified is not the same as wrong.The name filter is duplicated from the client terraform, with a comment saying so. That
duplication is deliberate: verifying a different image than the deployment resolves would
be worse than not checking at all, so the two have to be kept in step, and the comment is
where the next person finds that out.
(Ubuntu 24.04)stays pinned because 26.04 ispublished on the same dates — a new 26.04 appeared overnight while this was being written.
Second, smaller fix: a wrong-region AMI in a region with no published LabLink image now
suggests clearing the field, which is the one-step fix, rather than only suggesting an
aws ec2 copy-imagejob. That is the case a real operator hits:Testing
Four new cases: empty resolves the newest match (asserting the older candidate is not
chosen, so the sort is actually exercised), empty fails where nothing is published, empty
warns when unverifiable, and the wrong-region message names the one-step fix.
Related
introduces, so on its own it makes
doctoroptimistic about a config the allocator wouldstill reject.
_check_ami's EC2 verification.which is what left the client AMI as the only region-scoped value.