-
Notifications
You must be signed in to change notification settings - Fork 970
-
Notifications
You must be signed in to change notification settings - Fork 970
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] Numeric node IDs in lockfiles #6581
Comments
Hi, I think that your issue is a duplicated of this one (#6067), but with the new version of lockfiles (it uses numeric ids instead of the reference). Are you using requires in the test_package of the recipe that is failing? |
I'm not exactly sure if it's the same, or that it's a new version of lockfiles. In fact, I'm encountering both errors.
from conans import tools
from plexconantool import PlexConanFile, plextesttool
class PNGTest(PlexConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
# .conanfile_directory
plextesttool.build_test_program(self)
def test(self):
plextesttool.test_program(self, "test_png")
def imports(self):
self.copy("*.dll", src="bin", dst="bin") Here's another one with a non-numeric error:
from plexconantool import PlexConanFile, plextesttool
from conans import ConanFile, CMake, tools
import os
class TestPackage(PlexConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
# .conanfile_directory
plextesttool.build_test_program(self)
def test(self):
plextesttool.test_program(self, "test")
def imports(self):
# copy dll files for windows
self.copy("*.dll", "bin", "bin") These are structured pretty much identically (just like the vast majority of our test_packages). |
Mostly no, but in rare cases we do, for example python modules need libpython to link a test executable. from plexconantool import PlexConanFile, plextesttool
from conans import ConanFile, CMake, tools
import os, platform
class TestPackage(PlexConanFile):
settings = "os", "compiler", "build_type", "arch"
plex_requires = "python/2.7.17-26a8073720-1"
generators = "cmake"
def build(self):
# .conanfile_directory
plextesttool.build_test_program(self)
def test(self):
env = {"PYTHONHOME": os.environ.get("PLEX_PYTHONHOME", "")}
plextesttool.test_program(self, "test", env=env) |
Hi! It's quite difficult for me to know what is happening under the hood of all those plexXXXX wrappers on top of Conan elements, so I won't be able to reproduce it. Can you reproduce the issue with a minimum example? or, is there a way we can run your recipes? |
In any case, the issue #6067 is not related only to build_requires. That error will be raised for any This is because the |
@jgsogo I'll try that. For the purposes of this issue, those special wrappers should act the same as the upstream equivalents. I think what @memsharded says explains it pretty well. |
Hi @memsharded, I've added I do get the following warning: Also, the lockfile content looks a bit weird:
Previous nodes each have a |
Yes, the I keep investigating @sztomi issues. |
@memsharded I wanted to post that comment in the PR... Oops! |
@memsharded still trying and failing to create a minimal reproducible example. What I found so far, is that from the list of failing/successful packages, it seems like every failing package appears as a conditional requirement somewhere (i.e. in a |
We are releasing a |
When our CI builder script runs, it separates the export, build, test, upload steps for each recipe from our monorepo. Exporting is performed only once for all recipes. Building (via
conan create
) is performed according to the build-order determined by conan. Finally, testing and uploading is done viaconan test
andconan upload
.The reason for separating each step is to be able to report on what exactly fails.
When using lockfiles, I lock a metapackage ("variant") with the profile. Later, I supply this lockfile to each
conan create
invocation.Then, in the
test
step I do the same, with the expectation that test will utilize all the package revisions that were just built. However, I get an error along the lines of:If I look inside the lockfile, there is unsurprisingly, no node with that ID. But why is conan looking for it? My expectation would be that it would work similarly to when I pass the lockfile to
conan create
. And the effect should be "use the revisions that are locked in this lockfile to run the test". Am I misunderstanding something?The text was updated successfully, but these errors were encountered: