这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@taeold
Copy link
Contributor

@taeold taeold commented Oct 2, 2025

  1. Improve error message to include more useful error message from Cloud Logging
  2. Fix bug where asc/desc was incorrectly passed to cloud logging API call when it is absent in the tool arg.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @taeold, 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 addresses minor issues within the Cloud Functions log retrieval tool. It primarily focuses on improving the robustness of error reporting by integrating a new error message utility and correcting how log ordering is handled, ensuring the tool behaves as expected even when optional parameters are not explicitly provided. Additionally, it refines the input validation for function names and sets a default page size.

Highlights

  • Improved Error Handling: Enhanced error messages for Cloud Logging failures by utilizing a new getErrMsg utility, providing more useful information from Cloud Logging.
  • Order Parameter Fix: Corrected the handling of the order parameter for log retrieval, ensuring asc or desc values are properly normalized and a default of desc is applied when the parameter is absent in the tool argument.
  • Input Schema Refinement: Updated the function_names input schema to strictly accept an array of strings and clarified its description to specify Cloud Function IDs.
  • Default Page Size: Introduced a default value of 50 for the page_size parameter when it is not explicitly provided.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a couple of nice fixes and improvements. The schema for function_names is simplified, and the error messaging is improved by using getErrMsg. I've found a couple of areas where the implementation can be further improved for clarity and correctness. Specifically, the logic for resolving the sort order can be made more concise, and the error handling can be adjusted to surface the more detailed underlying error message from the Cloud Logging API. Please see my detailed comments.

@taeold taeold requested a review from joehan October 2, 2025 21:50
@taeold taeold merged commit d872941 into master Oct 3, 2025
48 checks passed
@taeold taeold deleted the feat/mcp-functions-logs branch October 3, 2025 01:39
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Oct 3, 2025
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