Conversation
|
Woah, that's a lot of commits.
Awesome! 👍 Can we start with splitting this out into some prep PRs with fewer changes? (Roughly keeping the "new features" here, and splitting out the "cleanups", both loosely defined :) ). |
|
Definitely agree on splitting out a prep cleanup PR first, looks like you already have things split up nicely! One other big topic is...before this, See also #823 which introduced some notion of "local state" vs "remote state" into cosa. I wonder if what we really want is |
|
Love the direction this is heading. One thing I'll mention is that we need a way to indicate that some builds should never be pruned; i.e. official releases. Maybe needs changes to Doesn't (and probably shouldn't) have to be fully implemented here, but something to keep in mind. |
Agree, the defaults are to keep all builds and remove just unreferenced builds (stored in S3, but not found in builds.json). Perhaps its worth splitting this into a dedicated subcommand instead? |
We can also use tags for that. The prune logic already saves those. Also slightly leaning towards a new command for this, though no strong opinion either way. |
3864f6f to
2706252
Compare
Prune won't remove tagged builds
Implemented this - |
08eb5b3 to
aff4b07
Compare
One thing to keep in mind (doesn't/shouldn't be done in this PR) is that we also need "unreferenced tagged resource" pruning for e.g. AMIs. |
aeba046 to
8ed89a1
Compare
|
All issues fixed, PTAL |
jlebon
left a comment
There was a problem hiding this comment.
Just one comment, otherwise LGTM! Can you rebase, drop the debugging bits, and clean up the commit history?
.cci.jenkinsfile
Outdated
| cosa_cmd("fetch") | ||
| cosa_cmd("build") | ||
| cosa_cmd("kola run") | ||
| //cosa_cmd("kola run") |
.cci.jenkinsfile
Outdated
| // cosa_cmd("buildextend-openstack") | ||
| // cosa_cmd("buildextend-vmware") | ||
| // cosa_cmd("compress") | ||
| // cosa_cmd("buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix") |
There was a problem hiding this comment.
Also need to uncomment this before we merge.
| #!/usr/bin/python3 -u | ||
|
|
||
| ''' | ||
| This script removes previous builds. DO NOT USE on production pipelines |
There was a problem hiding this comment.
Mmmm. I think it's a bit more nuanced than that. For RHCOS we can prune bootimages not pinned by the installer, for example.
But...this gets to an interesting topic. I've been thinking we should explicitly copy/promote bootimages we want to pin to a separate "stream". But anyways, just noting this.
There was a problem hiding this comment.
Prune won't touch "tagged" builds - seems this field should be updated with pinned images used in installer
631adbc to
c6fcef4
Compare
|
Are we happy with test results? I'm going to drop prune debug commit and squash into a series of commits |
c6fcef4 to
1a3fb5d
Compare
4da4bc0 to
db277a5
Compare
jlebon
left a comment
There was a problem hiding this comment.
Can we squash the commits down? How about just two:
- one that reworks
cmd-prune+ auxiliary - one that introduces
cmd-remote-prune
db277a5 to
2b351b0
Compare
jlebon
left a comment
There was a problem hiding this comment.
Cool, this looks good to me. Thanks a lot for working on this! There are a few extraneous lines that need to be cleaned up, but not going to block on it.
Will leave it open for a bit for folks to have a chance to have a final look.
|
Just offhand, a few follow-up steps I see for
|
* Split "insert_build" helper out of cmd-prune * Rework cmd-prune in python * Add prune tests
This subcommand cleans up unreferenced builds on remote location. Currently only s3 buckets are implemented
2b351b0 to
ccec60d
Compare
This PR reworks
coreos-assembler pruneand adds new commands:bump_timestampused during the build to update builds.json timestampcleanup-bucketto remove unreferenced builds in the bucketpruneis now python and removes old builds from build.json (this won't be started during build procedure)TODO:
Removed--skip-pruneoption breaks RHCOS pipeline