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

[question] skip test package if the package is downloaded? #14999

Closed
1 task done
tbsuht opened this issue Oct 23, 2023 · 6 comments · Fixed by #15999
Closed
1 task done

[question] skip test package if the package is downloaded? #14999

tbsuht opened this issue Oct 23, 2023 · 6 comments · Fixed by #15999
Assignees
Milestone

Comments

@tbsuht
Copy link

tbsuht commented Oct 23, 2023

What is your question?

Hi,

when calling conan create and an already build package is found/downloaded in artifactory, wouldn't it make sense to skip the test package?
This was already done when uploading the package in the first place, so skipping should be fine?

Just realized this in our 3rd-party pipeline that a lot of test packages are build although they are only downloade.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded
Copy link
Member

Hi @tbsuht

Thanks for your question

when calling conan create and an already build package is found/downloaded in artifactory, wouldn't it make sense to skip the test package?

conan create actually enforces by default the re-build in the cache of the package, so the binary will not be downloaded from Artifactory but re-built from source, so it makes sense to run the test_package too

If you add the --build=missing it is still likely that the package is built from source too. If you are adding it and you want to skip the test_package, the syntax --test-folder="" (or -tf=""), will skip the test_package.

The conan create is basically a conan export + conan install --requires=the_pkg --build=the_pkg + conan test test_package. If you don't want the test_package to run, you can as well run directly conan install --requires=... syntax, isn't it?

@tbsuht
Copy link
Author

tbsuht commented Oct 23, 2023

Hi @memsharded

my full command is
conan create . --version ${version} --build missing -pr:h ${profile_h} -pr:b ${profile_b} -s build_type=Release

My expectation: I will only build the package once, then it's uploaded to artifactory and just downloaded on following runs.
On the first run its totally fine to build the test package, but on following runs it can be skipped as the package will not be build and the test has already been executed. I don't want to add -tf="" because the test should be run once when a new 3rd party project is added in our pipeline.

Hm, I'm not sure whether there is some downside in my usecase to just use conan install, I can definitely try that.
It just seemed redundant to me, to run the test package if a package is already build ...

@memsharded
Copy link
Member

In any case, I am trying to understand a bit better the pain. The test_package should be a fast check that the package is correct, so it shouldn't be a performance issue?

@tbsuht
Copy link
Author

tbsuht commented Oct 23, 2023

Not really in the single project case, but it creates quite some logging in the pipeline run and even if its just a few seconds: we are building a lot of 3rd party projects in one pipeline. So this can add up to minutes.

@memsharded
Copy link
Member

This would be implemented in #15999, isn't it? Did you close it because of this PR?

@tbsuht
Copy link
Author

tbsuht commented Apr 3, 2024

Jep, saw the upcoming change. Thanks for implementing this!

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

Successfully merging a pull request may close this issue.

2 participants