[TAM]: Add telemetry stats APIs and maximal polling interval for stream telemetry (with meta fix)#2260
Draft
Pterosaur wants to merge 2 commits intoopencomputeproject:masterfrom
Draft
Conversation
Signed-off-by: Ze Gan <ganze718@gmail.com>
Refactor hardcoded struct exceptions in meta/structs.pl and meta/test.pm into a maintainable extensible struct allowlist. Add sai_stat_st_capability_t to allow appending new members (e.g. maximal_polling_interval) without failing metadata CI checks. Signed-off-by: Ze Gan <ganze718@gmail.com>
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kcudnik
reviewed
Mar 9, 2026
kcudnik
reviewed
Mar 9, 2026
| # Skip extensible structs that are allowed to grow (see also structs.pl) | ||
| my %extensible_structs = map { $_ => 1 } ( | ||
| "sai_switch_health_data_t", | ||
| "sai_port_oper_status_notification_t", |
Collaborator
There was a problem hiding this comment.
sai_port_oper_status_notification_t remove
kcudnik
reviewed
Mar 9, 2026
| # check is performed by sai sanity check | ||
|
|
||
| # Structs that are allowed to append new members at the end (ABI extension). | ||
| # api_t structs are always allowed. Add other structs here as needed. |
Collaborator
There was a problem hiding this comment.
at least add comment that this will break backward compatibility
kcudnik
reviewed
Mar 9, 2026
| and $structTypeName ne "sai_port_oper_status_notification_t") | ||
| and not $extensible{$structTypeName}) | ||
| { | ||
| LogError "FATAL: struct $structTypeName member count differs, was $histCount but is $currCount on commit $commit" if $type eq "struct"; |
Collaborator
There was a problem hiding this comment.
beyne instead of error, just add a information message that struct broke compatibility at this commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a draft companion to #2214. It includes the same functional changes plus modifications to
meta/structs.plandmeta/test.pmto addsai_stat_st_capability_tto the extensible struct allowlist, making CI pass.See #2214 for the full description of the functional changes.
Additional changes (compared to #2214)
meta/structs.pl: Refactor hardcoded struct exceptions into an@extensible_structsarray; addsai_stat_st_capability_tmeta/test.pm: Skip size check for extensible structs using the same allowlist patternThis PR exists for review purposes only — to show what the meta file changes would look like if we choose to go the allowlist route instead of force merging #2214.