feat: implement v2 route format#9464
Draft
ahal wants to merge 1 commit intomozilla:masterfrom
Draft
Conversation
0ca2b37 to
a933950
Compare
Adds `trust_domain` and `project` fields to the Repository model. The v1 route format only has a top-level project in the route. This is fine for hg.mozilla.org where there's a 1:1 mapping of project to branch, but in Github it makes things awkward. E.g `mozilla/enterprise-firefox` is a project that has many branches all hooked up to Treeherder, as well as pull requests. To differentiate them we need to use routes like `<project>-<branch>`. This requires extra JSON-e logic in the .taskcluster.yml file and means we need to explicitly grant the Treeherder route scope on a case by case basis. Instead, this invents a v2 route format that handles our Github use cases better. It keys by trust_domain, project and branch rather than just project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1 route format only has a top-level project in the route. This is fine for hg.mozilla.org where there's a 1:1 mapping of project to branch, but in Github it makes things awkward.
E.g
mozilla/enterprise-firefoxis a project that has many branches all hooked up to Treeherder, as well as pull requests. To differentiate them we need to use routes like<project>-<branch>. This requires extra JSON-e logic in the .taskcluster.yml file and means we need to explicitly grant the Treeherder route scope on a case by case basis.Instead, this invents a v2 route format that handles our Github use cases better. It keys by trust_domain, project and branch rather than just project.