-
Notifications
You must be signed in to change notification settings - Fork 989
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
[bug] Conan doesn't resolve reference to latest binary package when old sqlite3 is installed #14945
Comments
Hi @BobIsOnFire Thanks for your report, that certainly doesn't look right, let me investigate it. |
First initial test seems to be working fine, the latest def test_package_revision_latest():
c = TestClient()
c.save({"tool/conanfile.py": GenConanfile("tool", "0.1").with_package_file("file.txt",
env_var="MYVAR"),
"pkg/conanfile.py": GenConanfile("pkg", "0.1").with_tool_requires("tool/0.1")})
with environment_update({"MYVAR": "MYVALUE1"}):
c.run("create tool")
prev1 = c.created_package_revision("tool/0.1")
with environment_update({"MYVAR": "MYVALUE2"}):
c.run("create tool")
prev2 = c.created_package_revision("tool/0.1")
c.run("create pkg")
assert prev2 in c.out # latest package-revision is used
assert prev1 not in c.out # not the older one
c.run("install --requires=pkg/0.1 --build=pkg*")
assert prev2 in c.out # latest package-revision is used
assert prev1 not in c.out # not the older one Are you sure that nothing is happening between the |
Hi @memsharded! Yes, I don't think I have run anything else... I tried to minimize my setup and commands that I executed + some extra info that could be useful: https://github.com/BobIsOnFire/conan-14945-repro. And here are the full logs for the Now I can reproduce this very easily. Let me know what else I can run to help you! |
Sorry, I missed this. Yes, |
I am quite baffled by this... |
Yes, after I remove ConanCenter binary, it successfully resolves to the only binary left in the cache: BobIsOnFire/conan-14945-repro@65dbc7b Log: docker-run.log |
Ok, I'll investigate further with your repo docker setup, thanks for putting it together. |
I have one more insight: see these timestamps from
The 'latest' query picked CCI revision and put a timestamp for the local build on it! |
Yeah, looks like this query is broken on my OS: conan/conan/internal/cache/db/packages_table.py Lines 130 to 143 in c271142
This is what is sent to DB: I have put it into
So, it picks up all data from the first entry, except for |
That is very interesting. I am still wondering why it doesn't fail in other cases, I will send my test to CI to validate it in other platforms too. Maybe it is some subtle difference in the sqlite3 behavior in that plaform? |
It could be that my sqlite3 version (3.6.20) is quite old. I googled a little bit, looks like bare columns in aggregate queries (i.e. the ones not mentioned in either See also: |
From https://www.sqlite.org/chronology.html, it seems sqlite 3.6.20 is from 2009!! 😱 😱 😱 Do you think you could upgrade a bit that sqlite in your system and try? Side note, I am trying to build your docker, but hitting:
I guess that this is not freely available? |
Yeah, "quite old" is an understatement 😅 Oracle Linux 6 itself is a 14-year-old distribution, but I am locked in with it for a while. I will try building a fresher version of
Sorry, it looks like the error message was cut out. Could you copy it one more time? |
|
Are you using WSL, by any chance? There is a known issue which I also hit: microsoft/WSL#4694 (comment) (requires WSL VM restart) |
I am using docker desktop for windows (I think on wsl2), probably same issue, yes. Not sure I am able to change the WSL config, this is a company provisioned computer. |
Hi @memsharded, I have built a newer I also found the commit where the extension was added: https://www.sqlite.org/src/info/fa13edd39c3b8ec7, which got into I know that rewriting a query to accomodate such old releases would be too much to ask, but do you think it makes sense to add an exception (or at least a warning) when user is using a too old |
Not a problem, this was a fun one to investigate 😄 , it was driving me crazy! Yes, I think failing if the sqlite version is too old would be nice.
is the right way to check the system sqlite version |
I am adding the check for sqlite version in PR #14950 |
Thank you! |
Environment details
Steps to reproduce
Trying to build & install
boost
from source on old system (glibc
2.12),b2/4.10.1
resolves to a binary package on CCI, which is built against a newerglibc
:Easy to solve -- build
b2
from source:So now I have two package revisions of
b2
:Bui if I decide to build
boost
again (e.g. with different settings), conan reproducibly picksb2
from CCI:Am I missing some sort of logic here? Shouldn't latest package revision be picked?
Currently I am working around by running
conan remove -c 'b2/*'
and building the package from source on the next run so that there is only one package in cache and it's mine, which is OK from me, but the behaviour is still weird.The text was updated successfully, but these errors were encountered: