Skip to content

overlord/state: warnings/notices pruning not persisted - #17698

Open
hpidcock wants to merge 1 commit into
canonical:masterfrom
hpidcock:fix-notice-modified
Open

hpidcock wants to merge 1 commit into
canonical:masterfrom
hpidcock:fix-notice-modified

Conversation

@hpidcock

Copy link
Copy Markdown
Member

This ports a notices (and warnings) pruning persistence fix from pebble.

canonical/pebble#1083

Signed-off-by: Harry Pidcock <harry.pidcock@canonical.com>
@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.38%. Comparing base (a58f499) to head (4c117f1).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17698      +/-   ##
==========================================
- Coverage   82.18%   78.38%   -3.81%     
==========================================
  Files        1407     1419      +12     
  Lines      200453   200791     +338     
  Branches     2503     2503              
==========================================
- Hits       164751   157393    -7358     
- Misses      33759    33967     +208     
- Partials     1943     9431    +7488     
Flag Coverage Δ
unittests 78.38% <100.00%> (-3.81%) ⬇️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Fri Sep 25 00:05:25 UTC 2026
The following results are from: https://github.com/canonical/snapd/actions/runs/35829378693

Test Predictor Analysis

Executing

Test Success %
garden:arch-linux-64:tests/main/snapd-snap:lxd unavailable
garden:debian-12-64:tests/main/snapd-snap:lxd unavailable
garden:debian-sid-64:tests/main/snapd-snap:lxd unavailable
garden:fedora-44-64:tests/main/snapd-snap:lxd unavailable
garden:opensuse-tumbleweed-64:tests/main/snapd-snap:lxd unavailable
garden:opensuse-tumbleweed-selinux-64:tests/main/snapd-snap:lxd unavailable
garden:ubuntu-20.04-64:tests/main/snapd-snap:lxd unavailable
garden:ubuntu-22.04-64:tests/main/snapd-snap:lxd unavailable
garden:ubuntu-24.04-64:tests/main/snapd-snap:lxd unavailable
garden:ubuntu-26.04-64:tests/main/snapd-snap:lxd unavailable
openstack:debian-sid-64:tests/main/snapd-reexec:snapd 🔴 3.0%
openstack:ubuntu-26.10-64:tests/main/snapd-reexec:snapd 🔴 3.0%

Restoring

Test Success %
openstack:debian-sid-64:tests/main/snapd-reexec:snapd 🔴 1.2%
openstack:ubuntu-26.10-64:tests/main/snapd-reexec:snapd 🔴 0.9%

Skipped tests from snapd-testing-skip

