Skip to content

Commit

Permalink
Make sure tokens used in build_targes.py are valid tag characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Barker committed May 11, 2019
1 parent 91af207 commit d6d0fac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/taskcluster/build_targets.py
Expand Up @@ -6,7 +6,7 @@
This script configures which APKs are built using the options passed in
from the taskcluster {{ event.version }}.
{{ event.version }} should be in the form: <tag name>:[all,release,debug]+<platform name>:[arm,arm64,x86]
{{ event.version }} should be in the form: <tag name>=[all,release,debug]+<platform name>=[arm,arm64,x86]
Some examples of {{ event.version }} and the resultant output from this script.
This is the default behaviour with no options. Only the Release build of each
Expand All @@ -15,19 +15,19 @@
assembleWavevrArmRelease assembleNoapiArmRelease assembleNoapiArm64Release assembleNoapiX86Release assembleSvrArmRelease assembleSvrArm64Release assembleOculusvrArmRelease assembleOculusvrArm64Release assembleGooglevrArmRelease assembleGooglevrArm64Release
Specifies only build the Arm64 version of the OculusVR platform:
$ python build_targets.py 1.1.4b+oculusvr:arm64
$ python build_targets.py 1.1.4b+oculusvr=arm64
assembleOculusvrArm64Release
Specifies all build types including Release and Debug:
$ python build_targets.py 1.1.4c:all
$ python build_targets.py 1.1.4c=all
assembleWavevrArm assembleNoapiArm assembleNoapiArm64 assembleNoapiX86 assembleSvrArm assembleSvrArm64 assembleOculusvrArm assembleOculusvrArm64 assembleGooglevrArm assembleGooglevrArm64
Specifies Release builds of Arm64 OculusVR, Arm WaveVR, and x86 NoAPI:
$ python build_targets.py 1.1.4d+oculusvr:arm64+wavevr:arm+noapi:x86
$ python build_targets.py 1.1.4d+oculusvr=arm64+wavevr=arm+noapi=x86
assembleOculusvrArm64Release assembleWavevrArmRelease assembleNoapiX86Release
Specifies Release and Debug builds of Arm64 OculusVR, Arm WaveVR, and x86 NoAPI:
$ python build_targets.py 1.1.4e:all+oculusvr:arm64+wavevr:arm+noapi:x86
$ python build_targets.py 1.1.4e=all+oculusvr=arm64+wavevr=arm+noapi=x86
assembleOculusvrArm64 assembleWavevrArm assembleNoapiX86
"""
import sys
Expand All @@ -41,7 +41,7 @@
}

def findMode(arg):
values = arg.split(':')
values = arg.split('=')
if len(values) > 1:
mode = values[1].lower()
if mode == 'r' or mode == 'release':
Expand Down Expand Up @@ -70,10 +70,10 @@ def main(name, argv):
size = len(targets)
if size == 1:
for value in platforms.keys():
targets.append(value + ':all')
targets.append(value + '=all')
command = []
for item in targets[1:]:
itemList = item.split(':')
itemList = item.split('=')
if itemList[0] not in platforms:
print >> sys.stderr, 'Error: "%s" is not a supported platform' % itemList[0]
continue
Expand Down

1 comment on commit d6d0fac

@community-tc-integration
Copy link

Choose a reason for hiding this comment

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

Submitting the task to Taskcluster failed. Details

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

[
  "assume:repo:github.com/MozillaReality/FirefoxReality:release",
  "queue:route:statuses",
  "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:

{
  "AllOf": [
    "secrets:get:project/firefoxreality/github-deploy-key",
    "secrets:get:project/firefoxreality/release-signing-token",
    "secrets:get:project/firefoxreality/symbols-token",
    {
      "AnyOf": [
        "queue:create-task:highest:unknown/unknown",
        "queue:create-task:very-high:unknown/unknown",
        "queue:create-task:high:unknown/unknown",
        "queue:create-task:medium:unknown/unknown",
        "queue:create-task:low:unknown/unknown",
        "queue:create-task:very-low:unknown/unknown",
        "queue:create-task:lowest:unknown/unknown"
      ]
    }
  ]
}

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

{
  "AllOf": [
    "secrets:get:project/firefoxreality/github-deploy-key",
    "secrets:get:project/firefoxreality/release-signing-token",
    "secrets:get:project/firefoxreality/symbols-token",
    "queue:route:statuses",
    "queue:scheduler-id:taskcluster-github",
    {
      "AnyOf": [
        "queue:create-task:highest:unknown/unknown",
        "queue:create-task:very-high:unknown/unknown",
        "queue:create-task:high:unknown/unknown",
        "queue:create-task:medium:unknown/unknown",
        "queue:create-task:low:unknown/unknown",
        "queue:create-task:very-low:unknown/unknown",
        "queue:create-task:lowest:unknown/unknown"
      ]
    }
  ]
}

  • method: createTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2020-03-18T22:59:23.358Z

Please sign in to comment.