Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENG-8624 fix operating_system_version/operating_system mismatch (tink…
…erbell#275) Signed-off-by: Kelly Deng <kelly@packet.com> ## 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). ## 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. Related PR: tinkerbell/smee#104 <!--- Link to issue you have raised --> Fixes: # ## 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. --> To be 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. --> Existing users who import the `packet.pb.go` will have to `go get` latest master of the tink repo. ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information