Closed cfergeau closed 6 months ago
@BlackHole1: changing LGTM is restricted to collaborators
The only concern I have is that if we add new devices in the future, we need to make sure to add corresponding test cases in
jsonStabilityTests
. There is a possibility that we might forget to do so.
Yes, hopefully this won't happen too often. I've tried to find a programmatic way of listing all the types defined in pkg/config
, but this does not seem trivial unfortunately. I suspect something is doable with https://pkg.go.dev/go/types and maybe https://pkg.go.dev/go/importer.
I suspect something is doable with https://pkg.go.dev/go/types and maybe https://pkg.go.dev/go/importer.
It seems a bit complicated, we can consider putting it on hold for now and reevaluate if we encounter this issue in the future.
/lgtm /approve
/approve (adding approved label after Kevin's and Praveen's reviews)
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: BlackHole1, cfergeau, praveenkumar
The full list of commands accepted by this bot can be found here.
The pull request process is described here
We don't want the JSON serialization of pkg/config/ data structures to change between releases. This commit makes use of the
reflect
package to test the JSON serialization of as many fields as possible. If one of these field change, the test will make us aware of it. We still need to explicitly list the types to be tested (ie the types which can be serialized to JSON).