Skip to content

feat: configurable retry delay#288

Open
maijalintunokka wants to merge 3 commits into
mainfrom
feat/configurableRetryDelay
Open

feat: configurable retry delay#288
maijalintunokka wants to merge 3 commits into
mainfrom
feat/configurableRetryDelay

Conversation

@maijalintunokka

Copy link
Copy Markdown
Contributor

Context

Follow-up to #282. This removes the hardcoded test-aware logic from the retry function.

Related Jira ticket

https://nostosolutions.atlassian.net/browse/SEARCH-2278

Screenshots

Copilot AI review requested due to automatic review settings June 1, 2026 10:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the API retry behavior configurable via config/environment variables (retry delay and max retry count), removing the previous hardcoded test-specific retry delay override introduced earlier.

Changes:

  • Add maxRetryCount and retryDelay to persistent and environment config schemas, plus new env vars.
  • Update retry logic to read retry settings from getCachedConfig() (instead of hardcoded constants/test detection).
  • Update tests and test setup/mocks to use a very small retry delay for faster runs.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vitest.config.ts Adds an additional test setup file for config-related test defaults.
test/utils/mockFileSystem.ts Ensures mocked .nosto.json includes a small retryDelay and satisfies the updated config type.
test/utils/mockConfig.ts Extends mocked runtime config with maxRetryCount and retryDelay.
test/setupConfig.ts New global test setup to override retryDelay via getCachedConfig() spying.
test/config/fileConfig.test.ts Updates expectations to include new config defaults (maxRetryCount, retryDelay).
test/api/retry.test.ts Updates retry warning assertions to match the new 1ms test retry delay.
src/modules/setup.ts Documents the new retry-related config options in setup help output.
src/config/schema.ts Adds maxRetryCount and retryDelay to persistent/environment config schemas with defaults.
src/config/envConfig.ts Adds env var mappings for NOSTO_MAX_RETRY_COUNT and NOSTO_RETRY_DELAY.
src/api/retry.ts Uses cached config for retry count/delay and removes test-aware delay override logic.
README.md Removes an outdated “Known issues” section that was addressed previously.

Comment thread src/modules/setup.ts Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 11:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

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