If you wish to have any of the below tests run in your PR, in your PR description, add 'unskip:' followed by a copy-and-pasted list of the below tests you wish to run (unskip plus test list must be valid yaml)

  • garden:fedora-44-64:tests/main/network-retry
  • garden:ubuntu-24.04-64:tests/main/apparmor-prompting-support
  • garden:ubuntu-24.04-64:tests/main/auto-refresh-retry
  • garden:ubuntu-24.04-64:tests/main/network-retry
  • garden:ubuntu-26.04-64:tests/main/apparmor-prompting-support
  • garden:ubuntu-26.04-64:tests/main/auto-refresh-retry
  • garden:ubuntu-26.04-64:tests/main/network-retry
  • openstack-arm:ubuntu-24.04-arm-64:tests/main/i18n
  • openstack-arm:ubuntu-24.04-arm-64:tests/main/interfaces-location-control
  • openstack-arm:ubuntu-core-24-arm-64:tests/main/i18n
  • openstack:amazon-linux-2023-64:tests/main/interfaces-location-control
  • openstack:arch-linux-64:tests/main/interfaces-location-control
  • openstack:centos-9-64:tests/main/interfaces-location-control
  • openstack:debian-12-64:tests/main/interfaces-location-control
  • openstack:debian-sid-64:tests/main/interfaces-location-control
  • openstack:debian-sid-64:tests/main/interfaces-network-status-classic
  • openstack:debian-sid-64:tests/main/interfaces-xdg-portal-permission-store
  • openstack:fedora-44-64:tests/main/interfaces-location-control
  • openstack:fedora-44-64:tests/main/network-retry
  • openstack:opensuse-16.0-64:tests/main/interfaces-location-control
  • openstack:opensuse-tumbleweed-64:tests/main/interfaces-location-control
  • openstack:opensuse-tumbleweed-selinux-64:tests/main/interfaces-location-control
  • openstack:ubuntu-16.04-64:tests/main/interfaces-location-control
  • openstack:ubuntu-18.04-64:tests/main/interfaces-location-control
  • openstack:ubuntu-20.04-64:tests/main/interfaces-location-control
  • openstack:ubuntu-22.04-64:tests/main/interfaces-location-control
  • openstack:ubuntu-24.04-64:tests/main/apparmor-prompting-flag-restart
  • openstack:ubuntu-24.04-64:tests/main/apparmor-prompting-integration-tests
  • openstack:ubuntu-24.04-64:tests/main/apparmor-prompting-prompt-restoration
  • openstack:ubuntu-24.04-64:tests/main/apparmor-prompting-smoke
  • openstack:ubuntu-24.04-64:tests/main/apparmor-prompting-snapd-startup
  • openstack:ubuntu-24.04-64:tests/main/apparmor-prompting-support
  • openstack:ubuntu-24.04-64:tests/main/auto-refresh-retry
  • openstack:ubuntu-24.04-64:tests/main/i18n
  • openstack:ubuntu-24.04-64:tests/main/interfaces-location-control
  • openstack:ubuntu-24.04-64:tests/main/interfaces-requests-activates-handlers
  • openstack:ubuntu-24.04-64:tests/main/network-retry
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-flag-restart
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-integration-tests
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-prompt-restoration
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-smoke
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-snapd-startup
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-support
  • openstack:ubuntu-26.04-64:tests/main/auto-refresh-retry
  • openstack:ubuntu-26.04-64:tests/main/i18n
  • openstack:ubuntu-26.04-64:tests/main/interfaces-location-control
  • openstack:ubuntu-26.04-64:tests/main/interfaces-requests-activates-handlers
  • openstack:ubuntu-26.04-64:tests/main/network-retry
  • openstack:ubuntu-26.10-64:tests/main/apparmor-prompting-flag-restart
  • openstack:ubuntu-26.10-64:tests/main/apparmor-prompting-integration-tests
  • openstack:ubuntu-26.10-64:tests/main/apparmor-prompting-prompt-restoration
  • openstack:ubuntu-26.10-64:tests/main/apparmor-prompting-smoke
  • openstack:ubuntu-26.10-64:tests/main/apparmor-prompting-snapd-startup
  • openstack:ubuntu-26.10-64:tests/main/apparmor-prompting-support
  • openstack:ubuntu-26.10-64:tests/main/interfaces-location-control
  • openstack:ubuntu-26.10-64:tests/main/interfaces-requests-activates-handlers

@ndyer
ndyer requested review from natibek and olivercalder and a balanced review from Copilot September 23, 2026 09:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused fix correctly updates state modification tracking and includes regression coverage for both affected collections.

Review effort: Balanced
Findings: None

What changed in this PR

Ensures pruned warnings and notices are persisted during state checkpointing.

Changes:

  • Mark state modified when expired warnings or notices are removed.
  • Add regression tests verifying checkpoint persistence.
File Description
overlord/​state/​state.go Marks pruning mutations for checkpointing.
overlord/​state/​warning_test.go Tests persisted warning pruning.
overlord/​state/​notices_test.go Tests persisted notice pruning.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@natibek natibek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks!

@olivercalder olivercalder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed, LGTM. Thanks!

@github-actions github-actions Bot added the Auto rerun spread Auto reruns spread up to 4 times in non-draft PRs w/ >=1 approval and <20 fails in any fund. system label Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto rerun spread Auto reruns spread up to 4 times in non-draft PRs w/ >=1 approval and <20 fails in any fund. system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants