Change value type of params in memory_checker#12797
Merged
zbud-msft merged 2 commits intosonic-net:masterfrom Nov 24, 2022
Merged
Change value type of params in memory_checker#12797zbud-msft merged 2 commits intosonic-net:masterfrom
zbud-msft merged 2 commits intosonic-net:masterfrom
Conversation
renukamanavalan
approved these changes
Nov 22, 2022
ganglyu
reviewed
Nov 23, 2022
| .format(container_name, mem_usage_bytes, threshold_value)) | ||
| # publish event | ||
| publish_events(events_handle, container_name, mem_usage_bytes, threshold_value) | ||
| publish_events(events_handle, container_name, str(mem_usage_bytes), str(threshold_value)) |
Contributor
There was a problem hiding this comment.
Is it possible to use unit test to cover this case?
Contributor
Author
There was a problem hiding this comment.
Will be covered as part of sonic-mgmt integration test
ganglyu
approved these changes
Nov 24, 2022
StormLiangMS
pushed a commit
to StormLiangMS/sonic-buildimage
that referenced
this pull request
Dec 8, 2022
Fix error when calling events API, required value is string, passing float
StormLiangMS
pushed a commit
that referenced
this pull request
Dec 10, 2022
Fix error when calling events API, required value is string, passing float
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.
Why I did it
Fix error when calling events API, required value is string, passing float
How I did it
Change type of value from float to string
How to verify it
Manual test:
Nov 22 08:24:56.181145 str-s6000-on-4 INFO memory_checker: [telemetry]: Memory usage (20573061.12 Bytes) is larger than the threshold (200 Bytes)!Nov 22 08:26:02.651165 str-s6000-on-4 INFO memory_checker: [telemetry]: Memory usage (20573061.12 Bytes) is larger than the threshold (200 Bytes)!Nov 22 08:26:02.851088 str-s6000-on-4 NOTICE memory_checker: :- publish: EVENT_PUBLISHED: {"sonic-events-host:mem-threshold-exceeded":{"ctr_name":"telemetry","mem_usage":"20573061.12","threshold":"200","timestamp":"2022-11-22T08:26:02.850599Z"}}Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)