[go: up one dir, main page]

Skip to content

Handle invalid transitions in Commit Status POST API

What does this MR do and why?

Handle invalid transitions in Commit Status POST API

This commit implements idempotent behavior for the commit status API by handling invalid state transitions gracefully.

Key changes:

  1. Skip state transitions when job is already in target state
  2. Handle invalid transitions by allowing external systems to override GitLab's state machine rules when appropriate
  3. Add proper error handling and logging for transition failures

This addresses the issue where posting the same status twice would cause a bad request error instead of being idempotent.

Fixes: #556757

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading