Consider allowing draft builds for ELN #13374
Labels
No labels
after freeze
automation
backlog
blocked
change-ack
change-nak
change-noreleng
changes
Closed As
Can't Fix
Closed As
Duplicate
Closed As
Fixed
Closed As
Fixed with Explanation
Closed As
Get back later
Closed As
Grooming
Closed As
Insufficient data
Closed As
Invalid
Closed As
It's all good
Closed As
taiga
Closed As
upstream
day-to-day
dev
docs
easyfix
epel
f26
f27
f28
f29
f30
f31
f32
f33
f34
f35
f36
f37
f38
f39
f40
f41
f42
f43
f44
f45
fedora
groomed
high-gain
high-trouble
in-progress
in-review
investigation
legal
low-gain
low-trouble
mass rebuild
medium-gain
medium-trouble
meeting
mini-initiative
new_artifact
ops
pdc_retirement
rawhide
RCA
review
script
sidetarget
sprint-0
sprint-1
sprint-2
sprint-3
sprint-4
sprint-5
unfrozen
waiting on external
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
releng/tickets#13374
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the issue
In ELN, we have a double-side-tag process for creating a Bodhi update for each batch of ELN builds. Essentially, we create a first side-tag, tag all of the Rawhide builds into that buildroot, build the ELN packages, and then finally tag the successes into a new side-tag which is used to submit the Bodhi update (so we don't accidentally tag any of the Rawhide builds into ELN).
When I asked about Draft Builds today in #fedora-releng, @kevin told me "yes, you can do them today... however we have a policy that says "never allow any of these to be tagged into any tag" because there's no policy around using them."
What I'd like to be able to do is have the ELN builds in the first side-tag be built as draft builds and then "promote" them to full builds to tag them into the second side-tag for Bodhi update connection. The reason for this is that right now, ELNBuildSync does not have a great solution for resuming after a crash. I have been working on recording information in the database and logic that will let us resume from the middle of the process, but it's actually quite difficult to get right. Today I had the idea that we might actually not need to be able to fully resume, but instead could maybe just restart... so long as the NVRs haven't already been used up. So if we could perform all of our builds as Draft Builds and then only turn them into a real build that consumes the NVR right as we are submitting them to Bodhi, that would mean that on a crash, we could just start a fresh batch and not have to worry about some of the builds already having completed.
Can we use this ticket to discuss and work out a policy that would be acceptable for this (limited) use-case?
When do you need this? (YYYY/MM/DD)
The sooner, the better, but no strict deadline.
When is this no longer needed or useful? (YYYY/MM/DD)
N/A
If we cannot complete this, what is the impact? [Dependencies/Blocker]
See the description above.
Checklist
I don't have any problem discussing this here/coming up with a plan, but whatever is proposed likely should get fesco approval.
(Since this is different from all the rest of our stuff).
It would need at least adjustments to garbage collection (how long do we keep them for), what tag(s) we allow them to be tagged into (although we would need to test and see if 'promoted' draft builds match a draft build policy, or if they are only regular builds then), and probibly other things I am not thinking of yet. ;)
@kevin wrote in #13374 (comment):
Seems reasonable. Do you want me to file a Change Proposal for this?
I can't really think of any situation where we'd need to have a draft build for more than a week. If they weren't promoted to a proper build in that time, it should be safe to assume that it was created and then ELNBuildSync crashed, in which case it would have been rebuilt and this draft abandoned.
Presumably they have to be capable of getting tagged somehow today at least as the result of the build target they're built in, no? But at least in the case of ELNBuildSync, we would only need them to be tagged into side-tags derived from the
eln-buildtag. We'd need to be able to promote them within that side-tag and then submit that side-tag as a Bodhi update.Sure, nothing ever goes exactly as planned.
@sgallagh wrote in #13374 (comment):
Naw. I don't think it needs that... Changes are tied to fedora releases and this is eln and seems more... outside that.
So, I'm trying to see where draft builds help. Couldn't you just on resume after a crash do the builds that are pending again and if they were successfull you catch the 'build already exists' from koji ?
It's very likely I am not thinking of all the places it could crash tho.
"Build already exists" isn't an actual response we can get from a task, so far as I know. It would mean that for every task that fails, we also need to query Koji for the logs to see if the task_failed.log happens to have "Build already exists" in its output.
Beyond that, we don't actually know if that specific NVR already exists because it was built as part of the interrupted batch (and thus would need to be part of the Bodhi update) or already exists because the build in the current batch is genuinely trying to reuse an NVR that's already taken. With a draft build, it will fail with "build already exists" if the NVR is already taken and just ignore an earlier draft build if one occurred.
If we default to assuming that "build already exists" means that the NVR was taken prior to this batch, then we'll miss updates because we won't add them to Bodhi at the conclusion of this batch.
If we default to assuming "build already exists" means that the NVR was built in an earlier attempt at this current batch, we risk that if it WAS already taken, the Bodhi update including a reused build will fail and all of the packages in the batch won't get pushed to stable, causing us to miss even more updates.
As far as a policy, I believe we only need the
eln-buildsyncuser (and probably@sysadmin-eln) to have privileges for promotion/tagging. As far as tagging, we would need privilege to tag a draft build into a side tag (if permissions permit sufficient granularity, that could be restricted to side-tags derived from eln-build) and to promote a draft build in such a side tag into a full build.I think a good policy in general would also be to disallow tagging of draft builds into any "release" tag. Manipulation of draft builds should be kept in side-tags and maybe purpose-built target tags in the future.
@kevin wrote in #13374 (comment):
We have been using draft builds as part of the CentOS Stream/RHEL gating pipeline for 2 years now, so we have some experience to draw on.
The key thing we try to avoid at all costs is having draft builds show up in "release" tags. This is done by setting the hub policy to only allow draft builds in "draft" tags, and side-tags. A build must be promoted within the draft/side-tag before the policy will allow it to be re-tagged. In addition, only one bot user is allowed to tag these builds into *-candidate tags. Even CI maintainers like us cannot do it, it is heavily locked down.
We also verify that the commit used to make the draft build has been merged into the MR target branch before we promote it, i.e. we insist that the commit is in dist-git. This prevents the possibility of draft builds being promoted from MR branches and making it into composes/releases while the source commit is not in dist-git, which would be very bad. This is not a problem for the proposed use case here as we are working exclusively with commits already merged, but it is something to think about for the future if you want to allow a draft build MR workflow in Fedora.
I don't recall off the top of my head what the garbage collection policy is for draft builds but one exists. I suggested a feature at one point that the promotion process could find all the un-promoted drafts for that NVR and GC them, as they have no future as the NVR was consumed, but I don't know if it was ever implemented.
For the record, I am not on the teams that take care of the hub policies so I cannot provide more detail on how it works behind the scenes - we are consumers. :-) I can of course put you in contact with the people who did implement it if you want to know more.
fesco/tickets#3621 was approved.
I'm sorry, there was confusion in the ticket, and it is not formally approved.
take two:
With that approval, I'd like to request that the staging and production environments be set to allow the tagging of draft builds into tags that match the glob
eln-build-side-*, please.Untested, but should just be: