Repository navigation
fix: preserve zero user and group IDs when merging Pebble exec checks - #2867
Merged
tonyandrewmeyer merged 3 commits intoNov 10, 2026
Merged
Conversation
tonyandrewmeyer
approved these changes
Nov 8, 2026
tonyandrewmeyer
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for this. Please fix the failing type check, and put in the issue number in the description to link the PR to the issue.
james-garner-canonical
approved these changes
Nov 9, 2026
james-garner-canonical
left a comment
Contributor
There was a problem hiding this comment.
Thanks. A suggestion on how to resolve the type checker issue.
Co-authored-by: James Garner <[email protected]>
This was referenced Nov 9, 2026
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.
Fixes #2881
Check._merge_execskipped falsy values, so an override layer that sets an exec check'suser-id: 0orgroup-id: 0(root) kept the previous IDs. Pebble'sExecCheck.Mergeonly skips nil IDs (if other.UserID != nil), so the plan merged by Harness andops.testingdiffered from the real one.This treats only
Noneas unset for the execuser-idandgroup-id, the same approach #2847 took for services. Other exec fields keep the current behaviour.Test:
TestCheck.test_merge_exec_zero_idsintest/test_pebble.pymerges a layer with zero IDs over one with 1000/2000 (expects 0/0), then merges a layer without IDs (expects 0/0 to stay). It fails on main.