Skip to content

Conversation

@rmnjaat
Copy link

@rmnjaat rmnjaat commented Dec 16, 2025

No description provided.

…mestamps for last run details in CreateCustomTenantTicketRequestMixin.
@gemini-code-assist
Copy link

Summary of Changes

Hello @rmnjaat, 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 provider field across several DeltaEvents related data models, enabling better categorization and tracking of events by their associated cloud provider. Additionally, it updates default timestamp values in a request mixin, likely as part of routine model maintenance or regeneration, ensuring the client models reflect the latest definitions.

Highlights

  • DeltaEvents Model Enhancement: The DeltaEvents, DeltaEventsMixin, DeltaEventsRca, and DeltaEventsRcaMixin classes have been updated to include an optional provider field, allowing for the specification of the cloud provider (AWS, GCP, AZURE, OCI) associated with the delta event.
  • Timestamp Updates: The default values for last_run_id, last_run_at, and first_run_at within the CreateCustomTenantTicketRequestMixin class have been updated to more recent timestamps.
  • Model Regeneration: The onelens_backend_client_v2/models.py file appears to have been regenerated, indicated by the updated timestamp in the file header, which incorporates the new field additions and default value changes.
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

@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 provider field to several DeltaEvents related models, which is a good enhancement for clarity. However, it also updates hardcoded default values for UUIDs and timestamps in CreateCustomTenantTicketRequestMixin. While this file is auto-generated, these hardcoded examples can be confusing and become stale. I've suggested replacing them with None as the default for these optional fields to improve code clarity and maintainability.

Comment on lines 19174 to 19188
last_run_id: Optional[UUID4] = Field(
"8a46d4e4-91b1-46f4-8dc6-a6d063b360b6",
"1946c8ef-4434-40c3-a4c7-8477988b831f",
description="Id of the last policy violation/anomaly run",
title="Last Run Id",
)
last_run_at: Optional[datetime] = Field(
"2025-12-11T16:21:18.585904",
"2025-12-16T16:30:12.459193",
description="Datetime of the last policy violation/anomaly run",
title="Last Run At",
)
first_run_at: Optional[datetime] = Field(
"2025-12-11T16:21:18.585918",
"2025-12-16T16:30:12.459206",
description="Datetime of the first policy violation/anomaly run",
title="First Run At",
)

Choose a reason for hiding this comment

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

medium

The hardcoded default values for last_run_id, last_run_at, and first_run_at appear to be example values. Since these fields are optional, it would be cleaner and less confusing to default them to None. This avoids embedding potentially stale or arbitrary example data directly in the model definition. If a default value is truly needed, consider using Pydantic's default_factory for dynamic values (e.g., default_factory=uuid.uuid4 or default_factory=datetime.utcnow).

Suggested change
last_run_id: Optional[UUID4] = Field(
"8a46d4e4-91b1-46f4-8dc6-a6d063b360b6",
"1946c8ef-4434-40c3-a4c7-8477988b831f",
description="Id of the last policy violation/anomaly run",
title="Last Run Id",
)
last_run_at: Optional[datetime] = Field(
"2025-12-11T16:21:18.585904",
"2025-12-16T16:30:12.459193",
description="Datetime of the last policy violation/anomaly run",
title="Last Run At",
)
first_run_at: Optional[datetime] = Field(
"2025-12-11T16:21:18.585918",
"2025-12-16T16:30:12.459206",
description="Datetime of the first policy violation/anomaly run",
title="First Run At",
)
last_run_id: Optional[UUID4] = Field(
None,
description="Id of the last policy violation/anomaly run",
title="Last Run Id",
)
last_run_at: Optional[datetime] = Field(
None,
description="Datetime of the last policy violation/anomaly run",
title="Last Run At",
)
first_run_at: Optional[datetime] = Field(
None,
description="Datetime of the first policy violation/anomaly run",
title="First Run At",
)

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