-
Notifications
You must be signed in to change notification settings - Fork 12
fix: subscribe to groups #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Co-authored-by: Leonardo Parente <23251360+leoparente@users.noreply.github.com>
Co-authored-by: Michal Fiedorowicz <michal@codefella.com>
|
Go test coverage
Total coverage: 59.4% |
leoparente
approved these changes
Oct 3, 2025
|
🎉 This PR is included in version 2.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Co-authored-by: Leonardo Parente 23251360+leoparente@users.noreply.github.com
This pull request refactors and extends the fleet configuration manager to improve MQTT topic management, agent group membership handling, and message dispatching. It moves topic template logic into a dedicated file, introduces new message types for group memberships, and updates the agent's capabilities publishing to use labels. The changes also clean up configuration options and enhance logging and error handling.
MQTT topic management and configuration:
fillTopicTemplate,generateTopicsFromTemplate, and topic constants) fromjwt_claims.goto a new filetopics.go, and added a helper for group topic generation. ([[1]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-71ab8d441de75b0ed31030ab188e24913c1de913b419c9958e15bea287c55addR1-R40),[[2]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-e462dde5ad22797f0633447da4325f0b6c054b09248f903a7de98a09e495cdd0L73-L99))AgentIDandMQTTURLfields from theFleetManagerconfig type, ensuring MQTT URL is only taken from the token response. ([[1]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-fa50c62688210fe1e87f900fd800e4984fcda45ea46a9ea08ff29558e33f17dbL42-L43),[[2]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98L133-R148))Agent group membership handling:
GroupMemberships,GroupMembership,RPC,SendGroupMembershipsRequest) to support group membership requests and responses. ([agent/configmgr/messages/fleet_messages.goL87-R110](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-8cf3531ad4e85278f1f915759d83f151021abafa21e10b6f7ce95569537c2543L87-R110))[[1]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98R211-R232),[[2]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98L270-R314),[[3]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98L310-R384))Message dispatching and processing:
RPCstructure, extracting message type and organization ID, and routing group membership messages to their handler. ([[1]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98L226-R255),[[2]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98L310-R384))[agent/configmgr/fleet_test.goL672-R674](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-ffd2e1a25e0d7ade7e270cdffecf1f765962ee97e5883fa8a1cd39efe5c03e7eL672-R674))Capabilities publishing and logging:
AgentLabelsinstead ofAgentTags, and improved logging for publishing actions and errors. ([[1]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-8cf3531ad4e85278f1f915759d83f151021abafa21e10b6f7ce95569537c2543L87-R110),[[2]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98L205-R202),[[3]](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-b0dddd7590e09bc17b468db04b48a21f0d508a17eca4c086eb98c87325e5ba98R211-R232))Miscellaneous cleanup:
testtarget from theMakefile. ([MakefileL57-L60](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L57-L60))jwt_claims.go. ([agent/configmgr/jwt_claims.goL5](https://github.com/netboxlabs/orb-agent/pull/192/files#diff-e462dde5ad22797f0633447da4325f0b6c054b09248f903a7de98a09e495cdd0L5))Let me know if you want to dive deeper into any of these changes!