[Telemetry] Add support for collection of CPU machines and Default machines when unset in module#5696
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the telemetry collection mechanism by broadening the criteria used to identify machine types within a blueprint. By supporting a wider array of configuration settings, the system can now more accurately capture machine specifications across diverse module types, including GKE clusters and TPU nodes. The changes also streamline the internal module retrieval process by removing unnecessary regex-based filtering. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the telemetry collection logic to identify machine types across all blueprint modules rather than filtering by specific module patterns. It introduces a list of recognized settings keys—machine_type, node_type, and system_node_pool_machine_type—and updates the getMachineType function to iterate through all modules for these keys. Additionally, the unused getModulesWithPattern helper was removed, and unit tests were expanded and refactored to validate these changes. I have no feedback to provide as no review comments were present.
|
/gemini summary |
|
/gemini review |
Summary of ChangesThis pull request improves the telemetry collection mechanism by broadening the criteria used to identify machine types within a blueprint. By supporting a wider array of configuration settings, the system can now more accurately capture machine specifications across diverse module types, including GKE clusters and TPU nodes. The changes also streamline the internal module retrieval process by removing unnecessary regex-based filtering. Highlights
Activity
|
There was a problem hiding this comment.
Code Review
This pull request refactors machine type extraction in the telemetry collector to support multiple configuration keys and retrieve default values from module definitions. Feedback highlights a bug in extractDefaultMachineType that incorrectly returns early when a module kind is not explicitly specified, and suggests optimizing the extraction loop to avoid redundant, expensive lookups for default values.
3e041a5
into
GoogleCloudPlatform:develop
This pull request enhances the telemetry collection mechanism by supporting collection of CPU machine types and default machine types when unset in module. By supporting a wider array of configuration settings, the system can now more accurately capture machine specifications across diverse module types, including GKE clusters and TPU nodes. The changes also streamline the internal module retrieval process by removing unnecessary regex-based filtering.
Changes: