-
Notifications
You must be signed in to change notification settings - Fork 170
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
tag: new command to manipulate tagging #243
Conversation
Nice! Only skimmed this so far but looks very good. Will have more of a chance to dig in next week. |
Did you consider the "git path"? We may have only talked about that internally though hmm. |
I'm not sure I recall that discussion or what the "git path" is in this context... |
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.
Some example invocations as a comment at the top of the file would be useful.
So, the code itself looks sane to me, just had some high-level structuring comments. Though I do wonder about
Basically, it's becoming clearer that the output of coreos-assembler is most useful towards the "buildmaster" stream, and so promotion/smoketest processes need to slurp up the relevant artifacts and put it somewhere else, right? In that sense, I'm not sure if tag management really belongs at the coreos-assembler layer rather than whatever higher level handles promotions. |
Ahh right, there's #203 tracking this. Let's discuss there. |
Why do you say that? This approach seems OK to me. (The reason I was arguing for potentially using git is when one needs to delete data, having git becomes a lot more useful. But that's for GC - representing tags inline as is done here versus actually making them git tags is more of a tossup I feel) |
Ahh OK. To me, those feel pretty connected. One example: how would we tag a build which has already been pruned? E.g. if extended validation of a build takes longer than it takes for the build to be flushed out of Vs. snapshotting all the build metadata in a git repo and doing tagging there directly. Don't necessarily mean using |
At least for RHCOS I don't forsee us pruning anywhere near that aggressively. Pruning would be like "more than two weeks old" or even more. The default pruning in c-a I think is more for the local dev case. Storage is cheap. |
Yeah, I'm not so much concerned about storage space either but just at the conceptual level:
Anyway, not strongly opposed to this patch. We can always revisit later if we hit any pains. |
With @jlebon's suggestion of using subparsers, I reworked almost all of the code. So there are a lot of changes compared to the previous version, but I think it is ultimately cleaner and easier to maintain/understand. ⬆️ |
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.
I like list & dict comprehensions 😄
New commit with more list/dict comprehension ⬆️ |
So I was thinking about this some more in the context of the FCOS pipeline and I think the part that was missing for me was that And now I see that #184 does mention this as well. So I think this is good, but maybe let's drop the |
I didn't interpret the part about enhancing the pruning as an implicit requirement, but I'm fine to drop the |
The `tag` command allows the user to list, create, delete, and update tags in the `builds.json` metadata.
New commit with even more feedback addressed! ⬆️ |
I played with this locally and it seems to work well. Next step is definitely though to teach |
Will leave a bit of time for others to comment, if there are no other ones let's merge this in a few hours? |
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
Done in #245! |
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.
LGTM
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
That was fast! 🐎 ⚡ |
OK, merging this! Great job @miabbott putting up with all reviews & tweaks & bikesheds. 🎊 |
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
Appreciate all the feedback! |
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
Follow-up to coreos#243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
Follow-up to #243. Become aware of tags and make sure not to prune builds that are tagged. I went the path of making tagged builds *not* counting towards the `--keep=N` limit since that felt the most natural to me. One tricky bit is the OSTree repo pruning. The CLI is not really geared towards this kind of pruning since we now could have older (tagged) commits that we care about while some newer commits on that same branch we don't care about. For now, I just swapped it to use `--keep-younger-than`. Though this does align well with another improvement I'd like to make to `prune` to learn timestamp-based pruning instead.
The
build-tag
command allows the user to list, create, delete, andupdate tags in the
builds.json
metadata.