Skip to content

Retry tests and examples on staging API 503s - #102

Merged
tomasr78 merged 1 commit into
mainfrom
ci-staging-retries
Oct 20, 2026
Merged

tomasr78 merged 1 commit into
mainfrom
ci-staging-retries

Conversation

@tomasr78

Copy link
Copy Markdown
Contributor

The first build of main after #96 failed: the staging API (stag-v2.convertapi.com, gateway kaulas) returns a 19-byte 503 no healthy upstream on about one request in ten. I reproduced it locally on pdf/to/jpg. See https://github.com/ConvertAPI/convertapi-library-node/actions/runs/39389655665.

  • The tests run with mocha --retries 2, in both build.yml and publish.yml.
  • The examples get up to three attempts, 10 s apart, and a warning is logged for each failed attempt.

The staging 503s themselves are an infrastructure issue and need a separate fix.

🤖 Generated with Claude Code

stag-v2 answers about one request in ten with 503 "no healthy upstream"
(gateway kaulas), which failed the first build of main. Each mocha test now
gets two retries and the examples up to three attempts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 08:01
@tomasr78
tomasr78 merged commit e50db29 into main Oct 20, 2026
5 checks passed
@tomasr78
tomasr78 deleted the ci-staging-retries branch October 20, 2026 08:02

Copilot AI 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.

🟡 Changes recommended

Nonzero example-process exits terminate the step before warnings or retries can run.

1 open issue
What changed in this PR

Adds retries to reduce CI failures caused by intermittent staging API errors.

Changes:

  • Preserves linting and adds two test retries in both workflows.
  • Adds up to three example attempts, with warnings and 10-second delays.
File Description
.github/​workflows/​publish.yml Adds test retries before publishing.
.github/​workflows/​build.yml Adds test and example retries.

Review effort: Balanced

Comment on lines +78 to +79
node --require ./.github/examples-base-uri.js examples/ 2>&1 | tee examples.log
if ! grep -q '^Error' examples.log; then
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