Skip to content

Bug: pending status not handled, causing premature success when jobs wait for runners #97

@JonoRicci

Description

@JonoRicci

This action is really useful for us, but we have a situation that occassionally happens in our GitHub Actions workflow where some jobs can be in a pending status waiting on our self-hosted runners becoming available. When this happens, the allcheckspassed action doesn't seem to recognise these and considers all checks to have passed prematurely and ends, before our runner has picked up the pending job.

Current Behaviour

In the GitHub API documentation I can see these values for check run status:

  • queued
  • in_progress
  • completed
  • waiting
  • requested
  • pending

In src/checks/checksConstants.ts:

export const checkStatus = {
  QUEUED: "queued",
  IN_PROGRESS: "in_progress",
  COMPLETED: "completed",
  WAITING: "waiting",
};

In src/checks/checks.ts:

let inProgressQueuedWaiting = [
  checkStatus.IN_PROGRESS,
  checkStatus.QUEUED,
  checkStatus.WAITING,
];

The pending (and requested) statuses are missing, so I suspect checks in these status are not being treated as "in progress".

It may be they have been left out here on purpose for some reason, otherwise hopefully we can add the pending status in please.

Proposed Behaviour

  1. Add pending (and maybe requested as well?) to src/checks/checksConstants.ts:
export const checkStatus = {
  QUEUED: "queued",
  IN_PROGRESS: "in_progress",
  COMPLETED: "completed",
  WAITING: "waiting",
  PENDING: "pending",      // add
  REQUESTED: "requested",  // add
};
  1. Include in src/checks/checks.ts:
let inProgressQueuedWaiting = [
  checkStatus.IN_PROGRESS,
  checkStatus.QUEUED,
  checkStatus.WAITING,
  checkStatus.PENDING,    // add
  checkStatus.REQUESTED,  // add
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions