fix: Use POST method for REST endpoint /tasks/{id}:subscribe#843
fix: Use POST method for REST endpoint /tasks/{id}:subscribe#843
Conversation
Summary of ChangesHello, 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 standardizes the Highlights
Changelog
ActivityUsing 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
|
🧪 Code Coverage (vs
|
There was a problem hiding this comment.
Code Review
This pull request correctly updates the /tasks/{id}:subscribe endpoint to use the POST method, aligning with REST principles. The changes include backward compatibility for older protocol versions, allowing servers to accept both GET and POST, and implementing a retry mechanism in the v0.3 client. The implementation is well-tested, covering various scenarios including the new retry logic. I've identified one potential bug in the v0.3 client implementation and a small improvement for one of the tests.
b0c84a1 to
0c33d48
Compare
ishymko
left a comment
There was a problem hiding this comment.
Thank you for this! Feel free to follow-up on comments via a separate PR. This should be good for alpha.0
9e8d624 to
7a9477d
Compare
7a9477d to
c842e3e
Compare
POST should be always use for /tasks/{id}:subscribe.
Decisions for backward compatibility with invalid protocol implementations:
1.0 server: Accept both POST and GET
1.0 client: Always use POST
0.3 server: Accept both POST and GET
0.3 client: Try POST first, on HTTP 405 error retry with GET. Cache the retry state to ensure that there is at most one retry attempt per transport instance.
Fixes #840