Skip to content

fix(updateengine): return AddMatch error - #35

Merged
tormath1 merged 1 commit into
flatcar:flatcar-masterfrom
SSOHEB:fix/updateengine-addmatch-error
Aug 13, 2026
Merged

fix(updateengine): return AddMatch error#35
tormath1 merged 1 commit into
flatcar:flatcar-masterfrom
SSOHEB:fix/updateengine-addmatch-error

Conversation

@SSOHEB

@SSOHEB SSOHEB commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes incorrect error handling when registering the updateengine D-Bus signal match.

updateengine.New() currently checks call.Err after AddMatch(), but returns the earlier err variable instead. At this point err is nil because Hello() has already succeeded.

As a result, if AddMatch() fails, New() can return (nil, nil). The caller checks the returned error and proceeds with the nil client, which can subsequently be dereferenced.

This change returns the actual call.Err to the caller.

Testing done

  • go test ./...
  • git diff --check

All tests pass.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Signed-off-by: SOHEB <shaykhsuhaib7@gmail.com>
@SSOHEB
SSOHEB requested a review from a team as a code owner August 13, 2026 11:29

@tormath1 tormath1 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.

Thanks.

@tormath1
tormath1 merged commit 9383c62 into flatcar:flatcar-master Aug 13, 2026
2 checks passed
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