Skip to content

[Schema Inaccuracy] Undocumented "Pending" State for a Check Suite  #3095

Open
@Avenel

Description

@Avenel

Schema Inaccuracy

Hello,

This inaccuracy is about a missing state of a Check Suite which is not included in the schema (for reference: Check Suite API Documentation). The documented states for Check Suite API response are "queued", "in_progress", and "completed". However, I have encountered an additional state, namely "pending".

In addition I have seen this state (and some more) in the GraphQL API documentation for a CheckSuiteState Enum.

Expected

The state pending and the other missing states documented in the CheckState Enum are in the schema for all occurrences (e.g., in the REST API call for getting a list of all Check Suites) of the property status of a Check Suite.

Reproduction Steps

This "pending" state can be induced by implementing a concurrency within a workflow. This action prevents the same workflow from being executed simultaneously. Here's an example of how this might be set up in YAML:

name: Do something

on:
  push:
    branches:
    - main
    
concurrency: test

jobs:
  one:
    runs-on: ubuntu-latest
    name: Do it
    steps:
    - name: Checkout repository
      uses: actions/checkout@v3
    - name: Wait
      run: |
        sleep 120

When this workflow is triggered twice, the API response includes the "pending" state:

{
  "id": 9170123123,
  "node_id": "CS_kwSOJbvS3c8AAAADsy2zEw",
  "head_branch": "main",
  "head_sha": "3bcc59988530adbb6e031f1b526a763e7418d920",
  "status": "pending",
  "conclusion": null,
  "url": "https://api.github.com/repos/my-test-repo/wf-test/check-suites/15291018543",
  ...
  "pull_requests": [],
  "app": {
    "id": 15238,
    "slug": "github-actions",
    ...
  }
}

Thank you in advance for looking into this.

Best Regards.

Activity

shiftkey

shiftkey commented on Nov 10, 2023

@shiftkey
Member

@Avenel apologies for the delay in replying. I've reached out to the feature team to confirm this field is expected, and hopefully we can get the docs updated in the coming days.

KetchupOnMyKetchup

KetchupOnMyKetchup commented on Nov 13, 2023

@KetchupOnMyKetchup

@Avenel @shiftkey -

Hi there, I'm part of the feature team owning this API.

There are 2 types of Check Suites to consider:

  • dotcom general Check Suites
  • Actions specific Check Suites

pending is a valid Check Suite state for Actions specific Check Suites only.

I don't think we should add it to the enum (mentioned in description here - https://github.com/github/c2c-actions-support/issues/3114) since its not true for regular non-Actions Check Suites.

But we think that it would be really good to add a note on the API Docs that pending is a valid state for Actions specific Check Suites. It seems that when the new state was introduced, adding the note to the docs was forgotten at that time. Please let me know how I can assist. Thank you!

KetchupOnMyKetchup

KetchupOnMyKetchup commented on Nov 13, 2023

@KetchupOnMyKetchup

Created issue on our backlog and will prioritize for our next Doc-a-thon which will be next quarter. Thank you so much for surfacing this!

https://github.com/github/actions-build/issues/265

Avenel

Avenel commented on Nov 16, 2023

@Avenel
Author

Hello @KetchupOnMyKetchup,

Thank you for your contribution to this discussion. I'm seeking some clarification to better understand the context of your answer. Could you please explain in more detail the differences between a "dotcom general Check Suite" and a "Actions specific Check Suite"?

In addition, it would be helpful if you could provide the API routes for each type, in case they differ. Or a different way to differentiate them using the API.

Best Regards.

brittanyellich

brittanyellich commented on Mar 14, 2024

@brittanyellich

Hi @Avenel ,

I recently picked up this issue to close it out, but wanted to respond to your question. A "dotcom general Check Suite" is referring to a check suite created using the Checks API, while an Actions specific Check Suite is a check suite created by GitHub Actions. GitHub Actions uses check suites and can set some additional statuses that aren't available to be set using the Checks API (pending, waiting, and requested).

Thank you so much for submitting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shiftkey@Avenel@dinonuggies1@KetchupOnMyKetchup@brittanyellich

        Issue actions

          [Schema Inaccuracy] Undocumented "Pending" State for a Check Suite · Issue #3095 · github/rest-api-description