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

fix inspect remote #7749

Merged
merged 5 commits into from Oct 22, 2020
Merged

fix inspect remote #7749

merged 5 commits into from Oct 22, 2020

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Sep 24, 2020

Changelog: Bugfix: Fix inspect --remote forcing to retrieve the remote for evaluation, overwriting what is in the local cache.
Docs: Omit

Close #7745

@memsharded memsharded added this to the 1.31 milestone Sep 24, 2020
@memsharded memsharded marked this pull request as ready for review Oct 19, 2020
@memsharded
Copy link
Member Author

Assigning @czoido, because this deserves some thought into the new CLI 2.0.

Copy link
Contributor

@czoido czoido left a comment

Choose a reason for hiding this comment

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

I'm adding a test, as I think there's a side effect with this. As we are deleting export preparing to download the files:

rmdir(dest_folder)

Doing something like this:

conan new pkg/1.0 -s
conan create .
conan inspect pkg/1.0 # is fine, we get the data
conan inspect pkg/1.0 -r conan-center # as a side effect removes export folder
conan inspect pkg/1.0 # broken

@memsharded
Copy link
Member Author

Very good catch @czoido

I have changed the code, doing first a check if the recipe exists in the remote before trying to fetch it, with _, ref = self.app.remote_manager.get_recipe_manifest(ref, remote). Now the test passes, but tbh, I am not super comfortable with this "inspect in remotes" feature, we need to re-think it.

@memsharded memsharded requested a review from czoido Oct 21, 2020
czoido
czoido approved these changes Oct 22, 2020
@czoido czoido merged commit 943ea92 into conan-io:develop Oct 22, 2020
2 checks passed
@memsharded memsharded deleted the fix/inspect_remote branch Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
CLI
Awaiting triage
Development

Successfully merging this pull request may close these issues.

[bug] conan inspect always prefers the package in the local cache
2 participants