Skip to content

[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
Pterosaur:enhance_stream_telemetry_with_meta_fix
Draft

[TAM]: Add telemetry stats APIs and maximal polling interval for stream telemetry (with meta fix)#2260
Pterosaur wants to merge 2 commits intoopencomputeproject:masterfrom
Pterosaur:enhance_stream_telemetry_with_meta_fix

Conversation

@Pterosaur
Copy link
Collaborator

Description

This is a draft companion to #2214. It includes the same functional changes plus modifications to meta/structs.pl and meta/test.pm to add sai_stat_st_capability_t to 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_structs array; add sai_stat_st_capability_t
  • meta/test.pm: Skip size check for extensible structs using the same allowlist pattern

This 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.

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>
@Pterosaur
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

# 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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

sai_port_oper_status_notification_t remove

# 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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

at least add comment that this will break backward compatibility

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";
Copy link
Collaborator

Choose a reason for hiding this comment

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

beyne instead of error, just add a information message that struct broke compatibility at this commit

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.

2 participants