Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge #6993
Browse files Browse the repository at this point in the history
6993: Bug 1631834 - Allow action tasks to be executed r=MihaiTabara a=JohanLorenzo

Backports mozilla-mobile/reference-browser#1182, mozilla-mobile/fenix#10644 and mozilla-mobile/fenix#10650 to android-components



Co-authored-by: Johan Lorenzo <jlorenzo@mozilla.com>
  • Loading branch information
MozLando and JohanLorenzo committed May 18, 2020
2 parents ecdb3cf + 1d7408e commit a65403b
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tasks:
- $let:
taskgraph:
branch: taskgraph
revision: a8366f88fc8b35b284ad550358c89ec10133fb42
revision: cab4565345d0d0effa66f18fe91335dd6d744031
trustDomain: mobile
in:
$let:
Expand Down Expand Up @@ -113,6 +113,10 @@ tasks:
$if: 'tasks_for in ["github-push", "github-release", "action", "cron"] && repoUrl == "https://github.com/mozilla-mobile/android-components"'
then: '3'
else: '1'

short_head_branch:
$if: 'head_branch[:11] == "refs/heads/"'
then: {$eval: 'head_branch[11:]'}
in:
taskId: '${ownTaskId}'
taskGroupId:
Expand All @@ -137,7 +141,10 @@ tasks:
$if: 'tasks_for == "action"'
then:
name: "Action: ${action.title}"
description: '${action.description}'
description: |
${action.description}
Action triggered by clientID `${clientId}`
else:
name: "Decision Task for cron job ${cron.job_name}"
description: 'Created by a [cron task](https://firefox-ci-tc.services.mozilla.com/tasks/${cron.task_id})'
Expand All @@ -156,12 +163,22 @@ tasks:
then:
kind: cron-task
routes:
$flatten:
$flattenDeep:
- checks
- $if: 'level == "3"'
then:
- "tc-treeherder.v2.${project}.${head_sha}"
else: []
- tc-treeherder.v2.${project}.${head_sha}
- $if: 'tasks_for == "github-push"'
then:
- index.mobile.v2.${project}.branch.${short_head_branch}.latest.taskgraph.decision
- index.mobile.v2.${project}.branch.${short_head_branch}.revision.${head_sha}.taskgraph.decision
- index.mobile.v2.${project}.revision.${head_sha}.taskgraph.decision
- $if: 'tasks_for == "cron"'
then:
# cron context provides ${head_branch} as a short one
- index.mobile.v2.${project}.branch.${head_branch}.latest.taskgraph.decision-${cron.job_name}
- index.mobile.v2.${project}.branch.${head_branch}.revision.${head_sha}.taskgraph.decision-${cron.job_name}
- index.mobile.v2.${project}.branch.${head_branch}.revision.${head_sha}.taskgraph.cron.${ownTaskId}
scopes:
# `https://` is 8 characters so, ${repoUrl[8:]} is the repository without the protocol.
$if: 'tasks_for == "github-push"'
Expand Down Expand Up @@ -304,6 +321,7 @@ tasks:
taskGroupId: '${action.taskGroupId}'
taskId: {$eval: 'taskId'}
input: {$eval: 'input'}
clientId: {$eval: 'clientId'}
- $if: 'tasks_for == "cron"'
then:
cron: {$json: {$eval: 'cron'}}
Expand Down

1 comment on commit a65403b

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

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

Uh oh! Looks like an error! Details

Taskcluster-GitHub attempted to create a task for this event with the following scopes:

[
  "assume:repo:github.com/mozilla-mobile/android-components:branch:staging",
  "queue:route:checks",
  "queue:scheduler-id:taskcluster-github"
]

The expansion of these scopes is not sufficient to create the task, leading to the following:

Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:

queue:route:index.mobile.v2.android-components.revision.a65403b90eafdd613fed95148e4810a27327c683.taskgraph.decision

This request requires the client to satisfy the following scope expression:

{
  "AllOf": [
    "assume:repo:github.com/mozilla-mobile/android-components:branch:staging",
    "queue:route:checks",
    "queue:route:tc-treeherder.v2.android-components.a65403b90eafdd613fed95148e4810a27327c683",
    "queue:route:index.mobile.v2.android-components.branch.staging.latest.taskgraph.decision",
    "queue:route:index.mobile.v2.android-components.branch.staging.revision.a65403b90eafdd613fed95148e4810a27327c683.taskgraph.decision",
    "queue:route:index.mobile.v2.android-components.revision.a65403b90eafdd613fed95148e4810a27327c683.taskgraph.decision",
    "queue:scheduler-id:mobile-level-3",
    {
      "AnyOf": [
        "queue:create-task:highest:mobile-3/decision",
        "queue:create-task:very-high:mobile-3/decision",
        "queue:create-task:high:mobile-3/decision",
        "queue:create-task:medium:mobile-3/decision",
        "queue:create-task:low:mobile-3/decision",
        "queue:create-task:very-low:mobile-3/decision",
        "queue:create-task:lowest:mobile-3/decision"
      ]
    }
  ]
}

  • method: createTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2020-05-18T08:31:48.595Z

Please sign in to comment.