-
Notifications
You must be signed in to change notification settings - Fork 56
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 basic support for hotfix builds #740
Conversation
Still need to test all this! |
196c44e
to
4037de9
Compare
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'm not the biggest fan of the first commit I'm not sure the benefit is worth us losing the default list that shows up in the cases where a human is typing parameters in manually.
2nd commit LGTM
description: 'Space-separated list of additional target architectures', | ||
defaultValue: pipecfg.additional_arches.join(" "), | ||
description: 'Override default additional target architectures (space-separated)', | ||
defaultValue: "", |
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.
we've actually been using this (overriding the default) today. Right now the pipeline is configured to build for ppc64le
too but we tell ourselves when we go to make official builds to remove the ppc64le
from the list.
Now there will be no list to remove an item from, but rather an empty field. It's not a big deal but I kind of prefer the other UX.
IMO we should avoid humans typing parameters when possible. Ideally, all the information needed is in git in the pipecfg. Having parameters is still valuable of course when on-the-fly overriding is necessary. But then we should make that semantic really clear, which is what the patch aims to achieve. The relationship was already confusing before between the parameter and the pipecfg key, but with hotfix pipecfgs it becomes even more so. For the ppc64le situation right now in FCOS, my suggestion is to either support an |
I agree. Typing in things isn't ideal, but it is really nice for when you need it to have the default values there in front of you to edit. How about we compromise and still show the values (not sourced from the pipecfg) and then validate them after the hotfix pipecfg is processed? The following is just draft code but conveys the idea I think: diff --git a/jobs/build.Jenkinsfile b/jobs/build.Jenkinsfile
index 6108cac..26e48b9 100644
--- a/jobs/build.Jenkinsfile
+++ b/jobs/build.Jenkinsfile
@@ -24,7 +24,7 @@ properties([
trim: true),
string(name: 'ADDITIONAL_ARCHES',
description: 'Override default additional target architectures (space-separated)',
- defaultValue: "",
+ defaultValue: pipeutils.get_supported_additional_arches().join(' '),
trim: true),
booleanParam(name: 'FORCE',
defaultValue: false,
@@ -66,6 +66,13 @@ if (params.PIPECFG_HOTFIX_REPO || params.PIPECFG_HOTFIX_REF) {
def cosa_img = params.COREOS_ASSEMBLER_IMAGE
cosa_img = cosa_img ?: pipeutils.get_cosa_img(pipecfg, params.STREAM)
def additional_arches = params.ADDITIONAL_ARCHES.split()
+
+for (arch in additional_arches) {
+ if (!pipecfg.additional_arches.contains(arch)) {
+ error('requested architecture disallowed by pipecfg')
+ }
+}
+
additional_arches = additional_arches ?: pipecfg.additional_arches
def stream_info = pipecfg.streams[params.STREAM]
I think we should do that too. The |
I think with the suggestions above we get the best of both worlds (reached through collaboration and compromise). |
Hmm, in the case of a hotfix build for x86_64 only (or with stream-level knobs, any stream build where the arch set doesn't match the Jenkins set), that would require the operator to both edit Two suggestions:
WDYT? |
Yeah. Let's go with |
Updated! |
Follow-up for that in #747. |
We need to make clearer the distinction between the set of architectures that a Jenkins instance supports, and the set of architectures that a pipecfg wants to build for. This is usually the same, but not always. For example, a development stream may be temporarily unhealthy on some arches, or a hotfix pipecfg may want to limit the set of arches to build for. Let's have the semantics of `additional_arches` be similar to that of `cosa_img`: it's a config knob that can be overridden by a parameter. Accordingly, set the job parameter default to be empty (matching `COREOS_ASSEMBLER_IMAGE`). Notice how this cleans up the `build-cosa` job, which no longer needs to read in the pipecfg. This makes sense since it's not strictly part of the build pipeline. This also fixes a subtle issue with the way the arch-related params were wired. Their defaults were derived from the pipecfg, but those default values only actually affect the *next* run of the job. To be correct, we should've been using the definition from the pipecfg throughout the job, not the parameter.
ART needs the ability to perform hotfix builds, i.e. builds outside the regular stream for a specific purpose. These builds must not pollute production stream references. Support this via the new `hotfix` section of the pipecfg. Require a `name` subkey which is then used to modify the S3 subpath we upload to and the oscontainer tags we push to. Add new hotfix parameters to the `build`, `build-arch`, and `release` jobs which will be used to pass the repo containing the hotfix pipecfg. Don't support hotfix cloud uploads since it's not yet needed and requires plumbing of the hotfix prefix.
… description This way, an operator can tell what values are valid and easily copy/paste the list and edit it.
2eb5e82
to
cf8c63e
Compare
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
ART needs the ability to perform hotfix builds, i.e. builds outside the
regular stream for a specific purpose. These builds must not pollute
production stream references.
Support this via the new
hotfix
section of the pipecfg. Require aname
subkey which is then used to modify the S3 subpath we upload toand the oscontainer tags we push to. Add new hotfix parameters to the
build
,build-arch
, andrelease
jobs which will be used to pass therepo containing the hotfix pipecfg.
Don't support hotfix cloud uploads since it's not yet needed and
requires plumbing of the hotfix prefix.
Requires: #739