Skip to content

Conversation

@ehsavoie
Copy link
Collaborator

Fixes #390 🦕

TaskArtifactUpdateEvent and TaskStatusUpdateEvent.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ehsavoie, 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 issue #390 by enhancing the TaskArtifactUpdateEvent and TaskStatusUpdateEvent classes. The core change involves introducing 'copy builders' for these event types, which simplifies the process of creating new event instances based on existing ones. This pattern is particularly useful for modifying immutable objects or for creating variations of an existing object without directly mutating it.

Highlights

  • TaskArtifactUpdateEvent: Added a copy constructor to the Builder inner class of TaskArtifactUpdateEvent. This allows for creating a new builder instance pre-populated with values from an existing TaskArtifactUpdateEvent object.
  • TaskStatusUpdateEvent: Added a copy constructor to the Builder inner class of TaskStatusUpdateEvent. This enables the creation of a new builder instance initialized with data from an existing TaskStatusUpdateEvent object.
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.

@ehsavoie ehsavoie changed the title [chore]: fixing issue #390 by adding copy builders to TaskArtifactUpdateEvent and TaskStatusUpdateEvent. [fix]: fixing issue #390 by adding copy builders to TaskArtifactUpdateEvent and TaskStatusUpdateEvent. Oct 23, 2025
@ehsavoie ehsavoie changed the title [fix]: fixing issue #390 by adding copy builders to TaskArtifactUpdateEvent and TaskStatusUpdateEvent. chore: fixing issue #390 by adding copy builders to TaskArtifactUpdateEvent and TaskStatusUpdateEvent. Oct 23, 2025
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 adds copy constructors to the Builder classes of TaskArtifactUpdateEvent and TaskStatusUpdateEvent. This is a good enhancement, making it easier to create modified versions of existing event objects. My review focuses on ensuring these new constructors handle mutable state correctly to prevent potential side effects. I've identified a minor issue regarding the shallow copying of metadata maps in both new constructors and suggested creating defensive copies to improve robustness.

@kabir kabir merged commit 800366e into a2aproject:main Oct 24, 2025
8 of 10 checks passed
@ehsavoie ehsavoie deleted the issue_390 branch December 11, 2025 08:23
kabir pushed a commit to kabir/a2a-java that referenced this pull request Dec 23, 2025
…ifactUpdateEvent and TaskStatusUpdateEvent. (a2aproject#391)

Fixes a2aproject#390 🦕

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
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.

[chore] Provide 'copy' builders for TaskArtifactUpdateEvent and TaskStatusUpdateEvent

2 participants