Repository navigation
feat(aws): add Region and LaunchTime to LaunchResult (#351) - #352
Merged
Merged
Conversation
LaunchResult exposed InstanceID/Name/PublicIP/PrivateIP/AZ/State/KeyName but neither the region the instance landed in nor a launch timestamp. A library consumer measuring launch->terminate cost windows (calque) had to timestamp with its own wall-clock and thread the region separately. Add Region (from the resolved LaunchConfig.Region — RunInstances doesn't echo it back) and LaunchTime (server-authoritative, from instance.LaunchTime; zero if the API omits it). Both populated in newLaunchResult and in the cohort job-array re-derive path. Purely additive. Closes #351 (LaunchResult portion; container primitive tracked separately).
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Addresses the
LaunchResultportion of #351 (filed from calque, consuming spawn as a library).What
aws.LaunchResultgains two fields:Region string— the region the instance launched into (from the resolvedLaunchConfig.Region;RunInstancesdoesn't echo it back).LaunchTime time.Time— server-authoritative launch timestamp frominstance.LaunchTime; zero if the API omits it.Why
LaunchResultwasInstanceID/Name/PublicIP/PrivateIP/AvailabilityZone/State/KeyName— no region, no timestamp. A library consumer measuring launch→terminate cost windows (calque's "rectangle-seconds") had to timestamp with its own wall-clock and carry the region separately. Both are cheap to surface authoritatively.Changes
pkg/aws/client.go: struct +newLaunchResult(readsinstance.LaunchTime, takesregionthreaded from the call site).cmd/launch_jobarray.go: the cohort re-derive path populates both fromInstanceInfo.launchresult_test.goasserts the zero-LaunchTime/region case and the populated case.Purely additive — no existing field changed.
make checkgreen.Not in this PR
The other #351 ask — a headless
pkg-level container-run primitive (DCV-freedocker runof an ECR image ref) — is larger and tracked as a separate issue (linked on #351). This PR is just theLaunchResultfields.