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

Add SL as codeowners for snaps-owned controllers #3924

Closed
wants to merge 2 commits into from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Feb 15, 2024

Explanation

Whenever the version of a package in this monorepo is bumped, all dependencies on that package in other workspace packages are also bumped. This happens frequently in release PRs.

The Snaps team is listed as codeowners of permission-controller, notification-controller, and rate-limit-controller, so when any changes to these packages occur in a PR, the Snaps team must approve that PR. This means that if a dependency on a package is bumped in any of these controllers within a release PR, then the Snaps team must approve that release — even if none of those controllers are included in the release. This creates an obstacle to creating releases quickly.

To fix this, this commit adds the Shared Libraries team as codeowners of these controllers as well. This way, they can ask the Snaps team to approve only if it is necessary.

Changelog

(N/A)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

Whenever the version of a package in this monorepo is bumped, all
dependencies on that package in other workspace packages are also
bumped. This happens frequently in release PRs.

The Snaps team is listed as codeowners of `permission-controller`,
`notification-controller`, and `rate-limit-controller`, so when any
changes to these packages occur in a PR, the Snaps team must approve
that PR. This means that if a dependency on a package is bumped in any
of these controllers within a release PR, then the Snaps team must
approve that release — even if none of those controllers are included in
the release. This creates an obstacle to creating releases quickly.

To fix this, this commit adds the Shared Libraries team as codeowners of
these controllers as well. This way, they can ask the Snaps team to
approve only if it is necessary.
@mcmire mcmire requested a review from a team as a code owner February 15, 2024 21:15
MajorLift
MajorLift previously approved these changes Feb 15, 2024
@MajorLift MajorLift requested a review from a team February 15, 2024 21:23
/packages/permission-controller @MetaMask/snaps-devs
/packages/notification-controller @MetaMask/snaps-devs
/packages/rate-limit-controller @MetaMask/snaps-devs
* @MetaMask/engineering
Copy link
Member

Choose a reason for hiding this comment

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

I'd recommend using this instead:

Suggested change
* @MetaMask/engineering
* @MetaMask/extension-devs @MetaMask/mobile-devs @MetaMask/shared-libraries

Generally we avoid referencing the entire engineering group in codeowner rules to avoid pinging the entire organization for each PR review.

The closed equivalent to the purpose of the old devs team is: shared libraries, mobile platform, and extension platform. But we don't have teams yet for the client platforms (AFAIK), so the [client]-devs teams will have to do for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I didn't know we'd changed that policy. Should we update the module template?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also I think there are two teams for Shared Libraries: @MetaMask/shared-libraries and @MetaMask/shared-libraries-engineers. Which one should we use?

Copy link
Member

Choose a reason for hiding this comment

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

Ah right; probably shared-libraries-engineers then

And yes, updating the module template would be great as well!

Copy link
Contributor Author

@mcmire mcmire Feb 15, 2024

Choose a reason for hiding this comment

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

Okay, this PR updated here: 68654dd

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, feels like this would be a significant reduction in permissions for engineers working on controllers that aren't in one of the client teams (we have multiple engineers like this in snaps).

Copy link
Member

@FrederikBolding FrederikBolding left a comment

Choose a reason for hiding this comment

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

I think this warrants more discussion. Blocking until then.

@Mrtenz
Copy link
Member

Mrtenz commented Feb 16, 2024

I feel like this defeats the purpose of us being codeowner. If the main obstacle is dependency changes, maybe add the shared libraries team to just the package.json?

@FrederikBolding
Copy link
Member

I feel like this defeats the purpose of us being codeowner. If the main obstacle is dependency changes, maybe add the shared libraries team to just the package.json?

I'm a little bit fuzzy on the reasoning for not using workspace:^ versions in this repo. Is the upside large enough that it is worth having to consider changes like this?

I will also pose the question though, have we been holding back releases by not reviewing these fast enough? I feel like we've been pretty consistent in keeping up with reviews where we are needed, but willing to be convinced otherwise.

If we have and speed is a necessity here, I would agree with Maartens suggestion. But I will also mention that we have had mistakes being made in the past by exclusively changing package.json (for example flip-flopping between devDeps and deps 😅).

@mcmire
Copy link
Contributor Author

mcmire commented Feb 22, 2024

I'm a little bit fuzzy on the reasoning for not using workspace:^ versions in this repo. Is the upside large enough that it is worth having to consider changes like this?

Using workspace:^ versions made it impossible for clients to test changes locally, because Yarn does not resolve these versions when using yarn link. This error is demonstrated here: #1623. Switching to static versions solved this problem.

I will also pose the question though, have we been holding back releases by not reviewing these fast enough? I feel like we've been pretty consistent in keeping up with reviews where we are needed, but willing to be convinced otherwise.

No — y'all have been doing a good job of responding so far, but I know it is always late over there and so if there is a chance that we have to get a release out more quickly than usual then I was trying to give us a way to work around it in case of you were offline.

That said, I agree that perhaps adjusting the codeowners is not the right approach here. It is not the end of the world if we have to wait an extra day for an approval anyway. And if that does indeed end up becoming an issue maybe there is another approach we can take, such as limiting to certain files. I'll close this, then.

@mcmire mcmire closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants