Repository navigation
fix(launcher): verify service tags after the launcher PATCH - #60
Merged
Merged
Conversation
The launcher stages for mxl, nmos-cpp and nmos-crosspoint now write service tags through one shared task. It PATCHes the tags, reads the service back, and fails when the owned tag set on the record differs from the set it wrote. A concurrent change to owned tags after the PATCH becomes a loud failure instead of a silent wrong result. A tag change between the stage read and the PATCH is still lost, because NetBox v4.5.0 has no conditional writes. A test documents that limitation, and dmfdeploy/dmfdeploy#835 tracks closing it with NetBox If-Match after the NetBox 4.6 upgrade. Closes dmfdeploy/dmfdeploy#255 Claude-Session: https://claude.ai/code/session_01Rq1iSvhmEwbNUF43rtXVY4 Signed-off-by: znerol2 <6800371+znerol2@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The launcher stages for mxl, nmos-cpp and nmos-crosspoint now write NetBox service tags through one shared task,
roles/netbox_catalog_common/tasks/patch_service_tags_verified.yml. The task:This way, a concurrent change to owned tags after the PATCH becomes a loud failure instead of a silent wrong result.
Known limitation
A tag change between the stage read and the PATCH is still lost, and the task passes. Closing that gap needs a conditional write, and NetBox v4.5.0, the version the platform runs, has none. Scenario 5 of the new test documents the limitation, so a change that closes the gap has to flip that expectation on purpose. dmfdeploy/dmfdeploy#835 tracks using NetBox If-Match after the NetBox 4.6 upgrade.
Tests
tests/service-tag-patch-verified.yml, wired into CI. It runs the real task against the stub NetBox, which can inject a second writer after the PATCH. It fails on the old bare-PATCH behavior at scenario 2.bin/check-review-comments.shall pass.Closes dmfdeploy/dmfdeploy#255