Repository navigation
Give spored's provenance S3 client the instance's region, and never lose an output to a provenance failure (#1094) - #1096
Merged
Conversation
…ose an output to a provenance failure (#1094)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merged
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.
Fixes #1094
On v0.132.0, every task output upload failed on a real instance with
Invalid region, so outputs were lost and the run was reported asoutput_delivery_error. The live test that found it is in #1094.provAWSConfig, which addsconfig.WithEC2IMDSRegion(). That is the same optionpkg/agent/queue_runner.goalready uses.spored provenance uploadfails for any reason, the wrapper uploads with plainaws s3 cp, untagged. Untagged means kept.Gates: each fails against a revert that compiles.
TestProvAWSConfigTakesTheRegionFromIMDS: a fake IMDS serving the identity document, with AWS_REGION, AWS_DEFAULT_REGION, the profile and both config files cleared. Reverted to plainLoadDefaultConfig(ctx), it gets region"".TestProvenanceSubcommandsUseProvAWSConfig: an AST check that no subcommand callsLoadDefaultConfigdirectly, and that all three use the helper.TestWrapperFallsBackWhenTheProvenanceUploadFails: the wrapper run under bash with a fake spored whose upload exits 1. Without the fallback, the test reports the output lost andstate=failed retry_class=output_delivery_error.Local checks:
go vet ./..., the full short suite, all 9 nested modules, staticcheck (GOOS=linux) and semgrep all pass.Ships as v0.132.1, a PATCH that also carries #1092.