Closed Bug 1590512 Opened 6 years ago Closed 6 years ago

Tasks triggered via Github should have branch and PR metadata

Categories

(Firefox Build System :: Task Configuration, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: armenzg, Unassigned)

References

Details

This is to make android-components PRs work on Treeherder.
We would need to make it be generic to help supports any other repo in the future rather than mobile.
I will be filing a bunch of bugs like this in the future; who has the bandwidth to tackle them?

For instance, this PR generated this decision task and this other task.

The decision task has some notion of being related to a PR (e.g. "tasks_for": "github-pull-request",), however, the other task does not have a clue (even though I can derive it using MOBILE related env values)

You can see some of my hacks in here and notice that I include -prs to the route.

Flags: needinfo?(jlund)

https://hg.mozilla.org/ci/taskgraph-try/rev/80c66cf1b8a5196848e954c51b717604b90ee29b is a little bit of hack-ish code I implemented to test this, and we'll need the adjust the scopes to grant this route.

(Once this is deployed everywhere, we should also remove the scopes for PRs on the main route)

We may also want to think about including a -try variant for pushing to the -try branch, particularly for enabling perfherder for those.

tom, is this something you can put on your plate once you get a handle on tc ff-ci cluster migration?

Flags: needinfo?(jlund) → needinfo?(mozilla)
Summary: Tasks triggered via a Github push should have info to determine so → Tasks triggered via a Github should have branch and PR metadata
Summary: Tasks triggered via a Github should have branch and PR metadata → Tasks triggered via Github should have branch and PR metadata

The metadata that would be sufficient for me would look like this:

For PRs:

  "version_contol": {
      "BASE_REPOSITORY": "https://github.com/mozilla-mobile/android-components",
      "HEAD_REPOSITORY": "https://github.com/sblatz/android-components",
      "HEAD_REF": "download-updates",
      "HEAD_REV": "ccd1101f1416b16a2e57cb69e0c2649876728775",
      "PULL_REQUEST_NUMBER": "4759"
  },

For non-PR related pushes (no need for PULL_REQUEST_NUMBER):

  "version_contol": {
      "BASE_REPOSITORY": "https://github.com/mozilla-mobile/android-components",
      "HEAD_REPOSITORY": "https://github.com/mozilla-mobile/android-components",
      "HEAD_REF": "master",
      "HEAD_REV": "ccd1101f1416b16a2e57cb69e0c2649876728775",
  },

Would a more correct value for HEAD_REF be refs/heads/master?

For hg pushes, we use metadata added to task.extra to describe the push. I'd expect the same thing could happen here: treeherder defines some structure that it expects to see in task.extra, and then it is up to participating projects to produce that data (rather than the Taskcluster platform itself).

Agreed.
Is this still the right component?
Or should I file bugs like this on each of the participating projects?

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(mozilla)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.