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

Fix snap refresh verification job dependency (bugfix) #1519

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

pieqq
Copy link
Collaborator

@pieqq pieqq commented Oct 1, 2024

Description

When implementing changes for the gadget/snapd/kernel snap refresh, one of the job dependencies was not updated properly.

The snapd/reboot-after-snap-refresh-{type}-{name}-to-stable-rev job does not exist anymore, so the
snapd/snap-verify-after-refresh-{type}-{name}-to-stable-rev should depend on the refresh job itself (which was modified in the aforementioned PR to do the reboot itself).

Resolved issues

An issue that showed up while testing a customer project:

https://certification.canonical.com/hardware/202302-31257/submission/393904/test-results/?term=cascade-kernel-to-base-rev

See discussion on MM for more information.

Documentation

Tests

Running checkbox-cli list-bootstrapped com.canonical.certification::snap-refresh-revert on my laptop yield the following results:

Before this patch:

com.canonical.certification::snap_revision_info
com.canonical.certification::snapd/snap-refresh-snapd-snapd-to-base-rev
com.canonical.certification::snapd/log-attach-after-snap-refresh-snapd-snapd-to-base-rev
com.canonical.certification::snapd/snap-verify-after-refresh-snapd-snapd-to-base-rev
com.canonical.certification::snapd/snap-revert-snapd-snapd-from-base-rev
com.canonical.certification::snapd/log-attach-after-snap-revert-snapd-snapd-from-base-rev
com.canonical.certification::snapd/snap-verify-after-revert-snapd-snapd-from-base-rev
com.canonical.certification::snapd/snap-refresh-snapd-snapd-to-stable-rev
com.canonical.certification::snapd/log-attach-after-snap-refresh-snapd-snapd-to-stable-rev

After this patch:

com.canonical.certification::snap_revision_info
com.canonical.certification::snapd/snap-refresh-snapd-snapd-to-base-rev
com.canonical.certification::snapd/log-attach-after-snap-refresh-snapd-snapd-to-base-rev
com.canonical.certification::snapd/snap-verify-after-refresh-snapd-snapd-to-base-rev
com.canonical.certification::snapd/snap-revert-snapd-snapd-from-base-rev
com.canonical.certification::snapd/log-attach-after-snap-revert-snapd-snapd-from-base-rev
com.canonical.certification::snapd/snap-verify-after-revert-snapd-snapd-from-base-rev
com.canonical.certification::snapd/snap-refresh-snapd-snapd-to-stable-rev
com.canonical.certification::snapd/log-attach-after-snap-refresh-snapd-snapd-to-stable-rev
com.canonical.certification::snapd/snap-verify-after-refresh-snapd-snapd-to-stable-rev
com.canonical.certification::snapd/snap-revert-snapd-snapd-from-stable-rev
com.canonical.certification::snapd/log-attach-after-snap-revert-snapd-snapd-from-stable-rev
com.canonical.certification::snapd/snap-verify-after-revert-snapd-snapd-from-stable-rev

(the last 4 jobs are now present that are verifying the snap after an update to stable channel, and then running extra revert and verification steps)

When implementing changes for the gadget/snapd/kernel snap refresh[1],
one of the job dependencies was not updated properly.

The `snapd/reboot-after-snap-refresh-{type}-{name}-to-stable-rev` job
does not exist anymore, so the
`snapd/snap-verify-after-refresh-{type}-{name}-to-stable-rev` should
depend on the refresh job itself (which was modified in the
aforementioned PR to do the reboot itself)

[1]: #1124
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.56%. Comparing base (2605982) to head (f939731).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1519   +/-   ##
=======================================
  Coverage   47.56%   47.56%           
=======================================
  Files         369      369           
  Lines       39596    39596           
  Branches     6691     6691           
=======================================
  Hits        18833    18833           
  Misses      20051    20051           
  Partials      712      712           
Flag Coverage Δ
provider-base 24.04% <ø> (ø)

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.

Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

+1, LGTM

@Hook25 Hook25 merged commit 6a3e3c1 into main Oct 1, 2024
43 checks passed
@Hook25 Hook25 deleted the snapd-fix-reboot-dependency branch October 1, 2024 08:02
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.

2 participants