Skip to content
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

TestCodecGPBBasic fails #11

Open
remingtonc opened this issue May 18, 2019 · 4 comments
Open

TestCodecGPBBasic fails #11

remingtonc opened this issue May 18, 2019 · 4 comments
Assignees
Labels
bug Something isn't working test

Comments

@remingtonc
Copy link
Contributor

TestCodecGPBBasic fails due to different produced and verification data. Produced data includes data_gpb:<nil> and data_gpbkv:[] whereas the verification data does not include these fields. This is likely due to the samples being compared directly from pure JSON as compared to serializing via Telemetry proto which does contain these fields.

569,571c569
< collection_end_time:1.471794103839e+12 collection_id:111814 collection_start_time:1.471794103827e+12 data_gpb:<nil> data_gpbkv:[] encoding_path:Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization msg_timestamp:1.471794103827e+12 node_id_str:uut subscription_id_str:test]
---
> collection_end_time:1.471794103839e+12 collection_id:111814 collection_start_time:1.471794103827e+12 encoding_path:Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization msg_timestamp:1.471794103827e+12 node_id_str:uut subscription_id_str:test]

Trying to determine which should be correct...

@remingtonc remingtonc added the bug Something isn't working label May 18, 2019
@remingtonc remingtonc self-assigned this May 18, 2019
@remingtonc
Copy link
Contributor Author

This test passes in the original bigmuddy repo and the testdata and test itself is the same - this is a failure introduced in this repo.

@BenderScript
Copy link
Collaborator

Very interesting. Does the old repo test against recent Go versions? Looking at your description this issue seems like something related to JSON tags such asomitempty.

@remingtonc
Copy link
Contributor Author

remingtonc commented May 23, 2019

This does appear to be due to the updated vendor dependencies. Copying the vendor/ folder from this project to original pipeline repository yields the same failures.
The crux of the failure is this inclusion: data_gpb:<nil> data_gpbkv:[]
The proto: https://github.com/cisco-ie/pipeline-gnmi/blob/master/vendor/github.com/cisco/bigmuddy-network-telemetry-proto/proto_go/telemetry.pb.go#L85-L89
Should these fields be in the output?

@BenderScript
Copy link
Collaborator

These values should not be there if marshaled correctly. Interestingly these are the only pointers in the struct and although the definition of empty should be straightforward these are very nested custom types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Projects
None yet
Development

No branches or pull requests

2 participants