-
Notifications
You must be signed in to change notification settings - Fork 26
[ART-4931] Rebase Dockerfiles according to release schedule #659
Conversation
Build #1
|
Build #2
|
Build #3
|
# Conflicts: # doozerlib/distgit.py
Build #5
|
Build #6
|
Build #7
|
Build #8
|
Build #9
|
Build #10
|
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
Build #11
|
New changes are detected. LGTM label has been removed. |
Build #12
|
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.
one nit, otherwise LGTM and let's roll!
elif self.runtime.group_config.canonical_builders_from_upstream == 'on': | ||
return True | ||
elif self.runtime.group_config.canonical_builders_from_upstream == 'off': | ||
return False |
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.
hmm... did you check these still worked? :)
IIRC "on" and "off" get translated into bool equivalents, unless you quote them.
I'd be fine with replacing the rest of this with
elif self.runtime.group_config.canonical_builders_from_upstream == 'on': | |
return True | |
elif self.runtime.group_config.canonical_builders_from_upstream == 'off': | |
return False | |
else: | |
return bool(self.runtime.group_config.canonical_builders_from_upstream) |
(let the validator complain if we enter something bogus)
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.
>>> bool('on')
True
>>> bool('off')
True
Ref. ART-4931
In #646, we introduced the
canonical_builders_from_upstream
flag that controls the way we rebase Dockerfiles.With this PR, the flag is turned into a parameter that can (and normally should) be set to 'auto': when this happens, Doozer will clone https://gitlab.cee.redhat.com/ocp-release-schedule/schedule/-/tree/master/ and check the feature freeze date for the relevant OCP version. If we are before feature freeze, it will try to match upstream; otherwise, it will override upstream builders according to ART configuration.
The ReleaseSchedule class is responsible for cloning and parsing the schedule repo. I've decided to make it a Singleton, since we do not want to clone the repo more times than needed (just once), and we currently just want to do it when running
doozer images:rebase
(hence not suitable for being initialized with the runtime). Using the Singleton pattern, we can safely typeReleaseSchedule(runtime)
as many times as we want without worrying about checking if we already did clone.