-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
twoliter: allow partial lockfile validation in some scenarios #361
Conversation
5eefd51
to
8c37c49
Compare
Sorry for the churn. I have another TL interface change I'd like to make. I can save it for a subsequent PR, though. |
I disabled some additional, unnecessary artifact fetching. Some make targets needlessly requested workspace sources as an artifact of previously being part of the monorepo. I need to test that specific change a bit more before merging, though. |
@@ -1398,7 +1410,6 @@ pubsys \ | |||
# Rather than depend on "build", which currently rebuilds images each run, we | |||
# depend on publish-tools and check for the input file below to save time. | |||
# This does mean that `cargo make ami` must be run before `cargo make validate-ami`. | |||
dependencies = ["fetch-sources"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we can get rid of most of these 'Rather than depend on "build"' comments now, since these tasks don't depend on "publish-tools" or anything else.
twoliter/src/cmd/make.rs
Outdated
// | ||
// `twoliter make` targets in the following list will skip kit validation IFF they also explicitly | ||
// list their SDK dependency in Twoliter.toml. | ||
const SKIP_KIT_VALIDATION_TARGETS: &[&str] = &["repack-variant", "repo", "fetch-sdk"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we would want to list all of the repo, AMI, ssm, and OVA operations in this list:
- repo
- validate-repo
- check-repo-expirations
- refresh-repo
- ami
- ami-public
- ami-private
- grant-ami
- revoke-ami
- validate-ami
- ssm
- promote-ssm
- validate-ssm
Optionally:
- upload-ova
- vmware-template
Unsure:
- all the test related tasks
- all the clean related tasks
I know allowlists are preferred over denylists, but we only really need kit validation to occur in the places where we're building something - build-package
, build-variant
, and build-all
. So it might be better to just enforce it there?
90fce5b
to
1921801
Compare
Commenting so that GitHub will provide a useful comparison view. |
1921801
to
90fce5b
Compare
^ addresses feedback from @bcressey |
LGTM! 👍 |
90fce5b
to
f6aabae
Compare
Force push to remove erroneous |
f6aabae
to
fbb866f
Compare
|
fbb866f
to
98728ac
Compare
^ rebase (without changes) on to develop |
The build-kit tests significantly balloon twoliter's test time. This marks them with `#[ignore]`, which will have them run on `make integ` or `make build`, but not on `cargo test`.
98728ac
to
3680a75
Compare
^ make changes to work with #357 |
3680a75
to
4703ab6
Compare
^ force push because I missed |
In some CI scenarios, it's useful to drop previously-built variant images into a Twoliter project's build directory and use Twoliter to publish those variant images. In these cases, Kit dependencies are not necessary, and it can be useful to avoid resolving them and comparing them against Twoliter.lock. This change allows skipping Kit lockfile verification only when executing certain `twoliter make` targets.
Switches to a builder-style mechanism for disabling metadata fetching. Since Rust doesn't have named args, it can be hard to know what boolean function flags do at a callsite without going to the function signature.
Many cargo-make targets were fetching sources as an artifact from when publication tools were built as part of the bottlerocket monorepo. Now that Twoliter builds bundles these publication tools, we have need to fetch project sources.
Description of changes:
Testing done:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.