-
Notifications
You must be signed in to change notification settings - Fork 1
Added 'provider' field to DeltaEvents and related classes; updated timestamps for last run details in CreateCustomTenantTicketRequestMixin. #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…mestamps for last run details in CreateCustomTenantTicketRequestMixin.
Summary of ChangesHello @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 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 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. 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
|
There was a problem hiding this 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.
| 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", | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
| 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", | |
| ) |
No description provided.