Skip to content

Conversation

@inv-jishnu
Copy link
Contributor

Description

This PR deprecates the --log-raw-record (-lr) command-line option and removes its functional usage from the import workflow. The failure records will be logged by default, making the option unnecessary. To ensure users are aware of the change, a CLI warning is now displayed whenever this deprecated option is supplied.

The failure records had an bug/anomaly in case if transaction mode in which these were logged even if the --log-raw-record flag was not set by user. These were logged as part of transaction batch failures. To make the behaviour more consistent and user friendly we have now made failure logs written by default removing the need to --log-raw-record .

Related issues and/or PRs

NA

Changes made

  • Marked --log-raw-record option as deprecated
  • Removed conditional logic that depended on logRawRecord
  • Added a CLI warning for deprecated option usage

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

NA

Release notes

Deprecate --log-raw-record Option and Always Log Failure Records by Default

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @inv-jishnu, 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 streamlines the data import process by deprecating the --log-raw-record option. It ensures that all failure records are logged by default, removing the need for explicit configuration and resolving an inconsistency where these records were sometimes logged regardless of the option's state. Users attempting to use the deprecated option will now receive a clear warning, guiding them towards the new default behavior.

Highlights

  • Option Deprecation: The --log-raw-record (-lr) command-line option has been deprecated, as its functionality is now the default behavior.
  • Default Failure Logging: Failure records are now always logged by default, eliminating the need for the --log-raw-record option.
  • Conditional Logic Removal: The conditional logic that previously depended on the logRawRecord flag has been removed, simplifying the logging mechanism.
  • CLI Warning for Deprecated Option: A warning message is now displayed to users via the CLI if they attempt to use the deprecated --log-raw-record option, informing them of the change.
  • Behavior Consistency: This change resolves an anomaly where failure records were logged in transaction mode even without the --log-raw-record flag, ensuring consistent and user-friendly behavior across all scenarios.
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 deprecates the --log-raw-record option and makes logging failure records the default behavior. The changes are generally well-implemented, including adding a deprecation warning and updating the logging logic. However, I've identified a couple of areas for improvement. Firstly, the deprecated option should be hidden from the CLI help to prevent user confusion. Secondly, there's a logic issue that prevents raw records from being included in transaction failure logs, which seems to contradict the new default behavior. I've provided specific suggestions to address these points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant