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

o/snapstate: put MaybeReboot edges on link-snap in AddLinkNewBaseOrKernel and LinkNewBaseOrKernel #14934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewphelpsj
Copy link
Member

@andrewphelpsj andrewphelpsj commented Jan 15, 2025

Sometimes during a remodel, we need to create link-snap tasks for snaps that are already installed, but not yet considered boot participants. These tasks were missing reboot boundaries, which caused the tasks to be marked as done before the reboot completed.

tests/nested/manual/remodel-offline exhibits this behavior, where core22 already is installed, but not the model's base snap. The link-snap task that was created during the remodel was being marked as done before the reboot that the task triggers completed.

With this change, the entire remodel change will not be marked as done until that the link-snap task triggers is completed.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.30%. Comparing base (24a0034) to head (8eba504).
Report is 111 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14934      +/-   ##
==========================================
+ Coverage   78.20%   78.30%   +0.09%     
==========================================
  Files        1151     1155       +4     
  Lines      151396   153377    +1981     
==========================================
+ Hits       118402   120096    +1694     
- Misses      25662    25885     +223     
- Partials     7332     7396      +64     
Flag Coverage Δ
unittests 78.30% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewphelpsj andrewphelpsj added the Run nested The PR also runs tests inluded in nested suite label Jan 15, 2025
@andrewphelpsj andrewphelpsj reopened this Jan 15, 2025
Copy link

github-actions bot commented Jan 15, 2025

Fri Jan 24 23:11:39 UTC 2025
The following results are from: https://github.com/canonical/snapd/actions/runs/12957735938

Failures:

Executing:

  • google-core:ubuntu-core-24-64:tests/core/services

Copy link
Member

@Meulengracht Meulengracht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't the tasks that follow the 'link-snap' tasks need the MaybeRebootWaitEdge? Or is this already set?

@andrewphelpsj
Copy link
Member Author

andrewphelpsj commented Jan 16, 2025

@Meulengracht that edge is only used inside of snapstate, from arrangeSnapTaskSetsLinkageAndRestart. It shouldn't be needed here from what I can tell. Additionally, since we don't have an auto-connect (or anything after link-snap) task, I'm not sure what it would point to.

Copy link
Contributor

@maykathm maykathm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@pedronis
Copy link
Collaborator

thanks

…rnel and LinkNewBaseOrKernel

Sometimes during a remodel, we need to create link-snap tasks for snaps
that are already installed, but not yet considered boot participants.
These tasks were missing reboot boundaries, which caused the tasks to be
marked as done before the reboot completed.

tests/nested/manual/remodel-offline exhibits this behavior, where core22
already is installed, but not the model's base snap. The link-snap task
that was created during the remodel was being marked as done before the
reboot that the task triggers completed.

With this change, the entire remodel change will not be marked as done
until that link-snap task triggers is completed
@andrewphelpsj andrewphelpsj force-pushed the fix-remodel-link-not-waiting-for-reboot branch from 8eba504 to a43d9ed Compare January 24, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run nested The PR also runs tests inluded in nested suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants