Skip to content
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

Bug 1907217: remove * branch from RelEng github repositories and maple #18

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

bhearsum
Copy link
Contributor

Stage one of the plan written out in the bug.

This should be quite safe. For Maple, all of the scopes that branch:* has are already granted by branch:default.

For GitHub we have some differences, but as far as I can tell, only where the explicit branches have more scopes than branch:* due to grants such as

fxci-config/grants.yml

Lines 1185 to 1200 in 944ea85

# - balrog specific roles
- grant:
- secrets:get:repo:github.com/mozilla-releng/balrog:coveralls
to:
- project:
alias: balrog
job: [pull-request:*, branch:main]
- grant:
- queue:route:index.project.balrog.*
- queue:route:notify.*
- secrets:get:repo:github.com/mozilla-releng/balrog:dockerhub
to:
- project:
alias: balrog
job: [branch:main]
.

Original revision/discussion in https://phabricator.services.mozilla.com/D216239

ci-admin diff for this is in https://gist.github.com/bhearsum/61df6555dea05bebb9c12b491d6259ce

@bhearsum bhearsum requested a review from a team as a code owner July 11, 2024 15:38
projects.yml Show resolved Hide resolved
@bhearsum bhearsum marked this pull request as draft July 12, 2024 12:46
@bhearsum bhearsum force-pushed the remove-star-branch-phase-1 branch from f7480ce to e7835b9 Compare July 16, 2024 17:35
@bhearsum bhearsum marked this pull request as ready for review July 16, 2024 17:38
@bhearsum bhearsum requested a review from jcristau July 16, 2024 17:38
@bhearsum
Copy link
Contributor Author

Failure is just an intermittent that is being fixed in #30

projects.yml Outdated
Comment on lines 1151 to 1152
- name: "*"
level: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

For the staging / level 1 repos, we may actually want to remove the main/master branch and keep just *?
AFAIK using the default branch is only necessary when we want to change actions, but for everything else using other branches is probably better (less chance of collision)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, I think that's probably reasonable. If we're doing that, we should probably keep a level 1 * branch in level 3 repos as well (I keep going back and forth on whether or not that's a good idea...but I don't think it does any harm).

AFAIK using the default branch is only necessary when we want to change actions, but for everything else using other branches is probably better (less chance of collision)?

Can you clarify what you mean by "less chance of collision"? I'm not sure I see how it connects to the rest of the comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this applies to the same extent to other repos, where there's only a couple of branches we care about and the rest are pretty much only used for PRs, which get their own graphs.

For the staging repos though the entire point is to make arbitrary changes without going through PRs. I think of those a bit like try, where each push is basically its own mercurial head, and branch names are irrelevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're exclusively talking about staging repos, yeah, I agree those are different. If we're talking about non-staging level 1 repos as well (of which there are many that aren't staging), I'm not sure I see those as any different from level 3 repos.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking about the staging repos specifically, yes. Sorry for the confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh sure - yes. Let's do that.

bhearsum added 2 commits July 17, 2024 10:22
…ry` r?#releng-reviewers!

Stage one of the plan written out in the bug.

This _should_ be quite safe. For Maple, all of the scopes that `branch:*` has are already granted by `branch:default`.

For GitHub we have some differences, but as far as I can tell, only where the explicit branches have more scopes than `branch:*` due to grants such as https://github.com/mozilla-releng/fxci-config/blob/944ea85da779ab430e932f9829f1f02bb11ee11c/grants.yml#L1185-L1200.

Original revision/discussion in https://phabricator.services.mozilla.com/D216239
@bhearsum bhearsum force-pushed the remove-star-branch-phase-1 branch from e7835b9 to 80713fd Compare July 17, 2024 14:22
@bhearsum bhearsum requested a review from jcristau July 17, 2024 14:23
Copy link
Contributor

@jcristau jcristau left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@bhearsum bhearsum merged commit 930be23 into mozilla-releng:main Jul 17, 2024
11 checks passed
bhearsum added a commit to bhearsum/fxci-config that referenced this pull request Jul 30, 2024
This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in mozilla-releng#18.
bhearsum added a commit to bhearsum/fxci-config that referenced this pull request Jul 30, 2024
This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in mozilla-releng#18.
bhearsum added a commit to bhearsum/fxci-config that referenced this pull request Aug 1, 2024
This also adds branches to a couple of repositories where I noticed we were missing one that the build on.

This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in mozilla-releng#18.
bhearsum added a commit to bhearsum/fxci-config that referenced this pull request Aug 2, 2024
This also adds branches to a couple of repositories where I noticed we were missing one that the build on.

This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in mozilla-releng#18.
bhearsum added a commit to bhearsum/fxci-config that referenced this pull request Aug 13, 2024
This also adds branches to a couple of repositories where I noticed we were missing one that the build on.

This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in mozilla-releng#18.
bhearsum added a commit to bhearsum/fxci-config that referenced this pull request Aug 14, 2024
This also adds branches to a couple of repositories where I noticed we were missing one that the build on.

This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in mozilla-releng#18.
bhearsum added a commit that referenced this pull request Aug 14, 2024
#46)

This also adds branches to a couple of repositories where I noticed we were missing one that the build on.

This depends on a handful of PRs to these repos:
mozilla-mobile/reference-browser#2982
mozilla-mobile/firefox-ios#21357
mozilla/code-review#2289
mozilla/code-coverage#2408
mozilla/translations#777

After this change, the only Github repositories with `*` branches will be `staging` repositories, as was discussed in #18.
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.

3 participants