Skip to content

Conversation

hanzeINGH
Copy link
Contributor

chore: update default read timeout

Change-Id: I29a579f68634823929a7980940fe9420499d4459
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

coderabbitai bot commented Aug 1, 2025

Walkthrough

The changes update the coze-api artifact version from 0.4.0 to 0.4.1 in both the API and example Maven POM files. Additionally, the default read timeout in the CozeAPI.Builder class is increased from 5 seconds to 10 minutes and 33 seconds, and the default read timeout in OAuthClient.OAuthBuilder is increased from 5 seconds to 50 seconds. No changes to public APIs or logic are introduced.

Changes

Cohort / File(s) Change Summary
API Version Bump
api/pom.xml
Updated coze-api artifact version from 0.4.0 to 0.4.1.
Example Dependency Update
example/pom.xml
Updated coze-api dependency version from 0.4.0 to 0.4.1.
Timeout Configuration
api/src/main/java/com/coze/openapi/service/service/CozeAPI.java,
api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java
Increased default read timeout in CozeAPI.Builder from 5000 ms to 633000 ms (10 minutes 33 seconds) and in OAuthClient.OAuthBuilder from 5000 ms to 50000 ms (50 seconds).

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant CozeAPI.Builder
    participant OAuthClient.OAuthBuilder

    Client->>CozeAPI.Builder: Create Builder instance
    CozeAPI.Builder-->>Client: Builder with default read timeout (10 minutes 33 seconds)

    Client->>OAuthClient.OAuthBuilder: Create OAuthBuilder instance
    OAuthClient.OAuthBuilder-->>Client: OAuthBuilder with default read timeout (50 seconds)
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

chore

Poem

A hop, a skip, a version hop,
From zero-four-oh to one atop!
The timeout grows, the minutes flow,
Ten minutes now before we go.
OAuth waits a bit more too,
Fifty seconds, fresh and new! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03a855f and 41d5356.

📒 Files selected for processing (1)
  • api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • api/src/main/java/com/coze/openapi/service/service/CozeAPI.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: label
  • GitHub Check: test (Java 17 on Windows)
  • GitHub Check: test (Java 11 on Windows)
  • GitHub Check: test (Java 8 on macOS)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (1)

150-156: 10-minute default read timeout is unusually high – confirm intent
Jumping from 5 s to 600 s risks tying up OkHttp dispatcher threads if a downstream service becomes sluggish, potentially exhausting the shared executor. Consider:

  1. Keeping the default modest (e.g., 30 s) and letting callers opt-in to long polling via Builder.readTimeout(...), or
  2. Exposing the constant as Duration DEFAULT_READ_TIMEOUT for clarity instead of a bare int.

If the 10-minute window is business-critical, document it clearly in Javadoc so users understand the behaviour.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 803c7a4 and 6214304.

📒 Files selected for processing (3)
  • api/pom.xml (1 hunks)
  • api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (1 hunks)
  • example/pom.xml (1 hunks)
🔇 Additional comments (2)
example/pom.xml (1)

17-20: Version bump aligns the example module – looks good
coze-api dependency is now 0.4.1, matching the core module. Nothing else to flag.

api/pom.xml (1)

44-47: No manual update required for version.properties
The version.properties file uses Maven resource filtering (sdk.version=${project.version}), so the ${project.version} placeholder is automatically replaced with the POM’s version at build time. You can ignore the suggestion to manually update this file.

Likely an incorrect or invalid review comment.

Change-Id: Ie64f12a5f90b5251677d3101b179ca058d127768
Change-Id: I9650da9f6d1d15e6c44c869b5776b8a504c3962f
@chyroc chyroc added the feature label Aug 1, 2025
@chyroc chyroc changed the title chore: update timeout feat: update default timeout Aug 1, 2025
@chyroc chyroc merged commit 03314ae into coze-dev:main Aug 1, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants