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: reorder tasks such that snap and component downloads now happen consecutively #14697

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

Conversation

andrewphelpsj
Copy link
Member

@andrewphelpsj andrewphelpsj commented Nov 6, 2024

This change makes it so when installing (or refreshing) a snap and its components, we do all the downloads back-to-back. This will help make the code changes needed for remodeling simpler.

Example of the tasks created when installing a snap and two components from the store:

task prerequisites (1), Ensure prerequisites for "test-snap" are available
  waiting on:
task download-snap (2), Download snap "test-snap" (11) from channel "channel-for-components"
  waiting on:
  - prerequisites (1)
task validate-snap (13), Fetch and check assertions for snap "test-snap" (11)
  waiting on:
  - download-snap (2)
task download-component (3), Download component "kernel-modules-component" (1)
  waiting on:
  - validate-snap (13)
task validate-component (4), Fetch and check assertions for component "kernel-modules-component" (1)
  waiting on:
  - download-component (3)
task download-component (8), Download component "standard-component" (2)
  waiting on:
  - validate-component (4)
task validate-component (9), Fetch and check assertions for component "standard-component" (2)
  waiting on:
  - download-component (8)
task mount-snap (14), Mount snap "test-snap" (11)
  waiting on:
  - validate-component (9)
task mount-component (5), Mount component "test-snap+kernel-modules-component" (1)
  waiting on:
  - validate-component (4)
  - mount-snap (14)
task mount-component (10), Mount component "test-snap+standard-component" (2)
  waiting on:
  - validate-component (9)
  - mount-component (5)
task copy-snap-data (15), Copy snap "test-snap" data
  waiting on:
  - mount-component (10)
task setup-profiles (16), Setup snap "test-snap" (11) security profiles
  waiting on:
  - copy-snap-data (15)
task link-snap (17), Make snap "test-snap" (11) available to the system
  waiting on:
  - setup-profiles (16)
task link-component (6), Make component "test-snap+kernel-modules-component" (1) available to the system
  waiting on:
  - mount-component (5)
  - link-snap (17)
task link-component (11), Make component "test-snap+standard-component" (2) available to the system
  waiting on:
  - mount-component (10)
  - link-component (6)
task auto-connect (18), Automatically connect eligible plugs and slots of snap "test-snap"
  waiting on:
  - link-component (11)
task set-auto-aliases (19), Set automatic aliases for snap "test-snap"
  waiting on:
  - auto-connect (18)
task setup-aliases (20), Setup snap "test-snap" aliases
  waiting on:
  - set-auto-aliases (19)
task run-hook (21), Run install hook of "test-snap" snap if present
  waiting on:
  - setup-aliases (20)
task run-hook (7), Run install hook of "test-snap+kernel-modules-component" component if present
  waiting on:
  - link-component (6)
  - run-hook (21)
task run-hook (12), Run install hook of "test-snap+standard-component" component if present
  waiting on:
  - link-component (11)
  - run-hook (7)
task prepare-kernel-modules-components (22), Prepare kernel-modules components for "test-snap" (11)
  waiting on:
  - run-hook (12)
task run-hook (23), Run default-configure hook of "test-snap" snap if present
  waiting on:
  - prepare-kernel-modules-components (22)
task start-snap-services (24), Start snap "test-snap" (11) services
  waiting on:
  - run-hook (23)
task run-hook (25), Run configure hook of "test-snap" snap if present
  waiting on:
  - prerequisites (1)
  - download-snap (2)
  - validate-snap (13)
  - download-component (3)
  - validate-component (4)
  - download-component (8)
  - validate-component (9)
  - mount-snap (14)
  - mount-component (5)
  - mount-component (10)
  - copy-snap-data (15)
  - setup-profiles (16)
  - link-snap (17)
  - link-component (6)
  - link-component (11)
  - auto-connect (18)
  - set-auto-aliases (19)
  - setup-aliases (20)
  - run-hook (21)
  - run-hook (7)
  - run-hook (12)
  - prepare-kernel-modules-components (22)
  - run-hook (23)
  - start-snap-services (24)
task run-hook (26), Run health check of "test-snap" snap
  waiting on:
  - prerequisites (1)
  - download-snap (2)
  - validate-snap (13)
  - download-component (3)
  - validate-component (4)
  - download-component (8)
  - validate-component (9)
  - mount-snap (14)
  - mount-component (5)
  - mount-component (10)
  - copy-snap-data (15)
  - setup-profiles (16)
  - link-snap (17)
  - link-component (6)
  - link-component (11)
  - auto-connect (18)
  - set-auto-aliases (19)
  - setup-aliases (20)
  - run-hook (21)
  - run-hook (7)
  - run-hook (12)
  - prepare-kernel-modules-components (22)
  - run-hook (23)
  - start-snap-services (24)
  - run-hook (25)

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.97%. Comparing base (96ea7b0) to head (c262d11).
Report is 35 commits behind head on master.

Files with missing lines Patch % Lines
overlord/snapstate/snapstate.go 85.71% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14697      +/-   ##
==========================================
+ Coverage   78.95%   78.97%   +0.01%     
==========================================
  Files        1084     1085       +1     
  Lines      146638   147155     +517     
==========================================
+ Hits       115773   116210     +437     
- Misses      23667    23720      +53     
- Partials     7198     7225      +27     
Flag Coverage Δ
unittests 78.97% <87.50%> (+0.01%) ⬆️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant