Skip to content

Instantly share code, notes, and snippets.

@MihaiTabara
Last active April 1, 2016 15:47
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 MihaiTabara/29af72c22a01cf1d2494da813d502008 to your computer and use it in GitHub Desktop.
Save MihaiTabara/29af72c22a01cf1d2494da813d502008 to your computer and use it in GitHub Desktop.

Problem to solve

Every once in a while we need to cancel a task-graph for some reason, and along with it all of its dependencies. That might include fail fast scenarions in which, for example, various credentials are not longer good, etc. In order to do that there are two specific pieces of information that you need in hand:

  • the task-graph-id
  • full tctalker setup

task-graph-id

For a few weeks now, this information lies within the email that's being sent by Ship-it. So just grab it from there:

....
A new build has been submitted through ship-it:
...
Task graph: https://tools.taskcluster.net/task-graph-inspector/#<task-graph-id>/
...

full tctalker setup

auth:create-client:mozilla-ldap/<ldap_username>/*
auth:create-client:project/releng/*
  • navigate to Taskcluster clients and create a new clientId - dedicated for playing with tctalker.
  • it should already be pre-formatted to mozilla-ldap/<ldap_username>/ at which you can concatenate any string. You can simply add tctalker.
  • use queue:* for Client Scopes
  • hit the Create Client button and make sure you save the Access token that is generated
  • create a json config file (e.g. "config.json") on disk that looks like this:
{
    "credentials": {
        "clientId": "you-will-never-guess",
        "accessToken": "nor here!"
    }
}
  • clone yourself a copy of tctalker and change directory to the clone repo
  • run the following:
python src/tctalker/tctalker.py --conf config.json cancel_graph <task-graph-id> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment