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

issue:#4043165: Create a new telemetry_collector class #235

Merged
merged 30 commits into from
Sep 18, 2024
Merged

Conversation

egershonNvidia
Copy link
Contributor

@egershonNvidia egershonNvidia commented Aug 19, 2024

What

Separate the telemetry retrieval code into its own class in a different file.
Add a class for storing information, which saves the telemetry data and its deltas.

Why ?

Task
The second task, in order to merge the ALM and PDR plugins, is to move the telemetry to its class, decoupling the main algorithm components to prepare for the merge with ALM.

How?

took get_telemetry from ufm communication manager, put it in its class, and added a delta function to extract the delta between 2 telemetries. in another class I have put all the data store-related functions: save, remove old, and locations of folders of saved files, depending on absolute or delta. This was taken from ALM but I have put 10 items to keep, not for a particular reason. PDR plugin does not use those files, only for debugging.

Every main loop iteration, the server checks the data store to make sure that we don't overflow the data, with clean_old_files.

Testing

regular testing needs to run. Added a test to see that those files were created in the latest 5 minutes.
Added a test to make sure the data store is cleaned up and only maximum items are there.

Special triggers

Use the following phrases as comments to trigger different runs

  • bot:retest rerun Jenkins CI (to rerun GitHub CI, use "Checks" tab on PR page and rerun all jobs)
  • bot:upgrade run additional update tests

Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
@TalLerner
Copy link
Collaborator

Can you please rephrase the text you wrote in the why section of the PR's description?
You can explain the motivation for decoupling the main algorithm parts to prepare it for the merge with ALM.
By the way, the removal of the dynamic telemetry is a better implementation regardless of the merge with the ALM. The dynamic telemetry mechanism wasn't the best choice for the PDR.

egershonNvidia and others added 7 commits September 4, 2024 16:22
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
@egershonNvidia egershonNvidia changed the title issue:#4027497: Create a class that pulls the secondary telemetry every interval and send an event that new data is read issue:#4043165: 1. Create a new telemetry_collector class Sep 10, 2024
@egershonNvidia egershonNvidia changed the title issue:#4043165: 1. Create a new telemetry_collector class issue:#4043165: Create a new telemetry_collector class Sep 10, 2024
@TalLerner TalLerner self-requested a review September 11, 2024 14:50
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
Signed-off-by: Elad Gershon <egershon@nvidia.com>
@TalLerner TalLerner merged commit 7501a79 into main Sep 18, 2024
2 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