question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] CI builds fail if recipe has not changed

See original GitHub issue

Currently, our CI pipeline consists of source pull, restore (conan install), build/test (conan build), package (conan export-pkg), publish (conan publish), and finalize stages. If someone kicks off a build more than once accidentally, the first build job goes through all stages just fine but each subsequent job fails due to a stderr when conan export-pkg is run. The packaging step fails because the recipe/package already exists in conan cache.

Once this failing job has happened, our PRs are unable to satisfy build checks. Our developers then attempt to rebuild failing each time until I either skip the package/publish steps or force overwrite (which I avoid and don’t ever need in any other case as we use revisions). Is there a recommended way to prevent a hard fail if the recipe/package is present and has not changed? Or maybe some way to check whether they differ prior and only export-pkg if they are different?

Conan version: 1.45.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
memshardedcommented, May 22, 2022

If recipe is the same but at least one upstream package is new, the package exports successfully but promotion from one channel to another (conan copy)

An important note about this: conan copy has been removed from Conan 2.0. Packages must be immutable, and conan copy is violating that. To implement “stages” the recommended way is to leave the packages user/channel constant, and use different remote repositories, and run promotions (copies) from one remote repository to another one.

0reactions
anderson-devcommented, Jun 16, 2022

should I create a new issue and try to give more detailed reproduction steps? I don’t see how the --build=missing:<pattern> feature is relevant here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting CI/CD - GitLab Docs
GitLab provides several tools to help make troubleshooting your pipelines easier. This guide also lists common issues and possible solutions.
Read more >
How to Fix Flaky Tests - Semaphore CI
Randomly failing tests are the hardest to debug. Here's a framework you can use to fix them and keep your test suite healthy....
Read more >
Yocto CI Build number ? PR Service do not increment ${PR}
I see two problems here: The PR is not incremented, even if I change the recipe or the project source code. The name...
Read more >
Continuous Integration - Martin Fowler
Only when my committed changes build successfully on the integration is my job ... you should never have a failed integration build stay...
Read more >
Troubleshooting Continuous Integration, or How to Debug ...
If the tests failed once on the CI, they will probably fail again - unless you change the code. Or, if the tests...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found