diff --git a/.github/workflows/install-rust-and-protoc/action.yml b/.github/workflows/install-rust-and-protoc/action.yml index e1222ffd9d..e8b21ab523 100644 --- a/.github/workflows/install-rust-and-protoc/action.yml +++ b/.github/workflows/install-rust-and-protoc/action.yml @@ -28,5 +28,5 @@ runs: - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 with: - version: "25.1" + version: "25.5" repo-token: ${{ inputs.github-token }} diff --git a/.github/workflows/java-cd.yml b/.github/workflows/java-cd.yml index e9df283c50..4f84d9fb4f 100644 --- a/.github/workflows/java-cd.yml +++ b/.github/workflows/java-cd.yml @@ -105,7 +105,7 @@ jobs: - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 with: - version: "26.1" + version: "28.1" repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Create secret key ring file @@ -245,7 +245,7 @@ jobs: - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 with: - version: "26.1" + version: "28.1" repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Start standalone Valkey server diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 5106aec4ce..fa61580b3c 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -93,7 +93,7 @@ jobs: - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 with: - version: "26.1" + version: "28.1" repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Build java client @@ -161,7 +161,7 @@ jobs: - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 with: - version: "26.1" + version: "28.1" repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Java diff --git a/.github/workflows/pypi-cd.yml b/.github/workflows/pypi-cd.yml index e69343f234..ed60c8ee24 100644 --- a/.github/workflows/pypi-cd.yml +++ b/.github/workflows/pypi-cd.yml @@ -176,8 +176,8 @@ jobs: echo "Running on unsupported architecture: $ARCH. Expected one of: ['x86_64', 'aarch64']" exit 1 fi - curl -LO $PB_REL/download/v3.20.3/protoc-3.20.3-linux-${PROTOC_ARCH}.zip - unzip protoc-3.20.3-linux-${PROTOC_ARCH}.zip -d $HOME/.local + curl -LO $PB_REL/download/v4.25.5/protoc-4.25.5-linux-${PROTOC_ARCH}.zip + unzip protoc-4.25.5-linux-${PROTOC_ARCH}.zip -d $HOME/.local export PATH="$PATH:$HOME/.local/bin" - name: Build Python wheels (macos) diff --git a/CHANGELOG.md b/CHANGELOG.md index 576fd78fc5..ef7432d2ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ #### Changes +* Java, Python: Bump protobuf (protoc) version ([#2421](https://github.com/valkey-io/valkey-glide/pull/2421)) + #### Breaking Changes #### Fixes diff --git a/java/DEVELOPER.md b/java/DEVELOPER.md index bd04f278af..9fd9a2af57 100644 --- a/java/DEVELOPER.md +++ b/java/DEVELOPER.md @@ -17,7 +17,7 @@ The Valkey GLIDE Java wrapper consists of both Java and Rust code. Rust bindings - git - GCC - pkg-config -- protoc (protobuf compiler) >= 26.1 +- protoc (protobuf compiler) >= 28.1 - openssl - openssl-dev - rustup @@ -64,17 +64,17 @@ Continue with **Install protobuf compiler** below. To install protobuf for MacOS, run: ```bash brew install protobuf -# Check that the protobuf compiler version 26.1 or higher is installed +# Check that the protobuf compiler version 28.1 or higher is installed protoc --version ``` For the remaining systems, do the following: ```bash PB_REL="https://github.com/protocolbuffers/protobuf/releases" -curl -LO $PB_REL/download/v26.1/protoc-26.1-linux-x86_64.zip -unzip protoc-26.1-linux-x86_64.zip -d $HOME/.local +curl -LO $PB_REL/download/v28.1/protoc-28.1-linux-x86_64.zip +unzip protoc-28.1-linux-x86_64.zip -d $HOME/.local export PATH="$PATH:$HOME/.local/bin" -# Check that the protobuf compiler version 26.1 or higher is installed +# Check that the protobuf compiler version 28.1 or higher is installed protoc --version ``` @@ -165,7 +165,7 @@ Some troubleshooting issues: - Failed to find `cargo` after `rustup`. - No Protobuf compiler (protoc) found. - If build fails because of rust compiler fails, make sure submodules are updated using `git submodule update`. -- If protobuf 26.0 or earlier is detected, upgrade to the latest protobuf release. +- If protobuf 28.0 or earlier is detected, upgrade to the latest protobuf release. ## Running Examples App diff --git a/java/client/build.gradle b/java/client/build.gradle index 46fa8f4cee..a0ac9f2d2b 100644 --- a/java/client/build.gradle +++ b/java/client/build.gradle @@ -14,7 +14,7 @@ repositories { } dependencies { - implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '4.27.1' + implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '4.28.1' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.13.0' implementation group: 'io.netty', name: 'netty-handler', version: '4.1.100.Final' @@ -39,11 +39,11 @@ dependencies { ext { checkProtocVersion = { String output -> - // Line in format like: libprotoc 26.1 + // Line in format like: libprotoc 28.1 int majorVersion = Integer.parseInt(output.split(" ")[1].split("\\.")[0].trim()); int minorVersion = Integer.parseInt(output.split(" ")[1].split("\\.")[1].trim()); - if (majorVersion < 26 || (majorVersion == 26 && minorVersion < 1)) { - throw new GradleException("Protobuf compiler (protoc) version 26.1 or newer is required. Current version: $output"); + if (majorVersion < 28) { + throw new GradleException("Protobuf compiler (protoc) version 28.0 or newer is required. Current version: $output"); } return output.split(" ")[1] } @@ -62,7 +62,7 @@ tasks.register('protobuf', Exec) { } } catch (Exception e) { if (e.getMessage().startsWith("A problem occurred starting process")) { - throw new GradleException("No Protobuf compiler (protoc) found. Protobuf compiler version 26.1 or newer is required."); + throw new GradleException("No Protobuf compiler (protoc) found. Protobuf compiler version 28.0 or newer is required."); } throw e } diff --git a/python/DEVELOPER.md b/python/DEVELOPER.md index 083ccda616..d4d93507a7 100644 --- a/python/DEVELOPER.md +++ b/python/DEVELOPER.md @@ -16,7 +16,7 @@ Software Dependencies - git - GCC - pkg-config -- protoc (protobuf compiler) >= v3.20.0 +- protoc (protobuf compiler) >= v4.25.5 - openssl - openssl-dev - rustup @@ -34,9 +34,9 @@ rustc --version # Install protobuf compiler PB_REL="https://github.com/protocolbuffers/protobuf/releases" # For other arch type from x86 example below, the signature of the curl url should be protoc---.zip, -# e.g. protoc-3.20.3-linux-aarch_64.zip for ARM64. -curl -LO $PB_REL/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip -unzip protoc-3.20.3-linux-x86_64.zip -d $HOME/.local +# e.g. protoc-4.25.5-linux-aarch_64.zip for ARM64. +curl -LO $PB_REL/download/v4.25.5/protoc-4.25.5-linux-x86_64.zip +unzip protoc-4.25.5-linux-x86_64.zip -d $HOME/.local export PATH="$PATH:$HOME/.local/bin" # Check that the protobuf compiler is installed protoc --version @@ -55,8 +55,8 @@ source "$HOME/.cargo/env" rustc --version # Install protobuf compiler PB_REL="https://github.com/protocolbuffers/protobuf/releases" -curl -LO $PB_REL/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip -unzip protoc-3.20.3-linux-x86_64.zip -d $HOME/.local +curl -LO $PB_REL/download/v4.25.5/protoc-4.25.5-linux-x86_64.zip +unzip protoc-4.25.5-linux-x86_64.zip -d $HOME/.local export PATH="$PATH:$HOME/.local/bin" # Check that the protobuf compiler is installed protoc --version diff --git a/python/requirements.txt b/python/requirements.txt index 12eb7d5e2b..acbddacc5c 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,7 +1,7 @@ async-timeout==4.0.2 google-api-python-client==2.85.0 maturin==0.13.0 -protobuf==3.20.* +protobuf==4.25.* pytest==7.1.2 pytest-asyncio==0.19.0 typing_extensions==4.8.0