Skip to content

Retry transient 502/503 responses and move workflows off Node 20 - #223

Merged
edridudi merged 3 commits into
mainfrom
claude/workflows-failing-4e6273
Nov 13, 2026
Merged

edridudi merged 3 commits into
mainfrom
claude/workflows-failing-4e6273

Conversation

@edridudi

@edridudi edridudi commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The scheduled Mainnet workflow has been failing intermittently on short-lived errors from api.koios.rest, not because of code changes:

Run Failing test Cause
Nov 13 (43377611010) getNFTArrivalDate one 503 (PGRST002, "Could not query the database for the schema cache. Retrying.", retry-after: 0)
Nov 12 getPolicyAssetAddressListTest 504 on all 6 attempts
Nov 9 getAccountInformationCachedTest one 502

BaseService.execute only retried 429 and 504, so a single 502/503 failed the call straight away.

The workflows also used actions that run on Node.js 20, which GitHub flags as deprecated on every run.

What changed

  • BaseService: retries 502 and 503 the same way it retries 504, using the existing backoff and retriesCount. When every attempt fails, it still throws Retry Count Exceeded.
  • AssetServiceMainnetIntegrationTest: removed getNFTArrivalDate and its getAllPolicyAssetList helper. The test made one request per asset in a policy (about 6 minutes per run), printed to stdout, and repeated what getNFTAddressTest already covers.
  • BaseServiceErrorHandlingTest: new offline tests check that a 502 or 503 is retried and then succeeds, and that a persistent 503 stops after 5 attempts.
  • Workflows: every action now runs on node24: checkout v7, setup-java v6, cache v6, upload-artifact v7, codeql-action v4, codecov-action v7. Codecov moved too because v5 used github-script v7 internally, which runs on node20. None of the inputs these workflows use changed.
  • Javadoc: added the missing @param/@throws tags that the CodeQL job reported as warnings (TransactionsService, PoolApi, ScriptService, AssetService, BackendFactory, BackendServiceImpl). Comments only; no code changes.

Notes for reviewers

  • A longer outage like Nov 12 (a 504 on every attempt) can still fail the Mainnet job. Retries only cover brief errors.
  • Offline suite (-Dtest=!*Mainnet*,!*Preprod*,!*Preview*): 69 tests, 0 failures.
  • Mainnet suite run locally on this branch: 145 tests, 0 failures. Four 504s were retried and passed; no 502/503 happened during the run, so the new retry path was only tested offline.
  • The Mainnet, Preprod and Preview workflows have no manual trigger, so their action updates first run on CI after merge. The Codecov and CodeQL workflows run on this PR.

🤖 Generated with Claude Code

The scheduled Mainnet workflow kept failing on brief Koios API errors:
a 503 PGRST002 (schema cache reload) on Nov 13 and a 502 on Nov 9.
The client only retried 429 and 504, so a single 502/503 failed the
call outright. Treat 502 and 503 like 504 and retry with the existing
backoff.

Also drop getNFTArrivalDate from the mainnet tests. It issued one
request per asset in a policy (~6 minutes per run), printed to stdout,
and duplicated what getNFTAddressTest already covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.46%. Comparing base (9fc5146) to head (85e0550).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #223      +/-   ##
============================================
+ Coverage     88.13%   88.46%   +0.32%     
- Complexity      337      343       +6     
============================================
  Files            37       37              
  Lines           961      962       +1     
  Branches         79       79              
============================================
+ Hits            847      851       +4     
+ Misses           74       72       -2     
+ Partials         40       39       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

GitHub now forces Node 20 actions onto Node 24 and flags them as
deprecated on every run. Bump each action to its current major, all of
which run on node24:

- actions/checkout v2/v4 -> v7
- actions/setup-java v2/v4 -> v6 (setup-java v1-v4 are deprecated)
- actions/cache v3 -> v6
- actions/upload-artifact v4 -> v7
- github/codeql-action v3 -> v4
- codecov/codecov-action v5 -> v7 (v5 wraps github-script v7 on node20)

None of the inputs these workflows use changed between the versions
(temurin JDK 11, cache paths, codecov token/fail_ci_if_error).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edridudi edridudi changed the title Retry transient 502/503 responses Retry transient 502/503 responses and move workflows off Node 20 Nov 13, 2026
CodeQL surfaced the javadoc build's warnings for public API methods
whose parameters or checked exception were undocumented:

- TransactionsService: extended on getUTxOInfo, and the seven include
  flags (isInputs ... isByteCode) on both getTransactionInformation
  overloads
- PoolApi: epochNo on getPoolRegistrations / getPoolRetirements
- ScriptService: scriptHashes on getScriptInformation
- AssetService: @throws ApiException on getAssetTokenRegistry
- BackendFactory / BackendServiceImpl: apiToken on three entry points

javadoc now reports no missing @param/@throws/@return tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edridudi
edridudi merged commit 7d4cd20 into main Nov 13, 2026
5 checks passed
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.

1 participant