Skip to content

Support exclusive CD mode, disallow CD releases if there are no maintainers #3616

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

Merged
merged 9 commits into from
Nov 28, 2023

Conversation

daniel-beck
Copy link
Contributor

@daniel-beck daniel-beck commented Nov 14, 2023

Amends/reverts #3313. Obsoletes #3615.

Two major new features:

  1. Remove CD release permissions if there are no maintainers, obsoleting PRs like Block CD releases for plugins without maintainers #3313 or Block CD releases of jobConfigHistory as it has no maintainers #3615.
  2. Add support for exclusive CD. In this mode, we keep track of maintainers for governance purposes, but they don't get upload permissions.

The latter is required to support the former, as some core(ish) components and libraries have CD but no maintainers defined, and would get their CD permissions revoked. We could add maintainers, but they would then get permission to upload releases. In those cases, I just added the @core group to the maintainers list, as these appear to be generally collectively maintained, rather than by specific individuals (even though it might boil down to that in practice).

Testing

Based on comparing JSON output of PR builds, permissons etc. have no differences compared to master except it pre-empts #3615.

Happy to do a real run in the development involving Artifactory permissions if desired, but that's so annoying to set up I'd prefer to do that only if this otherwise looks reasonable. It's also easily reverted if things go wrong unexpectedly, IMO.

CC @NotMyFault @basil as most active recent contributors to the components I added @core for in case that does not reflect how you see their maintenance model.

on-hold: I'm going to be out for a few days and will be unable to amend if needed, so would prefer this not be merged until Nov 21.

@daniel-beck daniel-beck changed the title Disallow CD releases if there are no maintainers Support exclusive CD mode, disallow CD releases if there are no maintainers Nov 15, 2023
@NotMyFault
Copy link
Member

  1. sounds nice

@daniel-beck daniel-beck added the on-hold The issue/PR cannot proceed until the actor adding this label removes it label Nov 15, 2023
@daniel-beck daniel-beck marked this pull request as ready for review November 15, 2023 12:06
@daniel-beck daniel-beck requested a review from a team as a code owner November 15, 2023 12:06
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new exclusive.

I'm unsure on whether we should allow no maintainers and cd.enabled = true as I feel like it might cause a bit of confusion when it doesn't work and the docs don't seem to be clear that it's required.

I'm not blocking it though so I will approve it.

#cd:
# enabled: true
cd:
enabled: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't really seem valid to me, isn't it clearer if we error if there's no maintainers?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK to me; we are declaring that the plugin is set up for CD, should a maintainer appear in the future.

@daniel-beck
Copy link
Contributor Author

the docs don't seem to be clear that it's required

Good point, added in 5544c6d

this doesn't really seem valid to me, isn't it clearer if we error if there's no maintainers?

Unsure. Seems like it would be an additional barrier to adding/removing maintainers to fail if that's the case. I implemented what I thought makes sense but will defer to the folks handling hosting requests at the moment.

Copy link
Contributor

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we turn on exclusive mode for some plugins too? Feel free to do so for anything listed as CD-enabled and having only me (jglick) as a maintainer.

#cd:
# enabled: true
cd:
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK to me; we are declaring that the plugin is set up for CD, should a maintainer appear in the future.

@MarkEWaite
Copy link
Contributor

If you're willing to add plugins to be exclusive CD, I'd be happy to have the following plugins switch to exclusively CD:

  • basic-branch-build-strategies-plugin
  • elastic-axis-plugin
  • embeddable-build-status-plugin
  • implied-labels-plugin
  • markdown-formatter-plugin
  • platformlabeler-plugin
  • schedule-build-plugin
  • testng-plugin-plugin
  • xshell-plugin

@daniel-beck
Copy link
Contributor Author

Should we turn on exclusive mode for some plugins too?

I'd be happy to have the following plugins switch to exclusively CD

Feels more like a followup change to me; especially since the feature is already made use of (and thereby demonstrating it's not broken) to effectively keep existing behavior here.

@daniel-beck daniel-beck removed the on-hold The issue/PR cannot proceed until the actor adding this label removes it label Nov 27, 2023
@MarkEWaite
Copy link
Contributor

Feels more like a followup change to me; especially since the feature is already made use of (and thereby demonstrating it's not broken) to effectively keep existing behavior here.

That sounds great to me as well. I'm happy to submit that change myself after this has been merged.

@timja timja merged commit c21edbc into jenkins-infra:master Nov 28, 2023
@daniel-beck daniel-beck deleted the skip-cd-when-unmaintained branch November 28, 2023 09:11
@basil
Copy link
Contributor

basil commented Apr 8, 2024

Feels more like a followup change to me; especially since the feature is already made use of (and thereby demonstrating it's not broken) to effectively keep existing behavior here.

I have a slightly different perspective, which is that this PR implicitly kicked off a migration, which was never completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants