-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Refactor anaconda_token_rotation.rotate_anaconda_token
#1962
Comments
This CLI command / function is used in staged recipes and when we rotate tokens for cf-staging via the admin migrations. IDK where you got the idea that it may not be used, but it definitely is. I am going to close this issue since there is nothing to do here. |
Also this method is used in staged-recipes and so I don't understand how it is "seriously broken." |
Thank you. I could confirm that it is indeed used here
From the fact that the name of the command is
I think we misunderstood each other here. With "seriously broken" I, a bit sloppily, referred to the fact that there are some very obvious code quality issues with this function:
I would appreciate if you could reopen this issue. @beckermr |
IIRC the various try except statements catch errors and mask tokens at various steps. I'd take a closer look to make sure you understand the logic before touching the code. |
I don't think it's very productive to go into more specifics here since this is not a Pull Request, just a note about improvable code quality. But since I want this to be reopened, here is some additional opinions:
This is not a concrete proposal since this piece of code behaves a little bit differently in some edge cases and still has some readability problems. But it has no redundancy and is a good starting point for illustrating how a better version of this could look like.
Please reopen this issue. |
anaconda_token_rotation.rotate_anaconda_token
anaconda_token_rotation.rotate_anaconda_token
Comment:
Where is the
rotate-anaconda-token
CLI command used?If it's not used, the corresponding code should be removed.
If it's used, the
anaconda_token_rotation.rotate_anaconda_token
method should be refactored because it's seriously broken.conda-smithy/conda_smithy/anaconda_token_rotation.py
Lines 34 to 203 in 9e4720f
The text was updated successfully, but these errors were encountered: