Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test stability and recovery improvements #69

Merged
merged 25 commits into from
Oct 23, 2023
Merged

Conversation

pwrightcertinia
Copy link
Contributor

@pwrightcertinia pwrightcertinia commented Oct 19, 2023

fixes #67, fixes apex-dev-tools/tooling-issues#92, fixes apex-dev-tools/tooling-issues#84, fixes apex-dev-tools/tooling-issues#52

The main goal with this is to help reduce the number of fatal crashes that occur during test runs. It does not care what errors come in yet (unlike polling client, which only skips network errors), will keep polling or retrying until either hitting a timeout or a max number of tries.

  • Integrated the library underneath PollingClient which is ts-retry-promise.
  • Polling no longer exits on unknown errors, it will continue until timeout.
  • Test runner will return the latest results, the extra dangerous query (gatherResults) after the last successful poll is no longer required.
  • Because of the above, it is now also possible to return and generate partial results as long as at least one poll has worked.
  • Added retries in various places:
    • Async/sync test start requests
    • Every query call
    • Added a run func to the query helper which will retry any connection based call
    • Abort exec anon
  • Retries will default to 3 extra attempts, with 15/30/60 seconds delays - not configurable yet
  • Removed test cancel polling - not sure this worked as intended, it did no corrective action and was checking records it supposedly just updated. So this is now fire and forget if the anon apex succeeded.
  • Added a lot of additional logging:
    • Every poll and retry that fails will log the reason
    • Waiting for a retry
    • Test failures will print as they come in on status polls
    • Report generation success/failure

@pwrightcertinia pwrightcertinia merged commit 2211b7b into main Oct 23, 2023
1 check passed
@pwrightcertinia pwrightcertinia deleted the test-stability branch October 23, 2023 09:55
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.

Retry on FUNCTIONALITY_TEMPORARILY_UNAVAILABLE
1 participant