Skip to content

Comments

MAINT: Fixing Retry configuration so it works from .env#1256

Merged
rlundeen2 merged 1 commit intoAzure:mainfrom
rlundeen2:users/rlundeen/2025_12_12_retry_fix
Dec 16, 2025
Merged

MAINT: Fixing Retry configuration so it works from .env#1256
rlundeen2 merged 1 commit intoAzure:mainfrom
rlundeen2:users/rlundeen/2025_12_12_retry_fix

Conversation

@rlundeen2
Copy link
Contributor

this PR happened because @romanlutz (correctly) pointed out globals are a bad practice. I remembered them not working otherwise, but I had a tough time remembering the circumstances.

Now I remember, because my PR above broke it! To repro, add this to a .env file

RETRY_MAX_NUM_ATTEMPTS=1

And if you run a notebook, it will still retry 10 times (or whatever your environment variable was set to before running pyrit).

Because it was loaded at initialization time, the .env file loading was not respected. And in fact, it did work with the globals, but no longer does. But with this fix, the exceptions class dynamically gets the number and avoids globals :)

@rlundeen2 rlundeen2 merged commit 813470d into Azure:main Dec 16, 2025
20 checks passed
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.

3 participants