Skip to content

Switching to checks API in tc-gh #130

@owlishDeveloper

Description

@owlishDeveloper

Relevant literature: https://developer.github.com/v3/checks/
I started implementing here taskcluster/taskcluster-github#278

The above needs more work in these areas:

  • Decision tasks
  • Maintaining compatibility with the current status API so that the third party tools that use statuses would still work.

Decision tasks part itself has two parts:

  • Displaying the tasks started by the decision task as checks (which is easy: jobHandler will create the check for the decision task, and then, as we will be getting messages from the Queue, I will check if the task that came is in our DB - if yes, I'll update the checkrun, if not - I'll create one and put it into our DB). this is already in the PR
  • Retriggering tasks. So Github has "Retrigger All" and "Retrigger Check" buttons in the UI which are there whether you want them or not ✨ Pressing them will generate a webhook for us to catch. The former button is always there, and the latter button appears once the task is completed. For the above PR, I did not intend to make that button functional - the above PR is the first part of the work, and it's for displaying statuses only. For the second part of the work tho, I'll need to figure out a way of retriggering the tasks.

I propose: the "Retrigger All" button restarts, well, all using deprecated✨ rerun API of the queue. the "Retrigger Check" button will create a new taskcluster task in the same taskgroup. The checkrun status will be tied to this new task. I would like to display the inspector links for both of the tasks in that check.

  • Maintaining compatibility would probably make sense for the above PR. I am not sure what it means yet tho. There can be a lot of third party tools out there, I would guess... I would need more information on how they work. What I can say so far - it seems to me if you create check suites and check runs, you would not be able to get the statuses via repos.getStatuses (I'll test this some more, of course). Also, if the user doesn't give our integration the permission to read and write checks... I'm not sure what happens - apparently they are left stateles?? I don't call repos.status.create.

So, as far as I can tell right now, the only way to maintain compatibility would be to......create statuses alongside checks?? Or we can give people opportunity to decide if they want checks or statuses - in .taskcluster.yml?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions