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

Increase request retry timebox from 4s to 8s and when Fallback Mode is disabled then retry request 6 times #112

Merged
merged 4 commits into from
May 20, 2020

Conversation

ArturT
Copy link
Member

@ArturT ArturT commented May 20, 2020

general change

  • Increase request retry timebox from 4s to 8s to not flood Knapsack Pro API with too many requests in a short period of time and to give time for API server to autoscale and add additional machines to serve traffic

1. when Fallback Mode is enabled (default behavior)

This is the default behavior of knapsack_pro to start running tests in Fallback Mode when 3 times request to API fails.

example when Fallback Mode is enabled

8+16 = 24s wait time - knapsack_pro will try to connect with API within 24s before starting running tests in Fallback Mode

2. when Fallback Mode is disabled

  • When Fallback Mode is disabled with env KNAPSACK_PRO_FALLBACK_MODE_ENABLED=false then retry the request to Knapsack Pro API for 6 times instead of only 3 times.

Here is related info when some users want to disable Fallback Mode: https://github.com/KnapsackPro/knapsack_pro-ruby#required-ci-configuration-if-you-use-retry-single-failed-ci-node-feature-on-your-ci-server-when-knapsack_pro_fixed_queue_splittrue-in-queue-mode-or-knapsack_pro_fixed_test_suite_splittrue-in-regular-mode

Related to PR: #100

example when Fallback Mode is disabled

8+16+24+32+40 = 120s = 2 minutes wait time (6 attempts to make a request to API) - knapsack_pro will try to connect with API within 2 minutes before exiting with failure.

…o API with too many requests and to give time for API server to autoscale and add additional machines to serve traffic
@ArturT ArturT changed the title Increase request retry timebox from 4s to 8s and when Fallback Mode disabled then use 6 retry attempts Increase request retry timebox from 4s to 8s and when Fallback Mode is disabled then retry request 6 times May 20, 2020
@ArturT ArturT merged commit e975fc7 into master May 20, 2020
@ArturT ArturT deleted the reconnect-to-api-improvements branch May 20, 2020 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant