Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \

# ```bash
WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \

Choose a reason for hiding this comment

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

medium

To improve maintainability and align with the repository's style guide, consider defining the gRPC version in an ARG. The version string is duplicated across many Dockerfiles, making updates tedious and error-prone.

For example:

  1. Add ARG GRPC_VERSION=v1.71.2 at the top of the file.
  2. Change this line to use the variable:
RUN curl -fsSL https://github.com/grpc/grpc/archive/${GRPC_VERSION}.tar.gz | \

This would make future version updates much simpler.

References
  1. The repository style guide states a preference for factoring out duplicated code when it appears 3 or more times in non-test files. This is relevant here as the gRPC version string is duplicated across many Dockerfiles. (link)

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 to this, although not in scope of this PR.

tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \

# ```bash
WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \

# ```bash
WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_CXX_STANDARD=17 \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \

# ```bash
WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz

# ```bash
WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24

WORKDIR /var/tmp/build/grpc
RUN dnf makecache && dnf install -y c-ares-devel re2-devel
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24

WORKDIR /var/tmp/build/grpc
RUN dnf makecache && dnf install -y c-ares-devel re2-devel
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_CXX_STANDARD=20 \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
10 changes: 5 additions & 5 deletions doc/packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ sudo ldconfig

```bash
mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc
curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \

Choose a reason for hiding this comment

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

medium

Similar to the Dockerfiles, the gRPC version is hardcoded multiple times in this documentation file. This can lead to inconsistencies if a version is missed during an update. Consider using a placeholder for the version number (e.g., {{GRPC_VERSION}}) and a script to substitute it with the correct version. This would ensure consistency and simplify future updates.

References
  1. The repository style guide states a preference for factoring out duplicated code when it appears 3 or more times in non-test files. This is relevant here as the gRPC version string is duplicated multiple times within this documentation file. (link)

tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down Expand Up @@ -718,7 +718,7 @@ Platform proto files. We install it using:

```bash
mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc
curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down Expand Up @@ -930,7 +930,7 @@ sudo ldconfig

```bash
mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc
curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down Expand Up @@ -1065,7 +1065,7 @@ sudo ldconfig

```bash
mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc
curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down Expand Up @@ -1248,7 +1248,7 @@ install it using:

```bash
mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc
curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_CXX_STANDARD=17 \
Expand Down