[Telemetry] Set up a Github workflow to cache release metadata #5553
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 introduces a new automation tool designed to improve telemetry and metadata management. By querying the GitHub Git Trees API, the tool identifies relevant modules and example files for specific versions and persists this information in Firestore, facilitating easier access to release metadata. Highlights
Ignored Files
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 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 counter productive. 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 introduces a tool to cache toolkit metadata, specifically modules and examples, from GitHub into Firestore for a given version. The review feedback highlights several areas for improvement: the caching logic in fetchGitTree is flawed as it ignores the version parameter after the first call, the GCP project ID should be configurable rather than hardcoded, and the use of path/filepath should be replaced with the path package to correctly and idiomatically handle forward-slash paths from the GitHub API.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new utility in tools/cache_metadata/main.go to fetch toolkit metadata—including modules, example files, and blueprint names—from GitHub and cache it in Firestore for a given version. The review feedback highlights several opportunities for optimization and better maintainability: reducing redundant network calls by sharing the Git tree result, parallelizing the fetching of individual example files to avoid performance bottlenecks and rate limiting, reusing existing data structures and logic from the pkg/config package, and avoiding hardcoded project identifiers.
|
/gemini summary |
Summary of ChangesThis pull request introduces a new automation tool designed to improve telemetry and metadata management for the project. By querying the GitHub Git Trees API, the tool identifies relevant modules and example files for specific versions and persists this information in Firestore, facilitating easier access to release metadata. The implementation includes concurrent processing to ensure efficient data retrieval. Highlights
Ignored Files
Activity
|
ecd1b6c
into
GoogleCloudPlatform:develop
Added a new
cache_metadataworkflow that is triggered upon every new release to extract metadata for that particular version (standard modules, standard example files, and standard blueprint names) and store it in a Firestore database. The implementation includes concurrent processing to ensure efficient data retrieval.Changes: