Skip to content

fix(schema): keep a default constraint wait inside the call deadline - #144

Merged
polaz merged 1 commit into
mainfrom
fix/#143-constraint-wait-deadline
Oct 17, 2026
Merged

polaz merged 1 commit into
mainfrom
fix/#143-constraint-wait-deadline

Conversation

@polaz

@polaz polaz commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

create_constraint() called without wait sent no wait, so the server waited for the backing index build by its own default: 60 s on CoordiNode 0.7.2, tunable by the operator. The client's deadline stayed at its own timeout, 30 s by default, so a unique or node-key build taking between the two ended the call with DEADLINE_EXCEEDED although the server went on to create the constraint.

The client cannot see the server's default, so it now always sends a wait: the one given, or its own timeout when none is given, and extends the call's deadline by that wait. The server answers before the client gives up, with the constraint ACTIVE, or VALIDATING with its build.

Testing

  • pytest tests/unit: 374 passed, 2 skipped. test_default_wait_ends_before_the_deadline failed before the change.
  • make lint: clean.

Closes #143

With no wait named, create_constraint() sent none, so the server waited
by its own default: 60 s on 0.7.2 and tunable by the operator, while the
client's deadline stayed at its 30 s timeout. A unique or node-key build
taking between the two ended the call with DEADLINE_EXCEEDED although the
server went on to create the constraint.

The client cannot see the server's default, so it always names the
wait: the given one, or its own timeout when none is given, and extends
the call's deadline by it.

Regression test: test_default_wait_ends_before_the_deadline.

Closes #143
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c2cc0064-0d8e-40ee-b8bb-95b380e0a9ae
📥 Commits

Reviewing files that changed from the base of the PR and between 547c66d and 27cad3f.

📒 Files selected for processing: 2
  • coordinode/coordinode/client.py
  • tests/unit/test_schema_crud.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T08:37:56.799561Z 27cad3f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] Safe to merge within the reviewed scope; no blocking issues were found.

Summary

create_constraint() now sends the client's timeout as the build wait when wait is omitted and extends the RPC deadline by that wait, leaving time for the server to reply. Explicit zero and positive waits retain their behavior, and the docstring explains the new default.

Checks using real protobuf messages and a captured RPC call passed for default and custom client timeouts. All 55 schema CRUD unit tests passed, including the new regression test. The synchronous wrapper forwards the wait unchanged and adds no separate deadline.

No actionable issues were found. The change is safe to merge within the reviewed scope. Actual server build timing was not exercised.

  • Constraint creation now sends a build wait by default.

Reviews (1) · Last reviewed commit: "fix(schema): keep a default constraint w..." · Reviewed by Greptile

@polaz
polaz merged commit 59301d6 into main Oct 17, 2026
17 checks passed
@polaz
polaz deleted the fix/#143-constraint-wait-deadline branch October 17, 2026 09:11
polaz pushed a commit that referenced this pull request Oct 17, 2026
🤖 I have created a release *beep* *boop*
---


##
[4.0.1](v4.0.0...v4.0.1)
(2026-10-17)


### Bug Fixes

* **schema:** keep a default constraint wait inside the call deadline
([#144](#144))
([59301d6](59301d6)),
closes
[#143](#143)
* **types:** read and write timestamps as epoch microseconds
([#133](#133))
([547c66d](547c66d)),
closes
[#132](#132)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: sw-release-bot[bot] <255865126+sw-release-bot[bot]@users.noreply.github.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.

fix(schema): a default constraint wait outlasts the call deadline

1 participant