-
Notifications
You must be signed in to change notification settings - Fork 19
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
machine registration connectivity rework - part III #143
Conversation
Codecov Report
@@ Coverage Diff @@
## main #143 +/- ##
==========================================
- Coverage 33.77% 24.88% -8.90%
==========================================
Files 5 5
Lines 379 422 +43
==========================================
- Hits 128 105 -23
- Misses 246 313 +67
+ Partials 5 4 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
fdc9a1b
to
0be6b68
Compare
} | ||
err = SendJSONData(conn, MsgSmbios, data) | ||
if err != nil { | ||
return fmt.Errorf("sending SMBIOS data: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would add debug in here with the data that failed to send in case we find some strange data or broken data (hit: litter.sdump will nicely print it instead of getting a terrible string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, nice advice the linter package 😄
done! also for the labels... not needed as much as the SMBIOS data (labels are much more under control) but why not? 😁
} | ||
|
||
switch msgType { | ||
case register.MsgSmbios: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a-we-some!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
freaking awesome!
Unfortunately, keeping both backwards and forwards compat seems kind of difficult IMO, I would just break and cut 0.5.0 directly now that we can and this seems more future proof in case we want to change something in the workflow like adding more stuff. Really nice job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice
Even if it would be reasonable to keep both I don't think it is a good idea. If breaking changes are convenient in the elemental-operator to make the node-server communication robust now it is the time. Later on it will be harder to make breaking changes, now it is a good time to get rid of the most prominent tech debt. |
0be6b68
to
550cc7e
Compare
rebased on main branch. Also added unit-test coverage for the websocket rework. |
550cc7e
to
dfd2001
Compare
We already had a deadline on the operator side: add to the registering client to. Share websocket configuration options as we will soon need it for establishing a common protocol. Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
We are going to rework the communication protocol, making full use of the bidirectional websocket we set up. Here we introduce some helper functions that will make the communication easier. Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
This commit changes the communication protocol between the operator and the elemental-register client in order to take full advantage of the websocket connection: SMBIOS data and labels are now passed via the websocket channel. The protocol is now extensible and could be easily extended to pass arbitrary data or request different kind of services to the operator. This commit breaks backwards compatibility with older operators and elemental-register clients. Fixes #5 Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
remove old code passing data via HTTP labels Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
c7935cf
to
7c2b260
Compare
meeeeeerge! |
Can't wait for a v0.5.0 🤣 |
🤣 |
This PR changes the communication protocol between the operator and the elemental-register client in order to take full advantage of the websocket connection: SMBIOS data and labels are now passed via the websocket channel.
The protocol is extensible and could be easily extended to pass arbitrary data or request different kind of services to the operator.
Protocol discussion: #152
The change breaks backward compatibility with older operators and elemental-register clients.
Fixes #5