Repository navigation
Retry transient 502/503 responses and move workflows off Node 20 - #223
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The scheduled Mainnet workflow has been failing intermittently on short-lived errors from
api.koios.rest, not because of code changes:getNFTArrivalDate503(PGRST002, "Could not query the database for the schema cache. Retrying.",retry-after: 0)getPolicyAssetAddressListTest504on all 6 attemptsgetAccountInformationCachedTest502BaseService.executeonly retried429and504, so a single502/503failed 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: retries502and503the same way it retries504, using the existing backoff andretriesCount. When every attempt fails, it still throwsRetry Count Exceeded.AssetServiceMainnetIntegrationTest: removedgetNFTArrivalDateand itsgetAllPolicyAssetListhelper. The test made one request per asset in a policy (about 6 minutes per run), printed to stdout, and repeated whatgetNFTAddressTestalready covers.BaseServiceErrorHandlingTest: new offline tests check that a502or503is retried and then succeeds, and that a persistent503stops after 5 attempts.checkoutv7,setup-javav6,cachev6,upload-artifactv7,codeql-actionv4,codecov-actionv7. Codecov moved too because v5 usedgithub-scriptv7 internally, which runs on node20. None of the inputs these workflows use changed.@param/@throwstags that the CodeQL job reported as warnings (TransactionsService,PoolApi,ScriptService,AssetService,BackendFactory,BackendServiceImpl). Comments only; no code changes.Notes for reviewers
504on every attempt) can still fail the Mainnet job. Retries only cover brief errors.-Dtest=!*Mainnet*,!*Preprod*,!*Preview*): 69 tests, 0 failures.504s were retried and passed; no502/503happened during the run, so the new retry path was only tested offline.🤖 Generated with Claude Code