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

[CT-494] Move the deprecation check for dependancies outside the caching logic #5068

Closed
emmyoop opened this issue Apr 14, 2022 · 1 comment · Fixed by #5069
Closed

[CT-494] Move the deprecation check for dependancies outside the caching logic #5068

emmyoop opened this issue Apr 14, 2022 · 1 comment · Fixed by #5069
Labels
bug Something isn't working

Comments

@emmyoop
Copy link
Member

emmyoop commented Apr 14, 2022

Move the deprecation check for dependancies outside the caching logic. The deprecations don't actually get cached, just the response so it's not really valid.

Relevant code:

# Either redirectnamespace or redirectname in the JSON response indicate a redirect
# redirectnamespace redirects based on package ownership
# redirectname redirects based on package name
# Both can be present at the same time, or neither. Fails gracefully to old name
if ("redirectnamespace" in response) or ("redirectname" in response):
if ("redirectnamespace" in response) and response["redirectnamespace"] is not None:
use_namespace = response["redirectnamespace"]
else:
use_namespace = response["namespace"]
if ("redirectname" in response) and response["redirectname"] is not None:
use_name = response["redirectname"]
else:
use_name = response["name"]
new_nwo = use_namespace + "/" + use_name
deprecations.warn("package-redirect", old_name=package_name, new_name=new_nwo)

@emmyoop emmyoop added bug Something isn't working triage and removed triage labels Apr 14, 2022
@github-actions github-actions bot changed the title Move the deprecation check for dependancies outside the caching logic [CT-494] Move the deprecation check for dependancies outside the caching logic Apr 14, 2022
@emmyoop
Copy link
Member Author

emmyoop commented Apr 14, 2022

This needs to be done as part of #5034 or the tests won't pass but does not effect use in the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant