Skip to content
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
command: |
FLUID_VERSION=$(sed -n -e 's/^VERSION := //p' Makefile)
FLUID_VERSION=$FLUID_VERSION-$(git rev-parse --short HEAD || echo "HEAD")
Comment on lines 26 to 27
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The CI script parses HELM_VERSION from the Makefile inline in the docker build invocation. Since sed succeeds even when there is no match, this can silently pass an empty HELM_VERSION and build with an unintended Helm version. Consider extracting HELM_VERSION into a variable on its own line and adding an explicit non-empty check (fail fast) before running docker build (and reuse the variable for readability).

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

PR description still contains placeholder text (e.g., fixes #XXXX) and is missing verification details/test notes. Please update the PR template fields so reviewers can trace the motivating issue and how this change was validated.

Copilot uses AI. Check for mistakes.
docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=v3.17.3 --build-arg FLUID_VERSION=$FLUID_VERSION . -f docker/Dockerfile.dataset -t dataset-controller:${CIRCLE_BUILD_NUM}
docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=v3.19.5 --build-arg FLUID_VERSION=$FLUID_VERSION . -f docker/Dockerfile.dataset -t dataset-controller:${CIRCLE_BUILD_NUM}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The Helm version is hardcoded here. Since this value is already defined in the Makefile (line 80), it is better to extract it dynamically using sed. This ensures that future updates to the Helm version only need to be made in one place, preventing synchronization issues between the Makefile and the CI configuration.

            docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=$(sed -n -e 's/^HELM_VERSION ?= //p' Makefile) --build-arg FLUID_VERSION=$FLUID_VERSION . -f docker/Dockerfile.dataset -t dataset-controller:${CIRCLE_BUILD_NUM}

- run:
name: build docker images(alluxioruntime-controller)
command: |
FLUID_VERSION=$(sed -n -e 's/^VERSION := //p' Makefile)
FLUID_VERSION=$FLUID_VERSION-$(git rev-parse --short HEAD || echo "HEAD")
Comment on lines 32 to 34
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

Same concern as above: parsing HELM_VERSION inline via sed can yield an empty value without failing the step. Extract it once, validate it, and reuse it in the docker build command to avoid silent version drift.

Copilot uses AI. Check for mistakes.
docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=v3.17.3 --build-arg FLUID_VERSION=$FLUID_VERSION . -f docker/Dockerfile.alluxioruntime -t alluxioruntime-controller:${CIRCLE_BUILD_NUM}
docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=v3.19.5 --build-arg FLUID_VERSION=$FLUID_VERSION . -f docker/Dockerfile.alluxioruntime -t alluxioruntime-controller:${CIRCLE_BUILD_NUM}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the previous build step, the Helm version should be extracted from the Makefile instead of being hardcoded to maintain consistency and reduce manual update effort.

            docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=$(sed -n -e 's/^HELM_VERSION ?= //p' Makefile) --build-arg FLUID_VERSION=$FLUID_VERSION . -f docker/Dockerfile.alluxioruntime -t alluxioruntime-controller:${CIRCLE_BUILD_NUM}

- run:
name: build docker images(fluid-csi)
command: |
FLUID_VERSION=$(sed -n -e 's/^VERSION := //p' Makefile)
FLUID_VERSION=$FLUID_VERSION-$(git rev-parse --short HEAD || echo "HEAD")
Comment on lines 39 to 41
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

Same concern as above: sed will return success even if HELM_VERSION isn't matched, which can result in an empty build-arg. Extract HELM_VERSION into a variable, assert it's non-empty, then invoke docker build.

Copilot uses AI. Check for mistakes.
docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=v3.17.3 . -f docker/Dockerfile.csi -t fluid-csi:${CIRCLE_BUILD_NUM}
docker build --build-arg TARGETARCH=amd64 --build-arg HELM_VERSION=v3.19.5 . -f docker/Dockerfile.csi -t fluid-csi:${CIRCLE_BUILD_NUM}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The fluid-csi Dockerfile (docker/Dockerfile.csi) does not define or use the HELM_VERSION build argument. Passing it here is redundant and should be removed to keep the build command clean. Additionally, the FLUID_VERSION calculation in the preceding lines (38-39) is also unused by this specific build step and could be removed for further cleanup.

            docker build --build-arg TARGETARCH=amd64 . -f docker/Dockerfile.csi -t fluid-csi:${CIRCLE_BUILD_NUM}


# maybe later we need to upload output to helm repository
Loading