#4014 RFE: disable draft builds
Closed: Fixed by tkopecek. Opened by tkopecek.

Maybe easiest way is to propagate draft flag to build_rpm policy, so it can deny build before it starts.


Was there a user request?

Including the flag in the build policy seems entirely correct regardless and really is an oversight in the original PR. So we should do that regardless. Will file PR momentarily.

Metadata Update from @mikem:
- Custom field Size adjusted to None

If we wanted to go further, perhaps an 'EnableDraft' hub setting defaulting to True, similar to 'EnableMaven'. This would be checked:

  • in new_build, blocking any new draft imports
  • in import_build, blocking completion of any in-progress draft builds
  • in _direct_tag_build, blocking tagging (but not untagging)

So, this is functionally equivalent to setting strict draft block rules in the build policy and tag policy, but it's just one setting instead of a policy rule. Also there are ways to get around policy.

When denied, we should call reject_draft for consistency.
(other import pathways already deny it)

Note that we should not block untagging. It's possible that an admin might disable the feature but still have some existing draft builds that they might want to untag (and we wouldn't want the gc to fail on such either).

More just a note for me during discussion with @kevin on matrix. Question is if it can be disabled before Fedora agree on workflow/usage of this.

I think, that the #4015 is sufficient for now. If anyone will request more strict disabling, we can revisit it.

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.34.1

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

Metadata Update from @relias-redhat:
- Issue tagged with: testing-done

Commit dd128f86 relates to this ticket

Commit ecd5d960 relates to this ticket

Metadata Update from @tkopecek:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/4014

Please continue any further discussion there.

Metadata
Related Pull Requests