Skip to content

Fix false release failures after GitHub API connection errors - #908

Merged
kaahos merged 6 commits into
mainfrom
paul.fournillon/fix-release-workflow-monitoring
Oct 30, 2026
Merged

kaahos merged 6 commits into
mainfrom
paul.fournillon/fix-release-workflow-monitoring

Conversation

@kaahos

@kaahos kaahos commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?:

Distinguishes GitHub workflow results from local monitoring errors. Reconnects to the existing run, preserves its actual conclusion, and bounds each monitoring window.

Motivation:

A connection reset while watching a successful release produced WORKFLOW FAILED. Reading the remote result avoids misleading failure reports and unnecessary release retries.

Additional Notes:

  • All monitoring attempts reuse the existing workflow run.
  • Each monitoring window lasts up to one hour. Interactive users can extend it; unattended sessions stop automatically.
  • A status query interrupted by the shared deadline is retried with a fresh, bounded allowance of ten seconds before prompting or stopping.
  • Only confirmed success exits zero. Other recognized conclusions retain their exact values; unconfirmed results report WORKFLOW STATUS UNKNOWN and exit nonzero.
  • Automated review feedback about the final status-query grace period is addressed.

How to test the change?:

  • passed — bash .github/scripts/tests/test_release_automation.sh covering connection recovery, terminal conclusions, deadlines, interactive extensions, and reuse of the same workflow run.
  • passed — regression coverage confirms that a query crossing the monitoring deadline receives a bounded final retry before prompting or stopping.
  • passed — shell and Python syntax checks, spotlessApply, and git diff --check.
  • inconclusive — a fresh end-to-end release has not been run with the modified script.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: N/A — no tracker ticket supplied.

Unsure? Have a question? Request a review!

@kaahos
kaahos marked this pull request as ready for review October 26, 2026 16:30
@kaahos
kaahos requested a review from a team as a code owner October 26, 2026 16:30
@kaahos

kaahos commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T14:32:56.511609Z 07b51ec Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 636fefac7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-prod-us1-4 datadog-prod-us1-4 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The recovery path preserves a single workflow dispatch and reports an unknown result when GitHub cannot confirm completion. The specialist review found no actionable regressions, and human PR discussion supplied no contrary evidence.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 636fefa

@dd-octo-sts

dd-octo-sts Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 d9f3791b

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 07b51ec | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #41068506990 | Commit: bea3a22 | Duration: 19m 34s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - ✅ - -
8-ibm - ✅ - -
8-j9 ✅ ✅ - -
8-librca - - ✅ ✅
8-orcl - ✅ - -
11 - ✅ - -
11-j9 ✅ ✅ - -
11-librca - - ✅ ✅
17 ✅ ✅ - -
17-graal ✅ ✅ - -
17-j9 ✅ ✅ - -
17-librca - - ✅ ✅
21 ✅ ✅ - -
21-graal ✅ ✅ - -
21-librca - - ✅ ✅
25 ✅ ✅ - -
25-graal ✅ ✅ - -
25-librca - - ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-10-30 14:28:02 UTC

@jbachorik jbachorik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this.

Only a few nits.

Comment thread utils/release.sh Outdated
WORKFLOW_CONCLUSION="success"
break
;;
failure|cancelled|timed_out|action_required|startup_failure|stale|neutral|skipped)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are action_required|stale|neutral actually failures?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they represent official GitHub report states, so they are not necessarily errors but rather not successful states. I've modified this part a bit so it is clearer.

Comment thread utils/release.sh Resolved
Comment thread utils/release.sh
echo " View logs: gh run view $RUN_ID --log-failed"
echo " View logs: gh run view $RUN_ID --repo $REPO --log-failed"
else
print_warning "Monitoring could not confirm the workflow result. The remote run may still be running."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have some kind of timeout here with user confirmation? If we don't reach conclusion within, let's say 30 minutes, user should decide whether it is expected or rather this should counted as a failure, perhaps?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that's a good idea. I've put a timeout of one-hour in case the CI takes time, then the user can choose to wait or to consider this is a failure.

@kaahos

kaahos commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9f3791b7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread utils/release.sh Resolved
@kaahos

kaahos commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 07b51ecab3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kaahos
kaahos merged commit 569e72c into main Oct 30, 2026
114 of 117 checks passed
@kaahos
kaahos deleted the paul.fournillon/fix-release-workflow-monitoring branch October 30, 2026 14:36
@github-actions github-actions Bot added this to the 1.53.0 milestone Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants