-
Notifications
You must be signed in to change notification settings - Fork 457
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
fix(lifecycle): return correct base when using devel for build-base #4523
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #4523 +/- ##
==========================================
- Coverage 89.20% 89.19% -0.01%
==========================================
Files 321 322 +1
Lines 21759 21826 +67
==========================================
+ Hits 19410 19468 +58
- Misses 2349 2358 +9 ☔ View full report in Codecov by Sentry. |
02fb2ce
to
50c4176
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work finding the problem. Just a question about craft-parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we are loosing the abstraction, it seems like the but is in get_effective_base
Can you also target the hotfix/8.0 branch? |
d1fc926
to
c65d700
Compare
get_effective_base() should not return "devel" and pass it to the PartsLifecycle(), which make the parts think the coreXX is "devel". Thus checking the wrong path for dynamic linking.
c65d700
to
6fd97ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if I understand the failing spread test correctly, for a project with the following definition,
base: core24
build-base: devel
we want to pass the base of core24
to craft-parts and the base of devel
to craft-providers. The problem is that get_effective_base()
is not a one-size-fits-all solution for this scenario.
What do you think of adding "core24": bases.BuilddBaseAlias.DEVEL
to this mapping? This would require us add more validation logic here so that
base: core24
still does not work. (and would give us an opportunity to raise a better error than the current KeyError that gets raised)
Ack, I'm sorry I linked to the wrong validator and misled you. What I meant is that we need a validator that ensures this is still not allowed: base: core24 I think you can add a new validator along the lines of Once the |
d85f950
to
a9ee505
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…-hotfix fix(lifecycle): return correct base when using devel for build-base (#4523)
get_effective_base()
should not return "devel" and pass it to thePartsLifecycle()
, which make the parts think the coreXX is "devel". Thus checking the wrong path for dynamic linking.LD_LIBRARY_PATH=...:/snap/core24/current/lib:/snap/core24/current/usr/lib:...
become
LD_LIBRARY_PATH=...:/snap/devel/current/lib:/snap/devel/current/usr/lib:...
which not exists.
Fix: #4508