Skip to content

o/devicemgmtstate: add task to queue response messages#16656

Open
st3v3nmw wants to merge 3 commits intocanonical:masterfrom
st3v3nmw:add-queue-mgmt-response-task
Open

o/devicemgmtstate: add task to queue response messages#16656
st3v3nmw wants to merge 3 commits intocanonical:masterfrom
st3v3nmw:add-queue-mgmt-response-task

Conversation

@st3v3nmw
Copy link
Member

@st3v3nmw st3v3nmw commented Feb 24, 2026

This PR implements the queue-mgmt-response task. Once a message has been applied (or rejected before reaching the subsystem), this task builds a signed response-message and queues it for transmission on the next store exchange.

For messages with a subsystem change, the task retries until the change completes, then calls the handler's BuildResponse to produce the response body and status. For messages that were rejected or not authorized before dispatch, the response is built directly from ResponseStatus & ResponseReason on the RequestMessage.

Split from #16248. Because the dispatch task is still in review, this PR shares sfrom code with #16547.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 82.60870% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.51%. Comparing base (6d2e38e) to head (3e69d61).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
overlord/devicemgmtstate/devicemgmtmgr.go 82.60% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16656      +/-   ##
==========================================
- Coverage   77.57%   77.51%   -0.07%     
==========================================
  Files        1347     1353       +6     
  Lines      186281   186436     +155     
  Branches     2449     2449              
==========================================
+ Hits       144502   144509       +7     
- Misses      33044    33183     +139     
- Partials     8735     8744       +9     
Flag Coverage Δ
unittests 77.51% <82.60%> (-0.07%) ⬇️

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.

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

@github-actions
Copy link

github-actions bot commented Feb 24, 2026

Wed Feb 25 15:14:36 UTC 2026
The following results are from: https://github.com/canonical/snapd/actions/runs/22390546512

Failures:

Executing:

  • openstack:arch-linux-64:tests/main/interface-allow-auto-connection:unset
  • openstack:ubuntu-core-20-64:tests/main/snap-pack
  • openstack:ubuntu-25.10-64:tests/main/apparmor-prompting-flag-restart
  • openstack:ubuntu-25.10-64:tests/main/prepare-image-components
  • openstack:ubuntu-24.04-64:tests/unit/go:gcc

Restoring:

  • openstack:ubuntu-25.10-64:tests/main/apparmor-prompting-flag-restart
  • openstack:ubuntu-25.10-64:tests/main/
  • openstack:ubuntu-25.10-64:
  • openstack:ubuntu-25.10-64:tests/main/prepare-image-components
  • openstack:ubuntu-25.10-64:tests/main/
  • openstack:ubuntu-25.10-64:

Skipped tests from snapd-testing-skip

  • openstack:ubuntu-24.04-64:tests/main/i18n

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