Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Why GitHub shows a red X on commits whose deploys succeeded: cancel-in-progress

A GitHub Actions run cancelled by concurrency: cancel-in-progress: true puts a red X on its commit, the same mark a failed run gets. For three days most commits on my site's main branch showed that X, and none of the deploys had failed. Every Cloudflare build in that window succeeded (30 of 30). The X came from deploy runs that were "cancelled after 1s". The fix was to keep the debounce and stop…

GitHub displays a red X on commits of commits whose deployments succeeded, indicating that the run was cancelled due to concurrency issues. This issue arose because GitHub Actions runs cancelled by concurrency: cancel-in-progress: true show a red X, just like failed runs. In the author's case, most commits on their site's main branch displayed the X, even though no deploys had failed.

Every Cloudflare build within this timeframe succeeded (30 out of 30). The X was generated from deploy runs that were "cancelled after 1s". The fix was to keep the debounce functionality and stop cancelling runs; a run that has been superseded exits with code 0 and shows green. A cancelled GitHub Actions run is considered a failure on the commit, making it difficult to distinguish from a broken build.

To avoid this, the author modified their workflow to wait for a burst of commits to settle, then check if the commit is still the head of the branch. If the commit has changed, a newer push has arrived, and that push's run will deploy, causing the current run to exit with code 0. This change results in green runs for superseded commits, preventing the appearance of red Xs on the commit list.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

A Cloudflare Worker route on a subdomain does nothing without a DNS record

A Cloudflare Worker route like app.example.com/* only runs when a request for that hostname reaches Cloudflare. For that, the hostname needs a DNS record in the zone, and the record has to be proxied…

  • A Cloudflare Worker route requires a DNS record for the subdomain to function.
  • DNS record must be proxied with the orange cloud symbol in the zone.
  • Absence of DNS record results in NXDOMAIN error and Worker route not matching.

More from Thursday 26 November →