-
Notifications
You must be signed in to change notification settings - Fork 137
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
ENG-8624 fix operating_system_version/operating_system mismatch #275
Conversation
Codecov Report
@@ Coverage Diff @@
## master #275 +/- ##
=======================================
Coverage 24.74% 24.74%
=======================================
Files 14 14
Lines 1277 1277
=======================================
Hits 316 316
Misses 940 940
Partials 21 21 Continue to review full report at Codecov.
|
Is this a bc break? How does it impact users? Can we add a bit more context to this pull request in the description? |
@kdeng3849 Can you rebase this and update with the latest protos/protoc.sh (presumably this should result in a smaller diff, especially if the containerized protoc is used). To @gianarb's point, can we offer both |
1cb7f3c
to
9acbde3
Compare
@displague I'm not sure if that makes sense because the I guess we could offer both for backward compatibility, but I don't think many people were using the code generated from the packet proto to begin with? And I also think |
9acbde3
to
f80766b
Compare
This isn't really a bc-break as packet.proto is not supported in the oss project. Its being used by one internal client that is currently broken and needs this PR so it works. Either way, packet.proto should be replaced and actually be usable by tinkerbell/proposals#25 |
f80766b
to
6ce4660
Compare
## Description <!--- Please describe what this PR is going to change --> This PR fixes the mismatch in field names [`operating_system_version`](https://github.com/tinkerbell/tink/blob/master/protos/packet/packet.proto#L86) vs [`operating_system`](https://github.com/tinkerbell/hegel/blob/a3138d417536903dcdedd674d634e13ebc19fc79/http_handlers.go#L33). v2 of #104 ## Why is this needed This bug mainly affects the users who needs both the `packet.pb.go` and the EC2 endpoint. Because the EC2 endpoint in Hegel uses the field name `operating_system` to be backwards compatible with Kant, users using the `Metadata` object defined in `packet.pb.go` will face a problem with parsing the operating system field since it was defined as `operating_system_version` there. The reason for the mismatch is because in the "old" cacher mode, `operating_system_version`, but Kant uses `operating_system` (which we have to be backwards compatible with) so we decided move away from `operating_system_version` and go with `operating_system` for "tink mode". A user could have worked around this by specifying two fields `operating_system` and `operating_system_version` with the same value, inside the same piece of hardware, but this introduces some redundancy and just isn't ideal. <!--- Link to issue you have raised --> Related PR: tinkerbell/tink#275 ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Manually tested ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> N/A ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
Signed-off-by: Kelly Deng <[email protected]>
05b8b92
to
df9951b
Compare
Signed-off-by: Kelly Deng [email protected]
Description
This PR fixes the mismatch in field names
operating_system_version
vsoperating_system
.Why is this needed
This bug mainly affects the users who needs both the
packet.pb.go
and the EC2 endpoint. Because the EC2 endpoint in Hegel uses the field nameoperating_system
to be backwards compatible with Kant, users using theMetadata
object defined inpacket.pb.go
will face a problem with parsing the operating system field since it was defined asoperating_system_version
there.The reason for the mismatch is because in the "old" cacher mode,
operating_system_version
, but Kant usesoperating_system
(which we have to be backwards compatible with) so we decided move away fromoperating_system_version
and go withoperating_system
for "tink mode".A user could have worked around this by specifying two fields
operating_system
andoperating_system_version
with the same value, inside the same piece of hardware, but this introduces some redundancy and just isn't ideal.Related PR: tinkerbell/smee#104
Fixes: #
How Has This Been Tested?
To be manually tested
How are existing users impacted? What migration steps/scripts do we need?
Existing users who import the
packet.pb.go
will have togo get
latest master of the tink repo.Checklist:
I have: