Skip to content

Instantly share code, notes, and snippets.

@escapewindow
Last active April 19, 2016 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save escapewindow/8483872156a88b55d6638c6afa6ec867 to your computer and use it in GitHub Desktop.
Save escapewindow/8483872156a88b55d6638c6afa6ec867 to your computer and use it in GitHub Desktop.
testing a worker
  • get assume:project:taskcluster:worker-test-scopes scope. That will give the following scopes:
  • queue:define-task:test-dummy-provisioner/dummy-worker-*
  • queue:task-group-id:test-dummy-scheduler/*
  • queue:schedule-task:test-dummy-scheduler/*
  • queue:poll-task-urls:test-dummy-provisioner/dummy-worker-*
  • queue:claim-task:test-dummy-provisioner/dummy-worker-*
  • queue:worker-id:test-dummy-workers/dummy-worker-*
  • go to https://tools.taskcluster.net/auth/clients/ , create a mozilla-ldap/asasaki@mozilla.com/worker-test clientid with the assume:project:taskcluster:worker-test-scopes scope. This will grant access to the needed scopes for the worker
  • scopes needed:
  • To create task: (not legacy)
  • queue:define-task:<provisionerId>/<workerType>
  • queue:task-group-id:<schedulerId>/<taskGroupId>
  • queue:schedule-task:<schedulerId>/<taskGroupId>/<taskId>
  • To claim task:
  • queue:claim-task:<provisionerId>/<workerType>
  • queue:worker-id:<workerGroup>/<workerId>
  • generate your config: define the provisionerId and workerType. provisionerId is already defined as test-dummy-provisioner in assume:project:taskcluster:worker-test-scopes. The workerType will be prefaced with dummy-worker-
  • manually generate a task: https://tools.taskcluster.net/task-creator/
  • make sure the provisionerId and workerType are the same as above

troubleshooting and tips

  • a 405 when hitting signedDeleteUrl probably means you're using a get rather than a delete
  • to test 409 on claimTask, claim a canceled or already-claimed task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment