-
Notifications
You must be signed in to change notification settings - Fork 4.1k
rpc: add DRPC stream multiplexing behind an env gate #170248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shubhamdhama
wants to merge
4
commits into
cockroachdb:master
Choose a base branch
from
shubhamdhama:add-stream-multiplexing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright 2026 The Cockroach Authors. | ||
| # | ||
| # Use of this software is governed by the CockroachDB Software License | ||
| # included in the /LICENSE file. | ||
|
|
||
| # This script bumps the DRPC dependency in go.mod to a given commit. | ||
| # | ||
| # Usage: | ||
| # | ||
| # ./scripts/bump-drpc.sh <commit-url> | ||
| # | ||
| # Where <commit-url> is a GitHub commit link, e.g.: | ||
| # https://github.com/cockroachdb/drpc/commit/d57f8922c21431976751f40127e59cda71768431 | ||
| # https://github.com/shubhamdhama/drpc/commit/d57f8922c21431976751f40127e59cda71768431 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| if [ -z "${1-}" ]; then | ||
| echo "Usage: $0 <github-commit-url>" >&2 | ||
| echo " e.g. $0 https://github.com/cockroachdb/drpc/commit/abc123" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| COMMIT_URL="$1" | ||
|
|
||
| # Parse the org and SHA from the commit URL. | ||
| # Expected format: https://github.com/<org>/drpc/commit/<sha> | ||
| if [[ "$COMMIT_URL" =~ github\.com/([^/]+)/drpc/commit/([0-9a-f]+) ]]; then | ||
| ORG="${BASH_REMATCH[1]}" | ||
| SHA="${BASH_REMATCH[2]}" | ||
| else | ||
| echo "Error: could not parse commit URL: $COMMIT_URL" >&2 | ||
| echo "Expected format: https://github.com/<org>/drpc/commit/<sha>" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| MODULE="github.com/${ORG}/drpc" | ||
| echo "Organization: $ORG" | ||
| echo "Commit SHA: $SHA" | ||
| echo "Module: $MODULE" | ||
| echo | ||
|
|
||
| # Resolve the pseudo-version for this commit. | ||
| echo "Resolving pseudo-version..." | ||
| VERSION=$(go list -m -json "${MODULE}@${SHA}" | jq -r '.Version') | ||
| if [ -z "$VERSION" ] || [ "$VERSION" == "null" ]; then | ||
| echo "Error: could not resolve version for ${MODULE}@${SHA}" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "Resolved version: $VERSION" | ||
| echo | ||
|
|
||
| # Update the replace directive in go.mod. | ||
| OLD_REPLACE=$(grep '^replace storj.io/drpc =>' go.mod) | ||
| NEW_REPLACE="replace storj.io/drpc => ${MODULE} ${VERSION}" | ||
|
|
||
| if [ -z "$OLD_REPLACE" ]; then | ||
| echo "Error: could not find 'replace storj.io/drpc =>' in go.mod" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Old: $OLD_REPLACE" | ||
| echo "New: $NEW_REPLACE" | ||
| echo | ||
|
|
||
| sed -i "s|^replace storj.io/drpc =>.*|${NEW_REPLACE}|" go.mod | ||
|
|
||
| # Tidy up. | ||
| go mod tidy | ||
|
|
||
| # Regenerate Bazel files. | ||
| echo "Running dev generate bazel --mirror..." | ||
| ./dev generate bazel --mirror | ||
|
|
||
| echo | ||
| echo "Done. DRPC bumped to ${SHA:0:12} (${VERSION})." | ||
| echo "Modified files:" | ||
| git diff --name-only |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this and the one above this make the logs a lot noisier since we'll be logging every dial. Maybe lets have some verbosity flag if thats possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes. I'll remove these. They were better for debugging.