-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add variant support #2934
Add variant support #2934
Conversation
Alternative to #1459 |
/retest |
I can also rework this PR to move the script into COSA and store the RHEL version into a file instead. |
Alternative in #2936. |
I've reworked the logic here to be declarative instead of relying on a script while keeping some of the properties that we have right now. This introduces
|
Example setup in openshift/os#855 |
Example with SCOS: openshift/os#856 |
The main advantage of doing things this way is that we can have the internal CI always use the We can then switch the repo default to be SCOS and community contributors will get the CentOS Stream version by default. |
Hmm. Right, though I'm thinking we're trying to overload two things into one switch:
I'd agree that it could make sense to logically switch the default distro to centos stream. But, we can have pipelines which want to build RHCOS set a flag (something like I think we want the default major.minor version is better hardcoded in openshift/os, but we also want something like OTOH, hopefully in a year or so we won't care at all about (One thing I think we should also keep in mind here is...what if we switched fedora-coreos-config to not use git branches either? The lockfiles and CI there are oriented around it, but clearly this whole approach could work there too. It'd just be good to have the two work the same way. I'm not saying we should scope this in or block on it, but reiterating I think it would be a better end state to have the two work the same way) |
I definitely want to make progress here and not block on a perfect design...but OTOH the semantics we choose here have a lot of ramifications and will get tied into various pipelines and be something everyone needs to understand, so that motivates some level of design discussion. OTOH, I think we can change this later too without too much trouble, would just require some "ratcheting" across cosa and the pipelines. |
The UX with this one would be:
All RHCOS pipelines will thus use the rhcos one. All SCOS pipeline will use the scos one. Other test jobs can be more explicit. |
Note: CI is failing on an unrelated issue and is not testing that change currently. |
This is better than a script, though I don't like that it dirties the config dir. And more generally, that it retains state in the config dir at all. Ideally state would remain in the cosa workdir instead and the config dir remains wholly described by the git SHA like today, which is an important property. I like the variables idea from @cgwalters. I.e. we still have a single It needs some more fleshing out though, because there's also |
Anyway, short-term I'd still personally prefer the subdirs approach. The cosa patch for it is not that large. But I'm OK with this if we really want. Won't mention this again now because I don't want to block this! |
Though looking at this patch, I think we could enhance it slightly to avoid the few symlinks it does by keeping the variant active in e.g. |
But after this lands, note the system state won't be fully described by the git sha; imagine that one wants to do I think what we want is to have this information inside |
We've discussed that today and I'll update this PR to be closer to #1459 and what's in the comments above (recording the variant in the meta.json). |
d225e13
to
7d3a944
Compare
Matching RHCOS PR: openshift/os#958 |
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.
Awesome, thanks so much for persevering on this!
LGTM
I need to re-do testing with all variants |
Should we support Not a blocker of course. Good to do in a follow-up. |
Remove that support as: - we currently don't use this feature, - we chose another path for multiple version support in openshift/os as using subdirectories lead to a lot of additionnal complexity. See: openshift/os#803 This reverts commit 4781e46.
On top of the defaut variant, a config repo may include aditional optional variants. The variant used is selected at `cosa init` with the `--variant` option and the value is recorded locally in `src/config.json`. See: - openshift/os#852 - openshift/os#901 - openshift/os#958 Reworks: 480c239 init: Require specifying a config repository
88a25c1
to
1710928
Compare
Enable specifying osversions (rhel-8.6, rhel-9.0, c9s) to skip specifc tests in the kola denylist. We do not use the variant names here as they are not stable accross versions thus we require the version to be explicit.
Make sure that we record which variant was built.
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!
(Still planning to do a last round of testing but haven't had the time yet). |
I've tested that with 4 variants and it worked so far. Will merge on Monday to be able to do follow-up changes as needed. |
To make the logic simpler, we're carrying the variant <-> version logic with symlinks in this repo See COSA support in coreos/coreos-assembler#2934
To make the logic simpler, we're carrying the variant <-> version logic with symlinks in this repo See COSA support in coreos/coreos-assembler#2934
cmd-init: Remove support for subdirectory
Remove that support as:
using subdirectories lead to a lot of additionnal complexity.
See: openshift/os#803
This reverts commit 4781e46.
cmd-*: Support config repos with multiple variants
On top of the defaut variant, a config repo may include aditional
optional variants.
The variant used is selected at
cosa init
with the--variant
optionand the value is recorded locally in
src/config.json
.See:
Reworks: 480c239 init: Require specifying a config repository
kola: Add osversion (variant) support for denylist
Enable specifying osversions (rhel-8.6, rhel-9.0, c9s) to skip specifc
tests in the kola denylist.
We do not use the varaitn names here as they are not stable accross
versions thus we require the version to be explicit.
schema: Add coreos-assembler.config-variant
Make sure that we record which variant was built.
schema: make schema & make vendor for mantle