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

Feature/pkg list #13928

Merged
merged 24 commits into from
Jun 2, 2023
Merged

Feature/pkg list #13928

merged 24 commits into from
Jun 2, 2023

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented May 21, 2023

Changelog: Feature: Use PackagesList as input argument for conan upload --list=pkglist.json.
Changelog: Feature: Use --graph input for conan list to create a PackagesList that can be used as input for conan upload.
Docs: conan-io/docs#3257

Close #13274
Close #10436
Close #6925
Close #6647

@memsharded memsharded added this to the 2.0.6 milestone May 21, 2023
@memsharded memsharded self-assigned this May 21, 2023
@memsharded memsharded requested review from AbrilRBS, franramirez688 and czoido and removed request for AbrilRBS and franramirez688 May 21, 2023 20:28
@memsharded memsharded modified the milestones: 2.0.6, 2.0.7 May 24, 2023
czoido and others added 6 commits May 26, 2023 12:18
* test_requires shouldn't affect package_id

* test with transitive

* remove prints
…and export-pkg (conan-io#13967)

* Ensuring the output for the rest of commands

* export-pkg too

* graph as first output level

* wip

* typo

* typos
@memsharded memsharded marked this pull request as ready for review May 26, 2023 14:10
Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Nice! Looks good to get merged now, and iterate on it further down the line

Comment on lines +130 to +137
assert "Local Cache" in client.load("pkglist.json")
# Download binary too! Just to make sure it is in the cache, but not uploaded
# because it is not in the orignal list of only recipes
client.run(f"download * -r=default")
client.run("remove * -r=default -c")
client.run("upload --list=pkglist.json -r=default")
assert f"Uploading recipe 'zlib/1.0.0" in client.out
assert f"Uploading recipe 'zli/" not in client.out
Copy link
Member

Choose a reason for hiding this comment

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

This neatly shows the usecase, I think it was a good call to have both download & upload available at first :)

conan/cli/commands/download.py Show resolved Hide resolved
conan/cli/commands/download.py Outdated Show resolved Hide resolved
recipes = [r.lower() for r in graph_recipes or []]
binaries = [b.lower() for b in graph_binaries or []]

pkglist.lists["Local Cache"] = cache_list
Copy link
Contributor

Choose a reason for hiding this comment

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

Then, the graphfile param and the function itself are only supposed to fill the Local Cache field, aren't they? Should load_graph mention anything in a docstring to clarify it? If load are adding remotes and this is not, I think both docstrings could be useful.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a good point.

Indeed, this is hardcoding the assumption that load_graph at the moment only happens for packages that have been installed in the cache, and then exists there for sure.

We need to check if there is some scenario with graph info that do not retrieve the binaries to the local cache if this makes sense or not. I'll have a look.

memsharded and others added 2 commits May 31, 2023 20:38
Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>
Copy link
Contributor

@franramirez688 franramirez688 left a comment

Choose a reason for hiding this comment

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

Great! 👍

franramirez688

This comment was marked as duplicate.

franramirez688

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants