Skip to content

Fix E2E Flaky Tests Report failing with gh api 404#65120

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:fix-analyze-e2e-flaky-tests-gh-api
Apr 13, 2026
Merged

Fix E2E Flaky Tests Report failing with gh api 404#65120
potiuk merged 1 commit intoapache:mainfrom
potiuk:fix-analyze-e2e-flaky-tests-gh-api

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Apr 13, 2026

Summary

The nightly E2E Flaky Tests Report workflow has been failing — see run 24320225760 / job 71004915159. The "Analyze E2E test results" step prints:

Root cause

The `gh` CLI defaults to POST whenever `-f`/`-F` parameters are present. The workflow runs list endpoint returns 404 on POST, which is exactly the error in the log.

Fix

  • Add `--method GET` to the `gh api` command in `scripts/ci/analyze_e2e_flaky_tests.py` so the `-f` params are encoded as query string instead of a POST body.
  • Add a regression test in `scripts/tests/ci/test_analyze_e2e_flaky_tests.py` that asserts the helper passes `--method GET`.

Verified locally that the broken call returns 404 and the fixed call returns the expected payload.

Test plan

  • `uv run --project scripts pytest scripts/tests/ci/test_analyze_e2e_flaky_tests.py -xvs` — 13 passed (1 new + 12 existing).
  • Next nightly E2E Flaky Tests Report run on `main` should now post to Slack instead of failing.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.6)

Generated-by: Claude Code (Opus 4.6) following the guidelines

scripts/ci/analyze_e2e_flaky_tests.py builds 'gh api <endpoint> -f
key=val ...' to list workflow runs. The gh CLI defaults to POST
whenever -f parameters are present, so the workflow runs endpoint
returned 'Not Found (HTTP 404)' and the script wrote no output file,
causing the downstream slack-github-action step to crash with ENOENT
on slack-message.json.

Force --method GET in the gh_api helper and add a regression test.
@boring-cyborg boring-cyborg bot added area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch labels Apr 13, 2026
@potiuk potiuk merged commit 7ae29fb into apache:main Apr 13, 2026
65 checks passed
@potiuk potiuk deleted the fix-analyze-e2e-flaky-tests-gh-api branch April 13, 2026 14:46
github-actions bot pushed a commit that referenced this pull request Apr 13, 2026
scripts/ci/analyze_e2e_flaky_tests.py builds 'gh api <endpoint> -f
key=val ...' to list workflow runs. The gh CLI defaults to POST
whenever -f parameters are present, so the workflow runs endpoint
returned 'Not Found (HTTP 404)' and the script wrote no output file,
causing the downstream slack-github-action step to crash with ENOENT
on slack-message.json.

Force --method GET in the gh_api helper and add a regression test.
(cherry picked from commit 7ae29fb)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@github-actions
Copy link
Copy Markdown

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Apr 13, 2026
…e#65120)

scripts/ci/analyze_e2e_flaky_tests.py builds 'gh api <endpoint> -f
key=val ...' to list workflow runs. The gh CLI defaults to POST
whenever -f parameters are present, so the workflow runs endpoint
returned 'Not Found (HTTP 404)' and the script wrote no output file,
causing the downstream slack-github-action step to crash with ENOENT
on slack-message.json.

Force --method GET in the gh_api helper and add a regression test.
(cherry picked from commit 7ae29fb)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
potiuk added a commit that referenced this pull request Apr 13, 2026
… (#65157)

scripts/ci/analyze_e2e_flaky_tests.py builds 'gh api <endpoint> -f
key=val ...' to list workflow runs. The gh CLI defaults to POST
whenever -f parameters are present, so the workflow runs endpoint
returned 'Not Found (HTTP 404)' and the script wrote no output file,
causing the downstream slack-github-action step to crash with ENOENT
on slack-message.json.

Force --method GET in the gh_api helper and add a regression test.
(cherry picked from commit 7ae29fb)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
dandanseo123 pushed a commit to dandanseo123/airflow that referenced this pull request Apr 13, 2026
scripts/ci/analyze_e2e_flaky_tests.py builds 'gh api <endpoint> -f
key=val ...' to list workflow runs. The gh CLI defaults to POST
whenever -f parameters are present, so the workflow runs endpoint
returned 'Not Found (HTTP 404)' and the script wrote no output file,
causing the downstream slack-github-action step to crash with ENOENT
on slack-message.json.

Force --method GET in the gh_api helper and add a regression test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants