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

[BUG] utils/aws.py:assumed_creds() attempts to update a dictionary while iterating on it #61049

Closed
brianthelion opened this issue Oct 13, 2021 · 4 comments · Fixed by #64392
Closed
Assignees
Labels
Bug broken, incorrect, or confusing behavior

Comments

@brianthelion
Copy link

brianthelion commented Oct 13, 2021

salt/salt/utils/aws.py

Lines 189 to 191 in cc0abfe

for key, creds in __AssumeCache__.items():
if (creds["Expiration"] - now) <= 120:
__AssumeCache__.delete(key)

That code block wouldn't work even if delete() was a valid dict method.

@brianthelion brianthelion changed the title utils/aws.py:assumed_creds() attempts to update a dictionary while iterating on it utils/aws.py:assumed_creds() attempts to update a dictionary while iterating on it Oct 13, 2021
@brianthelion
Copy link
Author

@twangboy Bump? This is a clear bug.

@brianthelion brianthelion changed the title utils/aws.py:assumed_creds() attempts to update a dictionary while iterating on it [BUG] utils/aws.py:assumed_creds() attempts to update a dictionary while iterating on it Nov 5, 2021
@garethgreenaway
Copy link
Contributor

garethgreenaway commented Apr 19, 2022

@brianthelion Can you provide a Salt version report so we know what version of Salt you're seeing this error in? Also if you can provide any stack traces when the error occurs. Thanks!

@brianthelion
Copy link
Author

@garethgreenaway Sorry, not using SaltStack anymore. The same code block is still preset today on master. The bug should be clear from inspection of the code.

@MKLeb
Copy link
Contributor

MKLeb commented Jun 1, 2023

Fixed by #64392

@MKLeb MKLeb closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants