Skip to content

Conversation

khluu
Copy link
Contributor

@khluu khluu commented Oct 8, 2025

So it can be configured for expensive tests to not retry

p
Signed-off-by: kevin <kevin@anyscale.com>
@khluu khluu requested a review from a team as a code owner October 8, 2025 23:13
@khluu
Copy link
Contributor Author

khluu commented Oct 8, 2025


num_retries = test.get("run", {}).get("num_retries")
if num_retries:
step["retry"]["automatic"][0]["limit"] = num_retries
Copy link

Choose a reason for hiding this comment

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

Bug: Retry Logic Fails When Zero Retries Specified

The if num_retries: condition evaluates to False when num_retries is 0, preventing tests from explicitly disabling retries. This results in default retry behavior instead of the intended zero retries.

Fix in Cursor Fix in Web

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a useful feature to configure the number of retries for release tests. The implementation is straightforward, but I've found one important issue in the logic that handles the num_retries value. Please see my comment below.

cmd += ["--smoke-test"]

num_retries = test.get("run", {}).get("num_retries")
if num_retries:
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The condition if num_retries: will evaluate to False when num_retries is 0. This prevents disabling retries for a test by setting num_retries: 0, which is a key use case mentioned in the PR description ("to not retry"). When num_retries is 0, the default retry limit (likely 1) will be used instead of disabling retries.

To correctly handle the case where num_retries is 0, you should check if the value is not None.

Suggested change
if num_retries:
if num_retries is not None:

@khluu khluu requested a review from aslonnie October 8, 2025 23:16
if smoke_test:
cmd += ["--smoke-test"]

num_retries = test.get("run", {}).get("num_retries")
Copy link
Collaborator

Choose a reason for hiding this comment

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

unit test?

@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core devprod release-test release test labels Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants