Skip to content

chore(pcap-tests): regenerate json for preserve_order - #9

Merged
riccardo-negri merged 1 commit into
network-analytics:mainfrom
rodonile:udp-notif-preserve-order
Jul 28, 2026
Merged

chore(pcap-tests): regenerate json for preserve_order#9
riccardo-negri merged 1 commit into
network-analytics:mainfrom
rodonile:udp-notif-preserve-order

Conversation

@rodonile

Copy link
Copy Markdown
Member

Changes:

  • Regenerated all *-udp-notif.json and *-udp-notif-decoded.json files

The existing expected json files (*-udp-notif.json) were last generated before the
pcap-decoder crate was added to the workspace. In that crate we enabled
serde_json/preserve_order feature, which Cargo unifies across the entire
workspace build.

No logic was changed, only json reordering of the elements in jsons.

Copilot AI review requested due to automatic review settings July 28, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the expected UDP notification JSON fixture outputs used by the pcap-based tests to reflect deterministic key ordering after enabling serde_json/preserve_order across the workspace (via Cargo feature unification), without changing underlying decoded values.

Changes:

  • Regenerated expected *-udp-notif.json fixtures to match preserved key ordering.
  • Regenerated expected *-udp-notif-decoded.json fixtures with the same data but reordered object keys.
  • Normalized ordering inside nested objects (e.g., envelope fields, counters, yang-patch structures) for stable comparisons.

Reviewed changes

Copilot reviewed 6 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
assets/pcaps/udp-notif/ietf-122/6wind-vsr-yang-push-20250305-1133-receiver-cbor-udp-notif.json Reordered JSON object keys in expected CBOR UDP-notif messages (no value changes).
assets/pcaps/udp-notif/ietf-122/6wind-vsr-yang-push-20250305-1133-receiver-cbor-udp-notif-decoded.json Reordered JSON keys in decoded expected output for the same CBOR capture.
assets/pcaps/udp-notif/ietf-122/6wind-vsr-yang-push-20250304-0811-receiver-json-udp-notif-decoded.json Reordered JSON keys in decoded expected output for JSON-encoded capture (e.g., counters/name ordering).
assets/pcaps/udp-notif/ietf-121/n7-sa1_yang-push-udp-notif.json Reordered JSON keys in expected raw UDP-notif messages (e.g., publisher_id placement, push-update field ordering).
assets/pcaps/udp-notif/ietf-121/n7-sa1_yang-push-udp-notif-decoded.json Reordered JSON keys in decoded expected output for the same capture.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@riccardo-negri
riccardo-negri force-pushed the udp-notif-preserve-order branch from 8fa7d9a to e4c57af Compare July 28, 2026 13:33
Copilot AI review requested due to automatic review settings July 28, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 16 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

assets/pcaps/udp-notif/ietf-121/n7-sa1_yang-push-udp-notif.json:1

  • This fixture change is not just a key reordering: id and ietf-yp-observation:* are now nested under ietf-yang-push:push-update (instead of being sibling fields on the ietf-notification:notification object in the previous expected JSON). That is a schema/structure change that could affect consumers/tests, and it contradicts the PR description (“only json reordering”). Please confirm this nesting change is intended (i.e., it matches current encoder output); otherwise regenerate with the prior structure or update the generator to preserve the old nesting.
{"media_type":"YangDataJson","publisher_id":3244032291,"message_id":36,"options":{},"payload":{"ietf-notification:notification":{"eventTime":"2024-11-02T17:49:28.572Z","ietf-notification:sysName":"N7-SA1","ietf-notification:sequenceNumber":36,"ietf-yang-push:push-update":{"id":0,"ietf-yp-observation:timestamp":"2024-11-02T17:49:28.572Z","ietf-yp-observation:point-in-time":"current-accounting","datastore-contents":{"Cisco-IOS-XR-telemetry-model-driven-oper:telemetry-model-driven":{"subscriptions":{"subscription":[{"subscription-id":"xr-telemetry","subscription":{"id":"xr-telemetry","state":"not-active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-default","sensor-profile":[{"sensor-group":{"id":"xr-telemetry","configured":1,"sensor-path":[{"path":"Cisco-IOS-XR-telemetry-model-driven-oper:telemetry-model-driven/subscriptions","state":true}]},"sample-interval":120000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"subscription-id":"1","send-retry":0,"send-retry-duration":0}},{"subscription-id":"NDO-Assurance","subscription":{"id":"NDO-Assurance","state":"not-active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-default","sensor-profile":[{"sensor-group":{"id":"NDO-Assurance","configured":1,"sensor-path":[{"path":"Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization","state":true},{"path":"Cisco-IOS-XR-nto-misc-oper:memory-summary/nodes/node/summary","state":true},{"path":"Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/label-summary","state":true},{"path":"Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters","state":false,"status-str":"Invalid sensor path"},{"path":"Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/data-rate/bandwidth","state":false,"status-str":"Invalid sensor path"}]},"sample-interval":60000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"subscription-id":"2","send-retry":0,"send-retry-duration":0}},{"subscription-id":"EASy_dev_DialIn","subscription":{"id":"EASy_dev_DialIn","state":"not-active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-default","sensor-profile":[{"sensor-group":{"id":"EASy_dev_qos","configured":1,"sensor-path":[{"path":"Cisco-IOS-XR-qos-ma-oper:qos/interface-table/interface/input","state":true},{"path":"Cisco-IOS-XR-qos-ma-oper:qos/interface-table/interface/output","state":true}]},"sample-interval":30000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"subscription-id":"3","send-retry":0,"send-retry-duration":0}},{"subscription-id":"predmaint-vm-pm2","subscription":{"id":"predmaint-vm-pm2","state":"not-active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-default","sensor-profile":[{"sensor-group":{"id":"PrM_envmon","configured":1,"sensor-path":[{"path":"Cisco-IOS-XR-sysadmin-asr9k-envmon-ui:environment/oper/fan/location/fan_attributes","state":true},{"path":"Cisco-IOS-XR-sysadmin-asr9k-envmon-ui:environment/oper/power/location/pem_attributes","state":true},{"path":"Cisco-IOS-XR-sysadmin-asr9k-envmon-ui:environment/oper/current/location/sensor_attributes","state":true},{"path":"Cisco-IOS-XR-sysadmin-asr9k-envmon-ui:environment/oper/voltages/location/sensor_attributes","state":true},{"path":"Cisco-IOS-XR-sysadmin-asr9k-envmon-ui:environment/oper/temperatures/location/sensor_attributes","state":true}]},"sample-interval":60000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"destination-grp":[{"id":"pipeline-pm-vm","configured":1,"destination":[{"id":"2002","sub-id-str":"predmaint-vm-pm","dest-ip-address":{"ip-type":"ipv4","ipv4-address":"80.150.13.46"},"dest-port":10009,"encoding":"self-describing-gpb","transport":"tcp","vrf-id":0,"state":"dest-not-active","udp-mtu":0,"tls":0,"total-num-of-packets-sent":"0","total-num-of-bytes-sent":"0","last-collection-time":"0","dscp":0,"maximum-tokens":4000,"cadence-tokens":750,"event-tokens":750,"pending-queue-size":0,"pending-events":0,"processed-events":"0","collection-tokens":0,"pending-queue-memory-size":0,"send-channel-full-count":0,"channel-full-send-retries":0,"channel-full-send-retry-time":"0","sent-rib-messages":"0","last-sent-rib-message-time":"0","received-rib-messages":"0","last-received-rib-message-time":"0"}]}],"subscription-id":"4","send-retry":0,"send-retry-duration":0}},{"subscription-id":"predmaint-vm-pm3","subscription":{"id":"predmaint-vm-pm3","state":"not-active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-default","sensor-profile":[{"sensor-group":{"id":"PrM_inventory","configured":1,"sensor-path":[{"path":"Cisco-IOS-XR-plat-chas-invmgr-ng-oper:platform-inventory/racks/rack/slots/slot/cards/card/attributes/basic-info","state":false,"status-str":"Module 'Cisco-IOS-XR-plat-chas-invmgr-ng-oper' not recognized or supported for the specified operation"}]},"sample-interval":300000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"destination-grp":[{"id":"pipeline-pm-vm","configured":1,"destination":[{"id":"2002","sub-id-str":"predmaint-vm-pm","dest-ip-address":{"ip-type":"ipv4","ipv4-address":"80.150.13.46"},"dest-port":10009,"encoding":"self-describing-gpb","transport":"tcp","vrf-id":0,"state":"dest-not-active","udp-mtu":0,"tls":0,"total-num-of-packets-sent":"0","total-num-of-bytes-sent":"0","last-collection-time":"0","dscp":0,"maximum-tokens":4000,"cadence-tokens":750,"event-tokens":750,"pending-queue-size":0,"pending-events":0,"processed-events":"0","collection-tokens":0,"pending-queue-memory-size":0,"send-channel-full-count":0,"channel-full-send-retries":0,"channel-full-send-retry-time":"0","sent-rib-messages":"0","last-sent-rib-message-time":"0","received-rib-messages":"0","last-received-rib-message-time":"0"}]}],"subscription-id":"5","send-retry":0,"send-retry-duration":0}},{"subscription-id":"EASy_dev_DIsensors","subscription":{"id":"EASy_dev_DIsensors","state":"not-active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-default","sensor-profile":[{"sensor-group":{"id":"EASy_dev_Sensoren","configured":1,"sensor-path":[{"path":"openconfig-bgp:bgp/neighbors/neighbor/state","state":false,"status-str":"ERR:Cannot resolve path openconfig-bgp:bgp/neighbors/neighbor/state"},{"path":"Cisco-IOS-XR-invmgr-oper:inventory/entities/entity","state":true},{"path":"Cisco-IOS-XR-procmem-oper:processes-memory/nodes/node","state":true},{"path":"Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization","state":true},{"path":"Cisco-IOS-XR-nto-misc-oper:memory-summary/nodes/node/summary","state":true},{"path":"Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/label-summary","state":true},{"path":"Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters","state":false,"status-str":"Invalid sensor path"}]},"sample-interval":60000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"subscription-id":"6","send-retry":0,"send-retry-duration":0}},{"subscription-id":"yang-push-0","subscription":{"id":"yang-push-0","state":"active","source-interface":{"interface-name":"Loopback0","state":true,"ipv4-address":"62.157.222.248","ipv6-address":"::","vrf-id":1610612736},"source-qos-marking":"dscp-cs6","sensor-profile":[{"sensor-group":{"id":"yang-push-0","configured":1,"sensor-path":[{"path":"Cisco-IOS-XR-telemetry-model-driven-oper:telemetry-model-driven/subscriptions","state":true}]},"sample-interval":30000,"heartbeat-interval":0,"suppress-redundant":false,"incremental-updates":false}],"destination-grp":[{"id":"yang-push-0","configured":1,"destination":[{"id":"2003","sub-id-str":"yang-push-0","dest-ip-address":{"ip-type":"ipv4","ipv4-address":"51.1.65.19"},"dest-port":57499,"encoding":"json","transport":"udp","vrf-id":0,"state":"dest-active","udp-mtu":0,"tls":0,"total-num-of-packets-sent":"327","total-num-of-bytes-sent":"376083","last-collection-time":"1730569736180978561","dscp":0,"maximum-tokens":4000,"token-processed-time":"2024-11-02 17:44:56.179978 +0000","cadence-tokens":664,"cadence-token-advertised-time":"2024-11-02 17:44:56.181978 +0000","event-tokens":750,"event-token-advertised-time":"2024-11-02 17:44:56.180978 +0000","pending-queue-size":0,"pending-events":0,"processed-events":"0","collection-tokens":544,"collection-detail":[{"subscription-id":"1","sysdb-path":"/oper/mdt/gl/subs/stats/*","in-progress":true,"create-time":"2024-11-02 17:49:26.177978 +0000","start-time":"2024-11-02 17:49:26.177978 +0000","token-receive-time":"2024-11-02 17:49:26.177978 +0000"}],"pending-queue-memory-size":0,"send-channel-full-count":0,"channel-full-send-retries":0,"channel-full-send-retry-time":"0","sent-rib-messages":"0","last-sent-rib-message-time":"0","received-rib-messages":"0","last-received-rib-message-time":"0"}]}],"subscription-id":"7","send-retry":0,"send-retry-duration":0},"collection-group":[{"id":"1","cadence":30000,"total-collections":34,"encoding":"9","last-collection-start-time":"1730569766177978561","last-collection-end-time":"1730569736180978561","max-collection-time":5,"min-collection-time":2,"min-total-time":3,"max-total-time":6,"avg-total-time":4,"total-other-errors":0,"total-on-data-instances":0,"total-not-ready":0,"total-send-errors":0,"total-send-drops":0,"collection-path":[{"path":"Cisco-IOS-XR-telemetry-model-driven-oper:telemetry-model-driven/subscriptions/subscription","state":true}],"internal-collection-group":[{"path":"/oper/mdt/gl/subs/stats/*","cadence":"30000","total-get-count":"0","total-list-count":"0","total-datalist-count":"35","total-finddata-count":"0","total-get-bulk-count":"0","total-item-count":"239","total-get-errors":"0","total-list-errors":"0","total-datalist-errors":"0","total-finddata-errors":"0","total-get-bulk-errors":"0","total-encode-errors":"0","total-encode-notready":"0","total-send-errors":"0","total-send-drops":"0","total-sent-bytes":"375498","total-send-packets":"326","total-send-bytes-dropped":"0","total-collections":"34","total-collections-missed":"0","max-collection-time":"5","min-collection-time":"2","avg-collection-time":"2","collection-method":"2","status":"active","total-heartbeats-missed":"0","filtered-item-count":"0","target-defined-mode":false,"sample-interval-set":false}],"strict-timer":false,"incremental-updates":false,"total-incremental-updates":"0","target-defined-mode":false,"sample-interval-set":false}]}]}}}}}}}

@riccardo-negri
riccardo-negri merged commit b739961 into network-analytics:main Jul 28, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants