refactor(spec): rename SendMessageConfiguration.blocking to SendMessageConfiguration.return_immediately #1507
refactor(spec): rename SendMessageConfiguration.blocking to SendMessageConfiguration.return_immediately #1507ishymko wants to merge 5 commits intoa2aproject:mainfrom
SendMessageConfiguration.blocking to SendMessageConfiguration.return_immediately #1507Conversation
Summary of ChangesHello @ishymko, 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 refactors the task execution control mechanism by renaming the Highlights
Changelog
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.
Code Review
The pull request effectively renames 'blocking' to 'polling' across the documentation and protocol definition, aligning with the intent to clarify execution modes. The changes are consistent and improve the readability and understanding of the protocol's behavior regarding task completion. The updates in specification/a2a.proto and docs/specification.md accurately reflect the new terminology and default behavior. The docs/whats-new-v1.md file is also updated to reflect these changes, providing clear migration guidance for developers. Overall, the changes are well-executed and contribute positively to the protocol's clarity.
|
Hey @ishymko, Thanks for the PR, I'm not sure about the wording of "polling" when its a server side flag. i.e. Now it sounds like your asking the server to poll when in fact you're asking it to block/not-block. Polling is a client side operation and is just one reason to send blocking=False for example if you register a webhook callback you aren't doing polling but you still want non-blocking. Even if blocking=True you may still need to "poll" the Task to get it to completion if it goes through an interrupted state, so blocking=True is really an implementation of long polling which returns when the state changes. Perhaps we should lean further into that design. |
SendMessageConfiguration.blocking to SendMessageConfiguration.polling
|
Out of the proposed options I prefer Another option that we make |
|
I added a comment on the issue, but adding here too. I agree with @Tehsmash that "polling" is not the right term. I'd rather not use "async" because it means something different in programming languages. I'm ok with "nonBlocking", or "noWait" or "returnImmediately". I think the last suggestion is probably the most explicit description of the desired behavior. |
As mentioned in the linked issue, defaulting to non-blocking behavior is counterintuitive and is implemented the opposite way in the SDKs. Renaming it to `polling` makes default behavior simpler while advanced scenario requires an extra flag. Fixes 1453
a702f44 to
d8d9936
Compare
SendMessageConfiguration.blocking to SendMessageConfiguration.pollingSendMessageConfiguration.blocking to SendMessageConfiguration.non_blocking
|
@Tehsmash @darrelmiller thank you for your input. Renamed to
|
|
CI is going to be fixed via #1509. |
4b9ab4b to
d8d9936
Compare
holtskinner
left a comment
There was a problem hiding this comment.
I understand changing the default on this; however, this rename to non_blocking makes this field a negative boolean, which can be confusing to handle. I think it makes more sense to leave as a positive boolean to avoid double negatives.
https://testing.googleblog.com/2023/10/improve-readability-with-positive.html
|
@holtskinner so how about Changing it to proto |
SendMessageConfiguration.blocking to SendMessageConfiguration.non_blockingSendMessageConfiguration.blocking to SendMessageConfiguration. return_immediately
SendMessageConfiguration.blocking to SendMessageConfiguration. return_immediately SendMessageConfiguration.blocking to SendMessageConfiguration.return_immediately
|
@holtskinner @darrelmiller renamed to |
As mentioned in the linked issue, defaulting to non-blocking behavior is counterintuitive and is implemented the opposite way in the SDKs.
Renaming it to
return_immediatelymakes default behavior simpler while advanced scenario requires an extra flag.Previos proposals:
pollinghas inaccurate meaning in this context as pointed out in the comments.non_blockingis a negative boolean which leads to confusing conditional expressions (not non_blocking).Fixes #1453