-
Notifications
You must be signed in to change notification settings - Fork 77
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
Backport PR #2549 to release/v1.7 for Update dependencies, C++ standard, and improve Dockerfiles for better build and localization #2557
Conversation
… build systems and localization (#2549) Signed-off-by: kpango <[email protected]>
Deploying vald with Cloudflare Pages
|
Caution Review failedThe pull request is closed. Walkthrough
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
hadolint
Last USER should not be root
vald/dockers/manager/index/Dockerfile
Line 27 in 618ea77
USER root:root |
Pin versions in apt get install. Instead of apt-get install <package>
use apt-get install <package>=<version>
vald/dockers/manager/index/Dockerfile
Line 53 in 618ea77
RUN --mount=type=bind,target=.,rw \ |
Last USER should not be root
vald/dockers/operator/helm/Dockerfile
Line 30 in 618ea77
USER root:root |
Pin versions in apt get install. Instead of apt-get install <package>
use apt-get install <package>=<version>
vald/dockers/operator/helm/Dockerfile
Line 57 in 618ea77
RUN --mount=type=bind,target=.,rw \ |
Last USER should not be root
USER root:root |
Pin versions in apt get install. Instead of apt-get install <package>
use apt-get install <package>=<version>
RUN --mount=type=bind,target=.,rw \ |
Last USER should not be root
USER root:root |
Pin versions in apt get install. Instead of apt-get install <package>
use apt-get install <package>=<version>
RUN --mount=type=bind,target=.,rw \ |
Last USER should not be root
USER root:root |
Pin versions in apt get install. Instead of apt-get install <package>
use apt-get install <package>=<version>
RUN --mount=type=bind,target=.,rw \ |
[CHATOPS:HELP] ChatOps commands.
|
} else { | ||
user := data.BuildUser | ||
if strings.Contains(user, ":") { | ||
user = strings.SplitN(user, ":", 2)[0] |
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.
🚫 [golangci] reported by reviewdog 🐶
Magic number: 2, in detected (gomnd)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v1.7 #2557 +/- ##
===============================================
Coverage ? 17.57%
===============================================
Files ? 566
Lines ? 68930
Branches ? 0
===============================================
Hits ? 12115
Misses ? 55995
Partials ? 820 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 5
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
example/client/go.sum
is excluded by!**/*.sum
go.sum
is excluded by!**/*.sum
rust/Cargo.lock
is excluded by!**/*.lock
Files selected for processing (57)
- .gitfiles (6 hunks)
- .github/ISSUE_TEMPLATE/bug_report.md (1 hunks)
- .github/ISSUE_TEMPLATE/security_issue_report.md (1 hunks)
- .github/PULL_REQUEST_TEMPLATE.md (1 hunks)
- .github/actions/setup-e2e/action.yaml (2 hunks)
- .github/actions/setup-k3d/action.yaml (2 hunks)
- .github/helm/values/values-chaos.yaml (1 hunks)
- .github/workflows/e2e-chaos.yaml (8 hunks)
- .github/workflows/e2e-code-bench-agent.yaml (2 hunks)
- .github/workflows/e2e-max-dim.yml (1 hunks)
- .github/workflows/e2e-profiling.yml (3 hunks)
- .github/workflows/e2e.yml (9 hunks)
- .github/workflows/helm.yml (1 hunks)
- Makefile (6 hunks)
- Makefile.d/dependencies.mk (5 hunks)
- Makefile.d/docker.mk (3 hunks)
- Makefile.d/e2e.mk (1 hunks)
- Makefile.d/helm.mk (1 hunks)
- Makefile.d/k3d.mk (2 hunks)
- Makefile.d/minikube.mk (1 hunks)
- Makefile.d/tools.mk (3 hunks)
- dockers/agent/core/agent/Dockerfile (2 hunks)
- dockers/agent/core/faiss/Dockerfile (2 hunks)
- dockers/agent/core/ngt/Dockerfile (2 hunks)
- dockers/agent/sidecar/Dockerfile (2 hunks)
- dockers/ci/base/Dockerfile (2 hunks)
- dockers/dev/Dockerfile (2 hunks)
- dockers/discoverer/k8s/Dockerfile (2 hunks)
- dockers/gateway/filter/Dockerfile (2 hunks)
- dockers/gateway/lb/Dockerfile (2 hunks)
- dockers/gateway/mirror/Dockerfile (2 hunks)
- dockers/index/job/correction/Dockerfile (2 hunks)
- dockers/index/job/creation/Dockerfile (2 hunks)
- dockers/index/job/readreplica/rotate/Dockerfile (2 hunks)
- dockers/index/job/save/Dockerfile (2 hunks)
- dockers/index/operator/Dockerfile (2 hunks)
- dockers/manager/index/Dockerfile (2 hunks)
- dockers/operator/helm/Dockerfile (4 hunks)
- dockers/tools/benchmark/job/Dockerfile (2 hunks)
- dockers/tools/benchmark/operator/Dockerfile (2 hunks)
- dockers/tools/cli/loadtest/Dockerfile (2 hunks)
- example/client/go.mod (2 hunks)
- go.mod (12 hunks)
- hack/docker/gen/main.go (23 hunks)
- hack/go.mod.default (1 hunks)
- hack/license/gen/main.go (2 hunks)
- pkg/agent/core/ngt/handler/grpc/insert.go (1 hunks)
- pkg/agent/core/ngt/handler/grpc/insert_test.go (3 hunks)
- pkg/agent/core/ngt/handler/grpc/search_test.go (1 hunks)
- rust/rust-toolchain (1 hunks)
- rust/rust-toolchain.toml (1 hunks)
- tests/e2e/kubernetes/portforward/portforward.go (1 hunks)
- versions/CMAKE_VERSION (1 hunks)
- versions/JAEGER_OPERATOR_VERSION (1 hunks)
- versions/OPERATOR_SDK_VERSION (1 hunks)
- versions/PROMETHEUS_STACK_VERSION (1 hunks)
- versions/PROTOBUF_VERSION (1 hunks)
Files not processed due to max files limit (1)
- versions/RUST_VERSION
Files skipped from review due to trivial changes (15)
- .github/ISSUE_TEMPLATE/bug_report.md
- .github/ISSUE_TEMPLATE/security_issue_report.md
- .github/PULL_REQUEST_TEMPLATE.md
- Makefile.d/docker.mk
- Makefile.d/helm.mk
- Makefile.d/minikube.mk
- example/client/go.mod
- go.mod
- rust/rust-toolchain
- rust/rust-toolchain.toml
- versions/CMAKE_VERSION
- versions/JAEGER_OPERATOR_VERSION
- versions/OPERATOR_SDK_VERSION
- versions/PROMETHEUS_STACK_VERSION
- versions/PROTOBUF_VERSION
Additional comments not posted (185)
.github/helm/values/values-chaos.yaml (1)
38-38
: LGTM! Verify the impact on deployment.The change from
localhost
tohost.docker.internal
is appropriate for Docker environments.Ensure that this change is tested in your deployment pipeline to verify that the service can still communicate as expected.
Makefile.d/k3d.mk (2)
17-24
: LGTM! Verify the usage of new variables.The addition of new variables enhances configurability.
Ensure that these variables are correctly used in the Makefile and other related scripts.
Verification successful
The new variables are correctly used in the Makefile.
The variables
K3D_PORT
,K3D_HOST
,K3D_INGRESS_PORT
,K3D_HOST_PID_MODE
, andK3D_OPTIONS
are defined and utilized appropriately within theMakefile.d/k3d.mk
file.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of new variables in the Makefile and related scripts. # Test: Check for the usage of new variables in the Makefile. rg --type makefile 'K3D_PORT|K3D_HOST|K3D_INGRESS_PORT|K3D_HOST_PID_MODE|K3D_OPTIONS'Length of output: 120
Script:
#!/bin/bash # Description: Verify the usage of new variables in the Makefile and related scripts. # Test: Check for the usage of new variables in the entire codebase. rg 'K3D_PORT|K3D_HOST|K3D_INGRESS_PORT|K3D_HOST_PID_MODE|K3D_OPTIONS'Length of output: 483
40-44
: LGTM! Verify the command structure.The command structure has been updated to use the new variables.
Ensure that the command structure works as expected by testing the K3D cluster creation.
Verification successful
The command structure for K3D cluster creation is correctly updated with the new variables.
- The command structure includes the variables
$(K3D_COMMAND)
,$(K3D_CLUSTER_NAME)
,$(K3D_NODES)
,$(K3S_VERSION)
,$(K3D_HOST_PID_MODE)
,$(K3D_HOST)
,$(K3D_PORT)
, and$(K3D_OPTIONS)
as expected.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the command structure for K3D cluster creation. # Test: Check the command structure for K3D cluster creation. rg --type makefile 'cluster create'Length of output: 70
Script:
#!/bin/bash # Description: Verify the command structure for K3D cluster creation. # Test: Check the command structure for K3D cluster creation. rg 'cluster create' Makefile.d/k3d.mk -A 5Length of output: 292
tests/e2e/kubernetes/portforward/portforward.go (1)
71-71
: LGTM! Verify the impact on port forwarding functionality.The change improves the reliability of the
Start
method by correctly handling both "http://" and "https://" prefixes.Ensure that this change is tested in your e2e tests to verify that the port forwarding functionality works as expected.
Verification successful
Port forwarding functionality is verified in the e2e tests.
The
Start
method is indeed used in various e2e test files, specifically in the context of port forwarding. This confirms that the port forwarding functionality is being tested.
tests/e2e/sidecar/sidecar_test.go
tests/e2e/performance/max_vector_dim_test.go
tests/e2e/multiapis/multiapis_test.go
tests/e2e/crud/crud_test.go
tests/e2e/crud/crud_faiss_test.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact on port forwarding functionality. # Test: Check for the usage of the `Start` method in the e2e tests. rg --type go 'Start'Length of output: 133669
Script:
#!/bin/bash # Extract context around the `Start` method calls in the relevant e2e test files to verify if they are testing the port forwarding functionality. # Define the files to check files=( "tests/e2e/sidecar/sidecar_test.go" "tests/e2e/performance/max_vector_dim_test.go" "tests/e2e/multiapis/multiapis_test.go" "tests/e2e/crud/crud_test.go" "tests/e2e/crud/crud_faiss_test.go" ) # Loop through the files and extract context around the `Start` method calls for file in "${files[@]}"; do echo "File: $file" rg --context 10 'Start' "$file" echo doneLength of output: 3796
dockers/agent/core/agent/Dockerfile (7)
21-21
: LGTM! Updated maintainer information.The
ARG MAINTAINER
has been updated to"vdaas.org vald team <[email protected]>"
.
38-45
: LGTM! Added environment variables for localization and timezone.The new environment variables
LANGUAGE
,LC_ALL
, andTZ
enhance localization and timezone management.
50-50
: LGTM! Set working directory.The
WORKDIR
has been set to${HOME}/rust/src/github.com/${ORG}/${REPO}
.
53-78
: LGTM! Optimized build process with caching and additional packages.The
RUN
command has been restructured with multiple--mount
options, optimizing the build process. Additional packages liketzdata
,locales
, andlibquadmath0
support the application's runtime requirements.
94-94
: LGTM! Final stage runs as non-root user.The
FROM
directive in the final stage has been set togcr.io/distroless/cc-debian12:nonroot
, ensuring that the final image runs as a non-root user.
102-102
: LGTM! Final image runs as non-root user.The
USER
directive in the final stage has been set tononroot:nonroot
, ensuring that the final image runs as a non-root user.
27-27
: Verify non-root user in the final stage.The
USER root:root
directive is necessary for installing packages. Ensure that the final stage runs as a non-root user.Verification successful
Verified: The final stage runs as a non-root user.
The
USER root:root
directive is necessary for installing packages. The final stage correctly switches tononroot:nonroot
before theENTRYPOINT
.
USER nonroot:nonroot
directive is present in the final stage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the final stage of the Dockerfile runs as a non-root user. # Test: Search for the USER directive in the final stage. Expect: nonroot:nonroot. rg --type dockerfile -A 5 $'FROM gcr.io/distroless/cc-debian12:nonroot'Length of output: 107
Script:
#!/bin/bash # Description: Verify that the final stage of the Dockerfile runs as a non-root user. # Test: Search for the USER directive in the final stage. Expect: nonroot:nonroot. rg 'USER' dockers/agent/core/agent/Dockerfile -A 5Length of output: 388
dockers/agent/sidecar/Dockerfile (7)
21-21
: LGTM! Updated maintainer information.The
ARG MAINTAINER
has been updated to"vdaas.org vald team <[email protected]>"
.
41-47
: LGTM! Added environment variables for localization and timezone.The new environment variables
LANGUAGE
,LC_ALL
, andTZ
enhance localization and timezone management.
50-50
: LGTM! Set working directory.The
WORKDIR
has been set to${GOPATH}/src/github.com/${ORG}/${REPO}
.
53-79
: LGTM! Optimized build process with caching and additional packages.The
RUN
command has been restructured with multiple--mount
options, optimizing the build process. Additional packages liketzdata
andlocales
support the application's runtime requirements.
84-84
: LGTM! Final stage runs as non-root user.The
FROM
directive in the final stage has been set togcr.io/distroless/static:nonroot
, ensuring that the final image runs as a non-root user.
92-92
: LGTM! Final image runs as non-root user.The
USER
directive in the final stage has been set tononroot:nonroot
, ensuring that the final image runs as a non-root user.
27-27
: Verify non-root user in the final stage.The
USER root:root
directive is necessary for installing packages. Ensure that the final stage runs as a non-root user.Verification successful
Verify non-root user in the final stage.
The
USER root:root
directive is necessary for installing packages. Ensure that the final stage runs as a non-root user.
Verified: The final stage runs as a non-root user.
The Dockerfile correctly switches to
USER nonroot:nonroot
before theENTRYPOINT
directive, ensuring the container does not run as root.
USER nonroot:nonroot
directive is present before theENTRYPOINT
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the final stage of the Dockerfile runs as a non-root user. # Test: Search for the USER directive in the final stage. Expect: nonroot:nonroot. rg --type dockerfile -A 5 $'FROM gcr.io/distroless/static:nonroot'Length of output: 102
Script:
#!/bin/bash # Description: Verify that the final stage of the Dockerfile runs as a non-root user. # Test: Search for the USER directive in the Dockerfile to ensure the final stage runs as a non-root user. rg 'USER' -A 5 dockers/agent/sidecar/DockerfileLength of output: 404
dockers/gateway/lb/Dockerfile (8)
21-21
: LGTM! Updated maintainer information.The
ARG MAINTAINER
has been updated to"vdaas.org vald team <[email protected]>"
.
41-47
: LGTM! Added environment variables for localization and timezone.The new environment variables
LANGUAGE
,LC_ALL
, andTZ
enhance localization and timezone management.
50-50
: LGTM! Set working directory.The
WORKDIR
has been set to${GOPATH}/src/github.com/${ORG}/${REPO}
.
53-79
: LGTM! Optimized build process with caching and additional packages.The
RUN
command has been restructured with multiple--mount
options, optimizing the build process. Additional packages liketzdata
andlocales
support the application's runtime requirements.
84-84
: LGTM! Final stage runs as non-root user.The
FROM
directive in the final stage has been set togcr.io/distroless/static:nonroot
, ensuring that the final image runs as a non-root user.
92-92
: LGTM! Added configuration file.The
COPY
command has been added to copycmd/gateway/lb/sample.yaml
to/etc/server/config.yaml
, ensuring that the configuration file is included in the final image.
93-93
: LGTM! Final image runs as non-root user.The
USER
directive in the final stage has been set tononroot:nonroot
, ensuring that the final image runs as a non-root user.
27-27
: Verify non-root user in the final stage.The
USER root:root
directive is necessary for installing packages. Ensure that the final stage runs as a non-root user.Verification successful
Let's adjust the command to correctly search for
USER
directives in Dockerfiles.
Verified non-root user in the final stage.
The
USER root:root
directive is necessary for installing packages. The final stage of the Dockerfile correctly runs as a non-root user (nonroot:nonroot
).
dockers/gateway/lb/Dockerfile
:USER nonroot:nonroot
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the final stage of the Dockerfile runs as a non-root user. # Test: Search for the USER directive in the final stage. Expect: nonroot:nonroot. rg --type dockerfile -A 5 $'FROM gcr.io/distroless/static:nonroot'Length of output: 102
Script:
#!/bin/bash # Description: Verify that the final stage of the Dockerfile runs as a non-root user. # Test: Search for the USER directive in Dockerfiles. Expect: nonroot:nonroot. rg 'USER' --glob '**/Dockerfile'Length of output: 3126
dockers/manager/index/Dockerfile (3)
41-47
: Environment Variables Added for Locale and TimezoneThe addition of
LANGUAGE
,LC_ALL
, andTZ
environment variables helps ensure consistent locale and timezone settings across different environments.
53-84
: Optimized Build Process with CachingThe use of multiple mount points in the
RUN
command optimizes the build process by caching dependencies and reducing build times. The cleanup commands help maintain a smaller image size.
92-92
: Improved Configuration ManagementThe
COPY
command change to directly copycmd/manager/index/sample.yaml
to/etc/server/config.yaml
enhances clarity and ensures the correct configuration is used.dockers/gateway/filter/Dockerfile (3)
41-47
: Environment Variables Added for Locale and TimezoneThe addition of
LANGUAGE
,LC_ALL
, andTZ
environment variables helps ensure consistent locale and timezone settings across different environments.
53-84
: Optimized Build Process with CachingThe use of multiple mount points in the
RUN
command optimizes the build process by caching dependencies and reducing build times. The cleanup commands help maintain a smaller image size.
92-92
: Improved Configuration ManagementThe
COPY
command change to directly copycmd/gateway/filter/sample.yaml
to/etc/server/config.yaml
enhances clarity and ensures the correct configuration is used.dockers/gateway/mirror/Dockerfile (4)
21-21
: UPX Compression Option AddedThe
ARG UPX_OPTIONS=-9
sets the UPX compression to maximum, which helps in reducing the binary size.
41-47
: Environment Variables Added for Locale and TimezoneThe addition of
LANGUAGE
,LC_ALL
, andTZ
environment variables helps ensure consistent locale and timezone settings across different environments.
53-84
: Optimized Build Process with CachingThe use of multiple mount points in the
RUN
command optimizes the build process by caching dependencies and reducing build times. The cleanup commands help maintain a smaller image size.
92-92
: Improved Configuration ManagementThe
COPY
command change to directly copycmd/gateway/mirror/sample.yaml
to/etc/server/config.yaml
enhances clarity and ensures the correct configuration is used.dockers/discoverer/k8s/Dockerfile (5)
21-21
: LGTM!Updating the
ARG MAINTAINER
to include maintainer details improves documentation and clarity.
41-47
: LGTM!Adding ENV directives for
LANGUAGE
,LC_ALL
, andTZ
standardizes locale settings within the container.
27-27
: Acknowledge USER directive comment.The
USER root:root
directive is necessary during the build phase for installing packages and configuring the environment. However, it should be reverted to a non-root user in the final stage for security reasons.Also applies to: 47-47
53-81
: LGTM!The restructuring of the RUN command to utilize multiple bind and cache mounts optimizes the build process and improves package installation efficiency.
92-92
: LGTM!Updating the COPY directive to pull a specific file from the build context improves clarity and reduces the risk of copying unnecessary files.
dockers/index/job/save/Dockerfile (5)
21-21
: LGTM!Updating the
ARG MAINTAINER
to include maintainer details improves documentation and clarity.
41-47
: LGTM!Adding ENV directives for
LANGUAGE
,LC_ALL
, andTZ
standardizes locale settings within the container.
27-27
: Acknowledge USER directive comment.The
USER root:root
directive is necessary during the build phase for installing packages and configuring the environment. However, it should be reverted to a non-root user in the final stage for security reasons.Also applies to: 47-47
53-81
: LGTM!The restructuring of the RUN command to utilize multiple bind and cache mounts optimizes the build process and improves package installation efficiency.
92-92
: LGTM!Updating the COPY directive to pull a specific file from the build context improves clarity and reduces the risk of copying unnecessary files.
dockers/index/operator/Dockerfile (5)
21-21
: LGTM!Updating the
ARG MAINTAINER
to include maintainer details improves documentation and clarity.
41-47
: LGTM!Adding ENV directives for
LANGUAGE
,LC_ALL
, andTZ
standardizes locale settings within the container.
27-27
: Acknowledge USER directive comment.The
USER root:root
directive is necessary during the build phase for installing packages and configuring the environment. However, it should be reverted to a non-root user in the final stage for security reasons.Also applies to: 47-47
53-81
: LGTM!The restructuring of the RUN command to utilize multiple bind and cache mounts optimizes the build process and improves package installation efficiency.
92-92
: LGTM!Updating the COPY directive to pull a specific file from the build context improves clarity and reduces the risk of copying unnecessary files.
dockers/tools/benchmark/operator/Dockerfile (4)
41-47
: LGTM!The addition of environment variables
LANGUAGE
,LC_ALL
, andTZ
ensures proper localization and timezone settings during the build process.
53-81
: LGTM!The restructuring of the
RUN
command to utilize multiple mounts improves caching and efficiency during the build process. The installation of additional packages liketzdata
andlocales
ensures proper locale support.
92-92
: LGTM!The adjustment of the
COPY
command to reference the correct configuration file path improves file organization and clarity.
27-27
: Ensure the final user is not root.Setting the
USER
toroot:root
is necessary for package installations, but ensure that the final user is not root for security reasons.Verification successful
Verification successful.
The final
USER
directive in the Dockerfile is set tononroot:nonroot
, ensuring the container does not run as root, which addresses the security concern.
USER nonroot:nonroot
indockers/tools/benchmark/operator/Dockerfile
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the final user in the Dockerfile is not root. # Test: Search for the final USER directive. Expect: The final USER is not root. rg --type dockerfile 'USER' dockers/tools/benchmark/operator/DockerfileLength of output: 106
Script:
#!/bin/bash # Description: Verify the final user in the Dockerfile is not root. # Test: Search for all USER directives in the Dockerfile and print the last occurrence. grep 'USER' dockers/tools/benchmark/operator/Dockerfile | tail -n 1Length of output: 88
dockers/index/job/creation/Dockerfile (4)
41-47
: LGTM!The addition of environment variables
LANGUAGE
,LC_ALL
, andTZ
ensures proper localization and timezone settings during the build process.
53-81
: LGTM!The restructuring of the
RUN
command to utilize multiple mounts improves caching and efficiency during the build process. The installation of additional packages liketzdata
andlocales
ensures proper locale support.
92-92
: LGTM!The adjustment of the
COPY
command to reference the correct configuration file path improves file organization and clarity.
27-27
: Ensure the final user is not root.Setting the
USER
toroot:root
is necessary for package installations, but ensure that the final user is not root for security reasons.dockers/index/job/correction/Dockerfile (4)
41-47
: LGTM!The addition of environment variables
LANGUAGE
,LC_ALL
, andTZ
ensures proper localization and timezone settings during the build process.
53-81
: LGTM!The restructuring of the
RUN
command to utilize multiple mounts improves caching and efficiency during the build process. The installation of additional packages liketzdata
andlocales
ensures proper locale support.
92-92
: LGTM!The adjustment of the
COPY
command to reference the correct configuration file path improves file organization and clarity.
27-27
: Ensure the final user is not root.Setting the
USER
toroot:root
is necessary for package installations, but ensure that the final user is not root for security reasons.Verification successful
The final user is not root.
The final
USER
directive in the Dockerfile sets the user tononroot:nonroot
, ensuring that the container does not run as root, which addresses the security concern.
USER root:root
ENV USER=root
USER nonroot:nonroot
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the final user in the Dockerfile is not root. # Test: Search for the final USER directive. Expect: The final USER is not root. rg --type dockerfile 'USER' dockers/index/job/correction/DockerfileLength of output: 102
Script:
#!/bin/bash # Description: Verify the final user in the Dockerfile is not root. # Test: Search for the final USER directive. Expect: The final USER is not root. rg 'USER' dockers/index/job/correction/DockerfileLength of output: 99
dockers/index/job/readreplica/rotate/Dockerfile (4)
21-21
: LGTM!The addition of
ARG UPX_OPTIONS=-9
sets a default value for UPX options.
41-47
: LGTM!The addition of environment variables for localization and timezone management improves the container's handling of locale-specific data and time-related functionalities.
53-84
: LGTM!The restructuring of the
RUN
command with multiple--mount
options optimizes the build process by caching dependencies and improving efficiency. The additional packages and locale configurations enhance the container's operational environment.
93-93
: LGTM!Changing the
USER
directive tononroot:nonroot
adheres to best practices for container security by running the application with non-root privileges.dockers/tools/benchmark/job/Dockerfile (5)
21-21
: LGTM!The addition of
ARG UPX_OPTIONS=-9
sets a default value for UPX options.
41-47
: LGTM!The addition of environment variables for localization and timezone management improves the container's handling of locale-specific data and time-related functionalities.
53-92
: LGTM!The restructuring of the
RUN
command with multiple--mount
options optimizes the build process by caching dependencies and improving efficiency. The additional packages and locale configurations enhance the container's operational environment.
100-100
: LGTM!Updating the
COPY
command path to a more specific path enhances clarity and ensures that only necessary files are included in the final image.
101-101
: LGTM!Changing the
USER
directive tononroot:nonroot
adheres to best practices for container security by running the application with non-root privileges..github/actions/setup-e2e/action.yaml (2)
22-22
: LGTM!Changing the default value for
require_libhdf5
from"true"
to"false"
streamlines the setup process for users who do not need this library.
61-62
: LGTM!Removing the
sudo
prefix fromapt-get
commands implies that the action is expected to run in an environment where elevated privileges are not necessary.dockers/agent/core/ngt/Dockerfile (6)
27-27
: Ensure the final image does not run as root.The
USER root:root
directive is necessary for package installations, but the final image should switch back to a non-root user to follow best security practices.Ensure that the final image user is set to
nonroot:nonroot
after all necessary installations.
41-42
: LGTM!The addition of
LANGUAGE
andLC_ALL
environment variables ensures proper locale settings.
46-46
: LGTM!Setting the
TZ
environment variable ensures consistent timezone handling.
47-47
: Ensure the final image does not run as root.The
USER=root
directive is necessary for the build process, but the final image should switch back to a non-root user to follow best security practices.Ensure that the final image user is set to
nonroot:nonroot
after all necessary installations.
53-58
: LGTM!The use of multiple
--mount
options optimizes the build process by caching dependencies and reducing build time.
68-75
: LGTM!The addition of
tzdata
,locales
, andlibssl-dev
packages ensures proper locale, timezone configurations, and SSL support.dockers/tools/cli/loadtest/Dockerfile (6)
27-27
: Ensure the final image does not run as root.The
USER root:root
directive is necessary for package installations, but the final image should switch back to a non-root user to follow best security practices.Ensure that the final image user is set to
nonroot:nonroot
after all necessary installations.
41-42
: LGTM!The addition of
LANGUAGE
andLC_ALL
environment variables ensures proper locale settings.
46-46
: LGTM!Setting the
TZ
environment variable ensures consistent timezone handling.
47-47
: Ensure the final image does not run as root.The
USER=root
directive is necessary for the build process, but the final image should switch back to a non-root user to follow best security practices.Ensure that the final image user is set to
nonroot:nonroot
after all necessary installations.
53-58
: LGTM!The use of multiple
--mount
options optimizes the build process by caching dependencies and reducing build time.
68-75
: LGTM!The addition of
tzdata
,locales
, andlibssl-dev
packages ensures proper locale, timezone configurations, and SSL support.dockers/agent/core/faiss/Dockerfile (6)
27-27
: Ensure the final image does not run as root.The
USER root:root
directive is necessary for package installations, but the final image should switch back to a non-root user to follow best security practices.Ensure that the final image user is set to
nonroot:nonroot
after all necessary installations.
41-42
: LGTM!The addition of
LANGUAGE
andLC_ALL
environment variables ensures proper locale settings.
46-46
: LGTM!Setting the
TZ
environment variable ensures consistent timezone handling.
47-47
: Ensure the final image does not run as root.The
USER=root
directive is necessary for the build process, but the final image should switch back to a non-root user to follow best security practices.Ensure that the final image user is set to
nonroot:nonroot
after all necessary installations.
53-58
: LGTM!The use of multiple
--mount
options optimizes the build process by caching dependencies and reducing build time.
68-80
: LGTM!The addition of
tzdata
,locales
,libssl-dev
,liblapack-dev
,libomp-dev
,libopenblas-dev
,gfortran
, andlibquadmath0
packages ensures proper locale, timezone configurations, and support for SSL, LAPACK, OpenMP, OpenBLAS, Fortran, and quad-precision math..github/actions/setup-k3d/action.yaml (3)
60-67
: LGTM!The logic for determining
K3S_VERSION
is robust and ensures a default value is always set.
80-80
: LGTM!Renaming the section to "Create k8s cluster" improves clarity.
82-100
: LGTM!The updated logic for configuring
K3D_OPTIONS
enhances flexibility and ensures correct options are set based on inputs..github/workflows/e2e-code-bench-agent.yaml (2)
61-61
: LGTM!Adding
options
to thecontainer
configuration improves networking capabilities by enabling communication with the host machine.
89-89
: LGTM!Adding
options
to thecontainer
configuration improves networking capabilities by enabling communication with the host machine..github/workflows/helm.yml (2)
78-78
: LGTM!Adding a
needs
clause enforces a sequence in job execution, improving control flow.
79-80
: LGTM!Adding a
container
section enhances modularity and reusability by ensuring the appropriate container version is utilized.dockers/ci/base/Dockerfile (6)
34-35
: LGTM!The addition of
ENV CC=gcc
andENV CXX=g++
is appropriate for specifying the C and C++ compilers.
43-44
: LGTM!The addition of
ENV LANGUAGE=en_US.UTF-8
andENV LC_ALL=en_US.UTF-8
is appropriate for proper locale settings.
49-50
: LGTM!The addition of
ENV TZ=Etc/UTC
is appropriate for proper timezone settings.
58-64
: LGTM!The modifications in the RUN command to utilize bind mounts and cache mounts are appropriate for optimizing the build process.
73-74
: LGTM!The addition of
tzdata
andlocales
packages is appropriate for proper timezone and locale handling.
131-131
: Verify the necessity of setting USER to root.The USER directive is set to root, which ensures that the container operates with root privileges throughout the build process. However, hadolint recommends against having the last USER as root.
Is it necessary for the container to operate with root privileges at the end of the build process? If not, consider switching to a non-root user.
.github/workflows/e2e-max-dim.yml (3)
34-36
: LGTM!The addition of the
detect-ci-container
job is appropriate for determining the CI container tag based on specific conditions.
39-39
: LGTM!The modification to the
needs
directive in thee2e-max-dimension-insert
job is appropriate for ensuring proper control flow in the workflow.
42-44
: LGTM!The addition of a container specification for the
e2e-max-dimension-insert
job is appropriate for enhancing the customization of the execution environment.dockers/operator/helm/Dockerfile (6)
44-45
: LGTM!The addition of
ENV LANGUAGE=en_US.UTF-8
andENV LC_ALL=en_US.UTF-8
is appropriate for proper locale settings.
49-50
: LGTM!The addition of
ENV TZ=Etc/UTC
is appropriate for proper timezone settings.
57-64
: LGTM!The modifications in the RUN command to utilize bind mounts and cache mounts are appropriate for optimizing the build process.
72-73
: LGTM!The addition of
tzdata
andlocales
packages is appropriate for proper timezone and locale handling.
77-81
: LGTM!The commands for setting locale and timezone settings are appropriate for ensuring that these settings are applied correctly.
114-114
: LGTM!The USER directive is set to nonroot, ensuring that the container operates with non-root privileges at the end of the build process.
dockers/dev/Dockerfile (4)
22-22
: Verify package compatibility and availability.The base image has been updated from
debian
toubuntu22.04
. Ensure that all necessary packages are available and compatible with the new base image.
34-35
: LGTM!The new environment variables
CC
,CXX
,LANGUAGE
, andTZ
improve the configuration for compiling C/C++ applications and setting the locale and timezone.Also applies to: 43-44, 49-49
79-91
: LGTM!The new packages
tzdata
,locales
, andlibquadmath0
support locale and timezone management and provide additional mathematical functions.
101-105
: LGTM!The commands for setting locale and timezone, installing Node.js and npm, and cleaning up unnecessary packages improve the Dockerfile's functionality.
Also applies to: 107-108, 112-117, 119-120
Makefile.d/e2e.mk (1)
144-169
: LGTM!The new target
e2e/actions/run/readreplica
enhances the testing capabilities by addressing the read replica scenario, allowing for more comprehensive testing of the system's behavior.Makefile.d/tools.mk (4)
56-59
: LGTM!The updates to the
prettier
installation target ensure it is installed globally and the npm registry is set globally, improving the installation process.
162-167
: LGTM!The restructured Go installation process streamlines the extraction process and ensures cleanup after installation.
174-175
: LGTM!The updated Rust installation section ensures the correct Rust version is actively used after installation.
212-212
: LGTM!Using the
-p
flag with themkdir
command prevents errors if the directory already exists, improving the robustness of the installation script..github/workflows/e2e-chaos.yaml (6)
37-39
: LGTM!The
detect-ci-container
job is correctly introduced with appropriate conditions and references.
42-42
: LGTM!The
needs
dependency update todetect-ci-container
is consistent with the new workflow structure.
45-47
: LGTM!The
container
specification with the image and options is correctly added.
72-72
: LGTM!The
E2E_BIND_HOST
environment variable update tohost.docker.internal
is consistent with the new containerized environment.
83-83
: LGTM!The
needs
dependency update todetect-ci-container
is consistent with the new workflow structure.
86-88
: LGTM!The
container
specification with the image and options is correctly added..github/workflows/e2e-profiling.yml (6)
35-37
: LGTM!The
detect-ci-container
job is correctly introduced with appropriate conditions and references.
40-40
: LGTM!The
needs
dependency update todetect-ci-container
is consistent with the new workflow structure.
43-45
: LGTM!The
container
specification with the image and options is correctly added.
108-127
: LGTM!The steps within the
e2e-profiling
job are correctly updated, including the addition of an "Update cache" step and refined tagging logic.
45-45
: LGTM!The
E2E_BIND_HOST
environment variable update tohost.docker.internal
is consistent with the new containerized environment.
115-127
: LGTM!The steps within the
e2e-profiling
job are correctly updated, including the addition of an "Update cache" step and refined tagging logic.pkg/agent/core/ngt/handler/grpc/insert.go (1)
102-102
: LGTM!The updated error message specifying that either an invalid ID or an invalid vector was given is clear and informative.
Makefile.d/dependencies.mk (6)
21-22
: LGTM! The additions to theupdate/libs
target are logical.Including
update/cmake
andupdate/docker
ensures that these tools are updated along with other dependencies.
92-94
: LGTM! The enhancements to the Rust installation process are beneficial.Adding
rustup toolchain install $(RUST_VERSION)
andrustup default $(RUST_VERSION)
ensures that the specified Rust version is correctly installed and set as the default.
127-128
: LGTM! The modification to theupdate/rust
target ensures consistency.Copying the Rust version to the
rust-toolchain
file helps maintain consistency across the project.
195-199
: LGTM! The newupdate/docker
target is a valuable addition.Fetching the latest Docker version from the GitHub API and updating the version file ensures that the Docker version is always up to date.
195-199
: LGTM! The newupdate/cmake
target is a valuable addition.Fetching the latest CMake version from the GitHub API and updating the version file ensures that the CMake version is always up to date.
Line range hint
210-218
: LGTM! The update to thedirwalk
function is appropriate.Including a case for
rust-toolchain
ensures that this file is correctly handled during the directory walk..github/workflows/e2e.yml (6)
35-37
: LGTM! Thedetect-ci-container
job improves workflow efficiency.Replacing
dump-contexts-to-log
withdetect-ci-container
ensures that the CI container is detected before any E2E tests are executed, enhancing the workflow's efficiency.
40-45
: LGTM! The changes to thee2e-stream-crud
job enhance test reliability.Depending on the
detect-ci-container
job and specifying the Docker image to be used ensures that the E2E tests are run in a consistent container environment.
81-86
: LGTM! The changes to thee2e-stream-crud-for-operator
job enhance test reliability.Depending on the
detect-ci-container
job and specifying the Docker image to be used ensures that the E2E tests for the operator are run in a consistent container environment.
145-150
: LGTM! The changes to thee2e-stream-crud-under-index-management-jobs
job enhance test reliability.Depending on the
detect-ci-container
job and specifying the Docker image to be used ensures that the E2E tests under index management jobs are run in a consistent container environment.
190-195
: LGTM! The changes to thee2e-stream-crud-skip-exist-check
job enhance test reliability.Depending on the
detect-ci-container
job and specifying the Docker image to be used ensures that the E2E tests with skipped exist check are run in a consistent container environment.
231-236
: LGTM! The changes to thee2e-multiapis-crud
job enhance test reliability.Depending on the
detect-ci-container
job and specifying the Docker image to be used ensures that the multi-APIs CRUD E2E tests are run in a consistent container environment.hack/license/gen/main.go (2)
210-218
: LGTM! The update to thedirwalk
function is appropriate.Including a case for
rust-toolchain
ensures that this file is correctly handled during the directory walk.
264-264
: LGTM! The simplification of the condition in thereadAndRewrite
function enhances readability.Checking for an empty string directly is more readable and potentially reduces the overhead of calculating the length of the string.
hack/docker/gen/main.go (10)
22-22
: Import of fmt package is necessary.The import of the
fmt
package is required for the usage offmt.Sprintf
in thetmpl
variable.
40-40
: Usage of fmt.Sprintf for dynamic content generation is approved.The change to use
fmt.Sprintf
for thetmpl
variable allows for more flexibility in the Dockerfile template by enabling runtime data to be inserted.
69-69
: Conditional logic for handling different container types is approved.This change improves the control flow by adding conditional logic to handle different container types, enhancing configurability.
74-74
: Addition of BuildUser field is approved.The addition of the
BuildUser
field allows for more granular control over the Docker build environment.
91-91
: Addition of RunMounts function is approved.The
RunMounts
function enhances the configurability of the Docker build process by dynamically constructing mount points based on the container type.
98-98
: Conditional logic for CIContainer type is approved.This change improves the control flow by adding specific handling for the CIContainer type, enhancing configurability.
112-113
: Addition of tzdata and locales packages is approved.These packages are necessary for locale and timezone management within the Docker containers.
203-203
: Addition of BuildUser, RuntimeUser, and RunMounts fields to Data struct is approved.These fields provide more granular control over the Docker build environment and enhance configurability.
237-238
: Addition of defaultBuildUser and defaultRuntimeUser constants is approved.These constants provide default values for the build and runtime users, enhancing maintainability.
265-267
: Update to String method for ContainerType is approved.This change ensures that the
String
method correctly represents the new container types, enhancing readability and maintainability.hack/go.mod.default (8)
332-332
: Update to k8s.io/api to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
333-333
: Update to k8s.io/apiextensions-apiserver to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
334-334
: Update to k8s.io/apimachinery to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
335-335
: Update to k8s.io/cli-runtime to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
336-336
: Update to k8s.io/client-go to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
337-337
: Update to k8s.io/component-base to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
340-340
: Update to k8s.io/kubernetes to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
341-341
: Update to k8s.io/metrics to version v0.30.3 is approved.This update ensures the project uses the latest patch version, which may include bug fixes and performance improvements.
Makefile (8)
78-78
: Addition of CMAKE_VERSION variable is approved.This variable is necessary for managing the CMake version used in the build process.
82-82
: Repositioning of GO_VERSION assignment is approved.This change ensures that
GO_VERSION
is evaluated after other version variables, improving the order of evaluation.
144-144
: Update to C++ standard to gnu++23 is approved.This update adopts a newer C++ standard, which may introduce enhanced features or optimizations.
147-147
: Update to FAISS_LDFLAGS to include -lquadmath is approved.This change enhances the linking process for the FAISS library, which could improve numerical computations.
624-624
: Addition of -B flag to specify build directory for NGT is approved.This change improves the clarity and organization of the build process by explicitly specifying the build directory.
645-645
: Addition of -B flag to specify build directory for FAISS is approved.This change improves the clarity and organization of the build process by explicitly specifying the build directory.
655-670
: Addition of new target for installing CMake is approved.This target automates the installation of CMake, which is essential for managing C++ projects.
672-672
: Addition of comment regarding CMAKE_USE_OPENSSL is approved.This comment provides additional context about the CMake configuration.
pkg/agent/core/ngt/handler/grpc/search_test.go (1)
95-96
: Enhanced error reporting is beneficial.Including the actual content of the received results in the error message improves debugging capabilities.
.gitfiles (5)
121-121
: LGTM! Verify the correctness of the new workflow.The addition of the
.github/workflows/update-actions.yaml
file looks good.However, ensure the workflow is correctly implemented and functions as expected.
1975-1975
: LGTM! Verify the correctness of the new Rust toolchain file.The addition of the
rust/rust-toolchain
file looks good.However, ensure the Rust toolchain version specified is correct and consistent with the project's requirements.
2053-2053
: LGTM! Verify the correctness of the new version file.The addition of the
versions/actions/PETER_EVANS_CREATE_PULL_REQUEST
file looks good.However, ensure the version specified is correct and consistent with other version files.
2005-2005
: LGTM! Verify the correctness of the new version file.The addition of the
versions/CMAKE_VERSION
file looks good.However, ensure the CMake version specified is correct and consistent with other version files.
Verification successful
The addition of the
versions/CMAKE_VERSION
file is verified and looks good.The specified CMake version
3.30.1
is correct and there are no inconsistencies with other version files.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the new version file `CMAKE_VERSION`. # Test: Check if the version file exists and contains the expected version format. if [ -f "versions/CMAKE_VERSION" ]; then echo "File exists." cat versions/CMAKE_VERSION else echo "File does not exist." fiLength of output: 106
Script:
#!/bin/bash # Description: Check for other version files that might mention CMake or related dependencies. # Find all version files in the repository fd -e txt -e version -e json -e yaml -e yml -e ini versions/ --exec cat {} + # Search for mentions of CMake or related dependencies in these files rg -i "cmake" versions/Length of output: 446
Script:
#!/bin/bash # Description: Check for other version files that might mention CMake or related dependencies. # Find all version files in the repository fd . versions/ -e txt -e version -e json -e yaml -e yml -e ini --exec cat {} + # Search for mentions of CMake or related dependencies in these files rg -i "cmake" versions/Length of output: 106
74-74
: LGTM! Verify the correctness of the new workflow.The addition of the
.github/workflows/check-conflict.yml
file looks good.However, ensure the workflow is correctly implemented and functions as expected.
pkg/agent/core/ngt/handler/grpc/insert_test.go (3)
737-737
: Improvement in error message clarity.The updated error message now specifies that an "invalid id" or "vector" was provided, which enhances the clarity of the error reporting.
789-789
: Improvement in error message clarity.The updated error message now specifies that an "invalid id" or "vector" was provided, which enhances the clarity of the error reporting.
841-841
: Improvement in error message clarity.The updated error message now specifies that an "invalid id" or "vector" was provided, which enhances the clarity of the error reporting.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Potential security risk: Running as root.
Running containers as root can introduce security risks. Consider using a non-root user unless absolutely necessary.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Potential security risk: Running as root.
Running containers as root can introduce security risks. Consider using a non-root user unless absolutely necessary.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Security Concern: Avoid running as root.
Running the container as root
can pose security risks. Consider using a non-root user if the operations allow for it.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Security Concern: Avoid running as root.
Running the container as root
can pose security risks. Consider using a non-root user if the operations allow for it.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Security Concern: Avoid running as root.
Running the container as root
can pose security risks. Consider using a non-root user if the operations allow for it.
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.
Actionable comments posted: 11
Outside diff range, codebase verification and nitpick comments (2)
Makefile.d/e2e.mk (1)
144-169
: Add comments for clarity.Adding comments to explain the purpose of each step will improve the maintainability of the Makefile.
+ # Restart minikube to ensure a clean environment minikube/restart + # Wait for metrics-server to be available kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 sleep 2 + # Wait for metrics-server pods to be ready kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 sleep 3 + # Deploy Vald with read replica configuration make k8s/vald/deploy \ HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml sleep 20 + # Wait for AGENT_NGT_IMAGE pods to be ready kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 + # Deploy Vald read replica make k8s/vald-readreplica/deploy \ HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml sleep 3 + # Wait for LB_GATEWAY_IMAGE pods to be ready kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 + # Get the name of the LB_GATEWAY_IMAGE pod kubectl get pods pod_name=$$(kubectl get pods --selector="app=$(LB_GATEWAY_IMAGE)" | tail -1 | awk '{print $$1}'); \ echo $$pod_name; \ + # Run the E2E read replica tests make E2E_TARGET_POD_NAME=$$pod_name e2e/readreplica + # Clean up the deployment make k8s/vald/delete $(MAKE) minikube/delete.gitfiles (1)
2005-2005
: Ensure proper specification of CMake version.The CMake version specified in the
versions/CMAKE_VERSION
file is3.30.1
, which does not appear to be a valid version as of the latest known stable release being3.27.1
. Please verify and correct the version if necessary.
- File:
versions/CMAKE_VERSION
- Line: 1
Analysis chain
Ensure proper specification of CMake version.
Verify that the
versions/CMAKE_VERSION
file correctly specifies the CMake version.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the contents of the CMAKE_VERSION file. # Test: Display the contents of the file. cat versions/CMAKE_VERSIONLength of output: 35
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
example/client/go.sum
is excluded by!**/*.sum
go.sum
is excluded by!**/*.sum
rust/Cargo.lock
is excluded by!**/*.lock
Files selected for processing (57)
- .gitfiles (6 hunks)
- .github/ISSUE_TEMPLATE/bug_report.md (1 hunks)
- .github/ISSUE_TEMPLATE/security_issue_report.md (1 hunks)
- .github/PULL_REQUEST_TEMPLATE.md (1 hunks)
- .github/actions/setup-e2e/action.yaml (2 hunks)
- .github/actions/setup-k3d/action.yaml (2 hunks)
- .github/helm/values/values-chaos.yaml (1 hunks)
- .github/workflows/e2e-chaos.yaml (8 hunks)
- .github/workflows/e2e-code-bench-agent.yaml (2 hunks)
- .github/workflows/e2e-max-dim.yml (1 hunks)
- .github/workflows/e2e-profiling.yml (3 hunks)
- .github/workflows/e2e.yml (9 hunks)
- .github/workflows/helm.yml (1 hunks)
- Makefile (6 hunks)
- Makefile.d/dependencies.mk (5 hunks)
- Makefile.d/docker.mk (3 hunks)
- Makefile.d/e2e.mk (1 hunks)
- Makefile.d/helm.mk (1 hunks)
- Makefile.d/k3d.mk (2 hunks)
- Makefile.d/minikube.mk (1 hunks)
- Makefile.d/tools.mk (3 hunks)
- dockers/agent/core/agent/Dockerfile (2 hunks)
- dockers/agent/core/faiss/Dockerfile (2 hunks)
- dockers/agent/core/ngt/Dockerfile (2 hunks)
- dockers/agent/sidecar/Dockerfile (2 hunks)
- dockers/ci/base/Dockerfile (2 hunks)
- dockers/dev/Dockerfile (2 hunks)
- dockers/discoverer/k8s/Dockerfile (2 hunks)
- dockers/gateway/filter/Dockerfile (2 hunks)
- dockers/gateway/lb/Dockerfile (2 hunks)
- dockers/gateway/mirror/Dockerfile (2 hunks)
- dockers/index/job/correction/Dockerfile (2 hunks)
- dockers/index/job/creation/Dockerfile (2 hunks)
- dockers/index/job/readreplica/rotate/Dockerfile (2 hunks)
- dockers/index/job/save/Dockerfile (2 hunks)
- dockers/index/operator/Dockerfile (2 hunks)
- dockers/manager/index/Dockerfile (2 hunks)
- dockers/operator/helm/Dockerfile (4 hunks)
- dockers/tools/benchmark/job/Dockerfile (2 hunks)
- dockers/tools/benchmark/operator/Dockerfile (2 hunks)
- dockers/tools/cli/loadtest/Dockerfile (2 hunks)
- example/client/go.mod (2 hunks)
- go.mod (12 hunks)
- hack/docker/gen/main.go (23 hunks)
- hack/go.mod.default (1 hunks)
- hack/license/gen/main.go (2 hunks)
- pkg/agent/core/ngt/handler/grpc/insert.go (1 hunks)
- pkg/agent/core/ngt/handler/grpc/insert_test.go (3 hunks)
- pkg/agent/core/ngt/handler/grpc/search_test.go (1 hunks)
- rust/rust-toolchain (1 hunks)
- rust/rust-toolchain.toml (1 hunks)
- tests/e2e/kubernetes/portforward/portforward.go (1 hunks)
- versions/CMAKE_VERSION (1 hunks)
- versions/JAEGER_OPERATOR_VERSION (1 hunks)
- versions/OPERATOR_SDK_VERSION (1 hunks)
- versions/PROMETHEUS_STACK_VERSION (1 hunks)
- versions/PROTOBUF_VERSION (1 hunks)
Files not processed due to max files limit (1)
- versions/RUST_VERSION
Files skipped from review due to trivial changes (14)
- .github/ISSUE_TEMPLATE/bug_report.md
- .github/ISSUE_TEMPLATE/security_issue_report.md
- Makefile.d/docker.mk
- Makefile.d/helm.mk
- Makefile.d/minikube.mk
- example/client/go.mod
- go.mod
- hack/go.mod.default
- rust/rust-toolchain
- versions/CMAKE_VERSION
- versions/JAEGER_OPERATOR_VERSION
- versions/OPERATOR_SDK_VERSION
- versions/PROMETHEUS_STACK_VERSION
- versions/PROTOBUF_VERSION
Additional context used
GitHub Check: codecov/patch
hack/license/gen/main.go
[warning] 264-264: hack/license/gen/main.go#L264
Added line #L264 was not covered by testshack/docker/gen/main.go
[warning] 172-174: hack/docker/gen/main.go#L172-L174
Added lines #L172 - L174 were not covered by tests
[warning] 176-179: hack/docker/gen/main.go#L176-L179
Added lines #L176 - L179 were not covered by tests
[warning] 181-181: hack/docker/gen/main.go#L181
Added line #L181 was not covered by tests
[warning] 183-183: hack/docker/gen/main.go#L183
Added line #L183 was not covered by tests
[warning] 192-194: hack/docker/gen/main.go#L192-L194
Added lines #L192 - L194 were not covered by tests
[warning] 265-266: hack/docker/gen/main.go#L265-L266
Added lines #L265 - L266 were not covered by tests
[warning] 428-429: hack/docker/gen/main.go#L428-L429
Added lines #L428 - L429 were not covered by tests
[warning] 505-505: hack/docker/gen/main.go#L505
Added line #L505 was not covered by tests
[warning] 508-508: hack/docker/gen/main.go#L508
Added line #L508 was not covered by tests
[warning] 515-518: hack/docker/gen/main.go#L515-L518
Added lines #L515 - L518 were not covered by tests
[warning] 521-522: hack/docker/gen/main.go#L521-L522
Added lines #L521 - L522 were not covered by tests
[warning] 542-543: hack/docker/gen/main.go#L542-L543
Added lines #L542 - L543 were not covered by tests
[warning] 646-646: hack/docker/gen/main.go#L646
Added line #L646 was not covered by tests
[warning] 648-649: hack/docker/gen/main.go#L648-L649
Added lines #L648 - L649 were not covered by tests
[warning] 652-654: hack/docker/gen/main.go#L652-L654
Added lines #L652 - L654 were not covered by tests
[warning] 658-661: hack/docker/gen/main.go#L658-L661
Added lines #L658 - L661 were not covered by tests
[warning] 668-669: hack/docker/gen/main.go#L668-L669
Added lines #L668 - L669 were not covered by tests
[warning] 695-696: hack/docker/gen/main.go#L695-L696
Added lines #L695 - L696 were not covered by tests
[warning] 699-700: hack/docker/gen/main.go#L699-L700
Added lines #L699 - L700 were not covered by tests
[warning] 722-725: hack/docker/gen/main.go#L722-L725
Added lines #L722 - L725 were not covered by tests
[warning] 734-738: hack/docker/gen/main.go#L734-L738
Added lines #L734 - L738 were not covered by tests
[warning] 740-740: hack/docker/gen/main.go#L740
Added line #L740 was not covered by tests
[warning] 747-750: hack/docker/gen/main.go#L747-L750
Added lines #L747 - L750 were not covered by tests
[warning] 760-763: hack/docker/gen/main.go#L760-L763
Added lines #L760 - L763 were not covered by tests
[warning] 768-774: hack/docker/gen/main.go#L768-L774
Added lines #L768 - L774 were not covered by tests
[warning] 776-777: hack/docker/gen/main.go#L776-L777
Added lines #L776 - L777 were not covered by tests
[warning] 786-786: hack/docker/gen/main.go#L786
Added line #L786 was not covered by tests
Additional comments not posted (183)
rust/rust-toolchain.toml (1)
17-17
: Update Rust toolchain version.The Rust toolchain version has been updated to
1.80.0
to leverage new features and improvements..github/PULL_REQUEST_TEMPLATE.md (1)
20-20
: Update Rust version in PR template.The Rust version in the pull request template has been updated to
v1.80.0
to reflect the updated version used in the project..github/helm/values/values-chaos.yaml (1)
38-38
: Update host configuration for gateway.The
host
configuration under thegateway
section has been updated to"host.docker.internal"
to improve networking in a Docker environment.Makefile.d/k3d.mk (7)
20-20
: LGTM!The variable
K3D_PORT
is declared correctly and set to 6550, providing flexibility for port configuration.
21-21
: LGTM!The variable
K3D_HOST
is declared correctly and set to localhost, providing flexibility for host configuration.
22-22
: LGTM!The variable
K3D_INGRESS_PORT
is declared correctly and set to 8081, providing flexibility for ingress port configuration.
23-23
: LGTM!The variable
K3D_HOST_PID_MODE
is declared correctly and set to true, providing flexibility for host PID mode configuration.
24-24
: LGTM!The variable
K3D_OPTIONS
is declared correctly and set to--port $(K3D_INGRESS_PORT):80@loadbalancer
, providing flexibility for additional K3D options.
40-45
: LGTM!The target
k3d/start
is modified correctly to use the new variables, improving maintainability by avoiding hardcoded values.
54-57
: LGTM!The new target
k3d/config
is added correctly to set theKUBECONFIG
environment variable, facilitating the management of Kubernetes contexts.tests/e2e/kubernetes/portforward/portforward.go (1)
71-71
: LGTM!The modification to the
hostIP
variable construction improves the robustness of the URL handling by ensuring that both HTTP and HTTPS prefixes are correctly removed.dockers/agent/core/agent/Dockerfile (5)
27-27
: LGTM!Setting the user to
root:root
during the build stage provides necessary permissions for installing packages and configuring the environment.
38-45
: LGTM!The new environment variables for locale and timezone settings ensure proper configuration, which is crucial for applications sensitive to these settings.
53-87
: LGTM!The refactored package installation command optimizes the process and ensures that the application has the necessary locale and timezone information.
80-84
: LGTM!The commands to generate locales and configure the system's timezone enhance the application's compatibility with different regional settings.
86-87
: LGTM!The adjusted cleanup commands help maintain a smaller Docker image by removing unnecessary packages after installation.
dockers/agent/sidecar/Dockerfile (5)
21-21
: Approved: Updated maintainer information.The
ARG MAINTAINER
declaration now includes the maintainer's details, improving documentation and clarity.
41-42
: Approved: Added locale settings.The
ENV LANGUAGE
andENV LC_ALL
declarations set locale settings to ensure the correct environment setup for the application.
46-46
: Approved: Added timezone setting.The
ENV TZ
declaration sets the timezone to ensure the correct environment setup for the application.
53-84
: Approved: Restructured RUN command for optimization.The
RUN
command has been significantly restructured to utilize multiple mount options, optimize package management, and improve build efficiency. These changes enhance the Dockerfile's functionality.
27-27
: Verify: Ensure non-root user is set later.The
USER
directive is set toroot:root
for elevated privileges during the build phase. Ensure that it is reset to a non-root user later in the Dockerfile.Verification successful
Verified: The Dockerfile resets to a non-root user.
The
USER
directive is correctly reset tononroot:nonroot
after being set toroot:root
.
dockers/agent/sidecar/Dockerfile
:
USER root:root
USER nonroot:nonroot
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the USER directive is reset to a non-root user later in the Dockerfile. # Test: Search for the USER directive. Expect: Occurrence of non-root user directive. rg --type dockerfile $'^USER nonroot:nonroot'Length of output: 81
Script:
#!/bin/bash # Description: Verify the USER directive is reset to a non-root user later in the Dockerfile. # Find all Dockerfiles and search for USER directives fd -e Dockerfile -x rg '^USER' {}Length of output: 37
Script:
#!/bin/bash # Description: Verify all USER directives in the specific Dockerfile. # Search for all USER directives in the specified Dockerfile rg '^USER' dockers/agent/sidecar/DockerfileLength of output: 81
dockers/gateway/lb/Dockerfile (5)
21-21
: Approved: Updated maintainer information.The
ARG MAINTAINER
declaration now includes the maintainer's details, improving documentation and clarity.
41-42
: Approved: Added locale settings.The
ENV LANGUAGE
andENV LC_ALL
declarations set locale settings to ensure the correct environment setup for the application.
46-46
: Approved: Added timezone setting.The
ENV TZ
declaration sets the timezone to ensure the correct environment setup for the application.
53-93
: Approved: Restructured RUN command and updated COPY path for optimization.The
RUN
command has been significantly restructured to utilize multiple mount options, optimize package management, and improve build efficiency. TheCOPY
command path has been changed to ensure the correct configuration file is utilized. These changes enhance the Dockerfile's functionality.
27-27
: Verify: Ensure non-root user is set later.The
USER
directive is set toroot:root
for elevated privileges during the build phase. Ensure that it is reset to a non-root user later in the Dockerfile.Verification successful
Verified: Ensure non-root user is set later.
The
USER
directive is reset tononroot:nonroot
later in the Dockerfile, ensuring that the container does not run with elevated privileges.
USER root:root
USER nonroot:nonroot
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the USER directive is reset to a non-root user later in the Dockerfile. # Test: Search for the USER directive. Expect: Occurrence of non-root user directive. rg --type dockerfile $'^USER nonroot:nonroot'Length of output: 81
Script:
#!/bin/bash # Description: Verify the USER directive is reset to a non-root user later in the Dockerfile. # Test: Search for all USER directives in the Dockerfile. rg '^USER' dockers/gateway/lb/DockerfileLength of output: 78
dockers/manager/index/Dockerfile (6)
21-21
: Approved: Added default value for UPX_OPTIONS.The
ARG UPX_OPTIONS
declaration now includes the default value-9
, improving clarity and ensuring consistent behavior.
21-21
: Approved: Updated maintainer information.The
ARG MAINTAINER
declaration now includes the maintainer's details, improving documentation and clarity.
41-42
: Approved: Added locale settings.The
ENV LANGUAGE
andENV LC_ALL
declarations set locale settings to ensure the correct environment setup for the application.
46-46
: Approved: Added timezone setting.The
ENV TZ
declaration sets the timezone to ensure the correct environment setup for the application.
53-93
: Approved: Restructured RUN command and updated COPY path for optimization.The
RUN
command has been significantly restructured to utilize multiple mount options, optimize package management, and improve build efficiency. TheCOPY
command path has been changed to ensure the correct configuration file is utilized. These changes enhance the Dockerfile's functionality.
27-27
: Verify: Ensure non-root user is set later.The
USER
directive is set toroot:root
for elevated privileges during the build phase. Ensure that it is reset to a non-root user later in the Dockerfile.Verification successful
Verified: Ensure non-root user is set later.
The
USER
directive is set toroot:root
for elevated privileges during the build phase and is correctly reset tononroot:nonroot
later in the Dockerfile.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the USER directive is reset to a non-root user later in the Dockerfile. # Test: Search for the USER directive. Expect: Occurrence of non-root user directive. rg --type dockerfile $'^USER nonroot:nonroot'Length of output: 81
Script:
#!/bin/bash # Description: Verify the USER directive is reset to a non-root user later in the Dockerfile. # Test: Search for the USER directive in the Dockerfile. Expect: Occurrence of non-root user directive. rg '^USER' dockers/manager/index/DockerfileLength of output: 81
dockers/gateway/filter/Dockerfile (6)
21-21
: LGTM!The
ARG UPX_OPTIONS=-9
sets the compression level for UPX. This is a valid and optimal setting.
41-42
: LGTM!Setting
ENV LANGUAGE=en_US.UTF-8
andENV LC_ALL=en_US.UTF-8
ensures proper locale settings.
46-46
: LGTM!Setting
ENV TZ=Etc/UTC
ensures consistent timezone settings.
68-69
: LGTM!Adding
tzdata
andlocales
packages ensures proper locale and timezone configuration.
92-92
: LGTM!The
COPY
command adjustment ensures the correct configuration file is used during runtime.
93-93
: LGTM!Setting
USER nonroot:nonroot
ensures the container runs with non-root privileges, adhering to best practices.dockers/gateway/mirror/Dockerfile (6)
21-21
: LGTM!The
ARG UPX_OPTIONS=-9
sets the compression level for UPX. This is a valid and optimal setting.
41-42
: LGTM!Setting
ENV LANGUAGE=en_US.UTF-8
andENV LC_ALL=en_US.UTF-8
ensures proper locale settings.
46-46
: LGTM!Setting
ENV TZ=Etc/UTC
ensures consistent timezone settings.
68-69
: LGTM!Adding
tzdata
andlocales
packages ensures proper locale and timezone configuration.
92-92
: LGTM!The
COPY
command adjustment ensures the correct configuration file is used during runtime.
93-93
: LGTM!Setting
USER nonroot:nonroot
ensures the container runs with non-root privileges, adhering to best practices.dockers/discoverer/k8s/Dockerfile (6)
21-21
: LGTM!The
ARG UPX_OPTIONS=-9
sets the compression level for UPX. This is a valid and optimal setting.
41-42
: LGTM!Setting
ENV LANGUAGE=en_US.UTF-8
andENV LC_ALL=en_US.UTF-8
ensures proper locale settings.
46-46
: LGTM!Setting
ENV TZ=Etc/UTC
ensures consistent timezone settings.
68-69
: LGTM!Adding
tzdata
andlocales
packages ensures proper locale and timezone configuration.
92-92
: LGTM!The
COPY
command adjustment ensures the correct configuration file is used during runtime.
93-93
: LGTM!Setting
USER nonroot:nonroot
ensures the container runs with non-root privileges, adhering to best practices.dockers/index/job/save/Dockerfile (6)
21-21
: LGTM!The
ARG MAINTAINER
line now includes the maintainer's contact information, which improves clarity.
40-40
: LGTM!The
ENV APP_NAME
line now specifies the application name, which improves clarity.
41-42
: LGTM!The environment variables for locale and timezone settings ensure proper configuration during the container's runtime.
Also applies to: 46-46
53-84
: LGTM!The
RUN
command with multiple mount options optimizes the package installation process and improves build efficiency.
92-93
: LGTM!The
COPY
commands ensure the correct configuration file is used, and switching to a non-root user improves security.
27-27
: Ensure the final stage reverts to a non-root user.The
USER root:root
directive is necessary for the build process, but ensure that the final stage reverts to a non-root user for security reasons.Verification successful
Ensure the final stage reverts to a non-root user.
The
USER root:root
directive is necessary for the build process, and the final stage correctly reverts toUSER nonroot:nonroot
for security reasons.
dockers/index/job/save/Dockerfile
: The finalUSER
directive isUSER nonroot:nonroot
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the final stage reverts to a non-root user. # Test: Search for the final USER directive. Expect: nonroot:nonroot. rg --type dockerfile 'USER nonroot:nonroot'Length of output: 80
Script:
#!/bin/bash # Description: Verify that the final stage reverts to a non-root user. # Test: Search for the final USER directive in all Dockerfiles. Expect: nonroot:nonroot. rg 'USER' -g '*Dockerfile' -A 1Length of output: 7207
dockers/index/operator/Dockerfile (6)
21-21
: LGTM!The
ARG MAINTAINER
line now includes the maintainer's contact information, which improves clarity.
40-40
: LGTM!The
ENV APP_NAME
line now specifies the application name, which improves clarity.
41-42
: LGTM!The environment variables for locale and timezone settings ensure proper configuration during the container's runtime.
Also applies to: 46-46
53-84
: LGTM!The
RUN
command with multiple mount options optimizes the package installation process and improves build efficiency.
92-93
: LGTM!The
COPY
commands ensure the correct configuration file is used, and switching to a non-root user improves security.
27-27
: Ensure the final stage reverts to a non-root user.The
USER root:root
directive is necessary for the build process, but ensure that the final stage reverts to a non-root user for security reasons.Verification successful
The final stage reverts to a non-root user.
The
USER root:root
directive is necessary for the build process, but the final stage correctly reverts tononroot:nonroot
for security reasons.
dockers/index/operator/Dockerfile: USER nonroot:nonroot
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the final stage reverts to a non-root user. # Test: Search for the final USER directive. Expect: nonroot:nonroot. rg --type dockerfile 'USER nonroot:nonroot'Length of output: 80
Script:
#!/bin/bash # Description: Verify that the final stage reverts to a non-root user. # Test: Search for the final USER directive in all Dockerfiles. rg 'USER' -g '*Dockerfile*' -A 1Length of output: 7208
dockers/tools/benchmark/operator/Dockerfile (6)
21-21
: LGTM!The
ARG MAINTAINER
line now includes the maintainer's contact information, which improves clarity.
40-40
: LGTM!The
ENV APP_NAME
line now specifies the application name, which improves clarity.
41-42
: LGTM!The environment variables for locale and timezone settings ensure proper configuration during the container's runtime.
Also applies to: 46-46
53-84
: LGTM!The
RUN
command with multiple mount options optimizes the package installation process and improves build efficiency.
92-93
: LGTM!The
COPY
commands ensure the correct configuration file is used, and switching to a non-root user improves security.
27-27
: Ensure the final stage reverts to a non-root user.The
USER root:root
directive is necessary for the build process, but ensure that the final stage reverts to a non-root user for security reasons.Verification successful
The final stage reverts to a non-root user.
The Dockerfile correctly reverts to
USER nonroot:nonroot
in the final stage, ensuring security best practices are followed.
dockers/tools/benchmark/operator/Dockerfile
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the final stage reverts to a non-root user. # Test: Search for the final USER directive. Expect: nonroot:nonroot. rg --type dockerfile 'USER nonroot:nonroot'Length of output: 80
Script:
#!/bin/bash # Description: Verify that the final stage reverts to a non-root user. # Test: Search for the final USER directive in the Dockerfile. rg 'USER' dockers/tools/benchmark/operator/DockerfileLength of output: 103
dockers/index/job/creation/Dockerfile (5)
41-47
: Environment variables are well-defined.The new environment variables
LANGUAGE
,TZ
, andUSER
are appropriately added for locale and timezone configurations.
27-27
: Initial user context change is appropriate.The
USER root:root
directive is necessary for installation steps requiring elevated privileges.
93-93
: Final user context change adheres to best practices.The
USER nonroot:nonroot
directive ensures the application runs with non-root privileges, enhancing security.
53-81
: RUN command optimizations are well-structured.The refactored RUN command improves build efficiency using multiple mount types for caching and temporary file storage.
However, ensure to pin versions in
apt-get install
as per the existing comment.
92-92
: COPY command updates reflect better file management.The updated COPY command directly references the
sample.yaml
file, indicating a more organized structure.dockers/index/job/correction/Dockerfile (5)
41-47
: Environment variables are well-defined.The new environment variables
LANGUAGE
,TZ
, andUSER
are appropriately added for locale and timezone configurations.
27-27
: Initial user context change is appropriate.The
USER root:root
directive is necessary for installation steps requiring elevated privileges.
93-93
: Final user context change adheres to best practices.The
USER nonroot:nonroot
directive ensures the application runs with non-root privileges, enhancing security.
53-81
: RUN command optimizations are well-structured.The refactored RUN command improves build efficiency using multiple mount types for caching and temporary file storage.
However, ensure to pin versions in
apt-get install
as per the existing comment.
92-92
: COPY command updates reflect better file management.The updated COPY command directly references the
sample.yaml
file, indicating a more organized structure.dockers/index/job/readreplica/rotate/Dockerfile (5)
41-47
: Environment variables are well-defined.The new environment variables
LANGUAGE
,TZ
, andUSER
are appropriately added for locale and timezone configurations.
27-27
: Initial user context change is appropriate.The
USER root:root
directive is necessary for installation steps requiring elevated privileges.
93-93
: Final user context change adheres to best practices.The
USER nonroot:nonroot
directive ensures the application runs with non-root privileges, enhancing security.
53-81
: RUN command optimizations are well-structured.The refactored RUN command improves build efficiency using multiple mount types for caching and temporary file storage.
However, ensure to pin versions in
apt-get install
as per the existing comment.
92-92
: COPY command updates reflect better file management.The updated COPY command directly references the
sample.yaml
file, indicating a more organized structure.dockers/tools/benchmark/job/Dockerfile (6)
21-21
: LGTM! Setting default value for UPX_OPTIONS.The change sets a default value for the
UPX_OPTIONS
argument, which is used for compressing binaries with UPX.
24-24
: LGTM! Updating maintainer information.The change updates the maintainer information to include the vald team email.
41-41
: LGTM! Setting default language environment variable.The change sets the default language environment variable to
en_US.UTF-8
.
46-46
: LGTM! Setting default timezone environment variable.The change sets the default timezone environment variable to
Etc/UTC
.
47-47
: Verify the necessity of setting USER to root.Setting the default user to
root
can pose security risks. Ensure this change is necessary and does not conflict with best practices.
100-100
: LGTM! Updating COPY command for configuration file.The change modifies the path from which the
sample.yaml
file is copied, indicating a change in configuration management..github/actions/setup-e2e/action.yaml (2)
22-22
: LGTM! Changing default value for require_libhdf5.The change indicates that, by default, the requirement for the HDF5 library is now disabled unless explicitly specified otherwise.
61-62
: LGTM! Removing sudo prefix from apt-get commands.The change suggests a shift in the execution environment's permissions or a change in the context in which the commands are run.
dockers/agent/core/ngt/Dockerfile (6)
24-24
: LGTM! Updating maintainer information.The change updates the maintainer information to include the vald team email.
40-40
: LGTM! Setting application name environment variable.The change sets the application name environment variable to
ngt
.
41-41
: LGTM! Setting default language environment variable.The change sets the default language environment variable to
en_US.UTF-8
.
46-46
: LGTM! Setting default timezone environment variable.The change sets the default timezone environment variable to
Etc/UTC
.
47-47
: Verify the necessity of setting USER to root.Setting the default user to
root
can pose security risks. Ensure this change is necessary and does not conflict with best practices.
101-101
: LGTM! Updating COPY command for configuration file.The change modifies the path from which the
sample.yaml
file is copied, indicating a change in configuration management.dockers/tools/cli/loadtest/Dockerfile (10)
21-21
: Set a default value forUPX_OPTIONS
.Setting a default value for
UPX_OPTIONS
improves build consistency.
26-26
: UpdateMAINTAINER
argument.Updating the
MAINTAINER
argument to include contact information is a good practice.
41-42
: Set locale environment variables.Setting
LANGUAGE
andLC_ALL
toen_US.UTF-8
ensures consistent locale settings.
46-46
: Set timezone environment variable.Setting
TZ
toEtc/UTC
ensures consistent timezone settings.
53-59
: Use bind and cache mounts.Using bind and cache mounts improves build efficiency by reusing downloaded packages and build artifacts.
68-69
: Addtzdata
andlocales
packages.Adding
tzdata
andlocales
packages ensures proper timezone and locale management.
79-83
: Generate and configure locales.Generating and configuring locales ensures the environment is correctly set up.
85-86
: Clean up apt caches.Cleaning up apt caches and removing unnecessary packages helps maintain a clean build environment.
100-100
: Update configuration file path.Updating the configuration file path to a more permanent location within the container improves clarity and organization.
27-27
: Set USER directive.Setting the
USER
directive toroot:root
during the build stage allows for elevated permissions to install packages and configure the environment. Setting it tononroot:nonroot
in the final stage follows best practices for container security.Also applies to: 101-101
dockers/agent/core/faiss/Dockerfile (9)
26-26
: UpdateMAINTAINER
argument.Updating the
MAINTAINER
argument to include contact information is a good practice.
41-42
: Set locale environment variables.Setting
LANGUAGE
andLC_ALL
toen_US.UTF-8
ensures consistent locale settings.
46-46
: Set timezone environment variable.Setting
TZ
toEtc/UTC
ensures consistent timezone settings.
53-59
: Use bind and cache mounts.Using bind and cache mounts improves build efficiency by reusing downloaded packages and build artifacts.
68-69
: Addtzdata
andlocales
packages.Adding
tzdata
andlocales
packages ensures proper timezone and locale management.
82-86
: Generate and configure locales.Generating and configuring locales ensures the environment is correctly set up.
88-89
: Clean up apt caches.Cleaning up apt caches and removing unnecessary packages helps maintain a clean build environment.
103-103
: Update configuration file path.Updating the configuration file path to a more permanent location within the container improves clarity and organization.
27-27
: Set USER directive.Setting the
USER
directive toroot:root
during the build stage allows for elevated permissions to install packages and configure the environment. Setting it tononroot:nonroot
in the final stage follows best practices for container security.Also applies to: 104-104
.github/actions/setup-k3d/action.yaml (3)
60-67
: Enhance robustness by setting defaultK3S_VERSION
.The conditional check ensures that a valid version is always assigned, even if the expected file is missing.
80-96
: Improve clarity and flexibility in k8s cluster creation.Renaming the step and altering the logic for initializing
K3D_OPTIONS
simplifies the configuration process and improves clarity.
101-111
: Enhance usability with additional steps.Adding steps to check
KUBECONFIG
and display Kubernetes cluster information provides immediate feedback and enhances usability..github/workflows/e2e-code-bench-agent.yaml (2)
61-61
: Verify the correctness of theoptions
field.The
options
field--add-host host.docker.internal:host-gateway
enhances the networking capabilities of the container. Ensure that this option is correctly supported and does not introduce any unexpected behavior in the job's execution.
89-89
: Verify the correctness of theoptions
field.The
options
field--add-host host.docker.internal:host-gateway
enhances the networking capabilities of the container. Ensure that this option is correctly supported and does not introduce any unexpected behavior in the job's execution..github/workflows/helm.yml (1)
78-80
: Verify the correctness of theneeds
directive andcontainer
specification.The
needs
directive ensures that the job runs after thedetect-ci-container
job, and thecontainer
specification ensures a consistent execution environment. Ensure that these additions do not introduce any unexpected behavior in the job's execution.dockers/ci/base/Dockerfile (6)
34-35
: Verify the correctness of the new environment variables.The new environment variables
CC
,CXX
,LANGUAGE
,LC_ALL
, andTZ
enhance the build process and environment setup. Ensure that these variables are correctly set and do not introduce any unexpected behavior.Also applies to: 43-44, 49-49
58-104
: Verify the correctness and efficiency of the RUN command modifications.The RUN command now incorporates multiple cache mounts and additional package installations, enhancing build efficiency. Ensure that these modifications are correctly implemented and adhere to best practices.
102-103
: Verify the correctness and efficiency of the cleanup process refinements.The cleanup process now includes
apt-get autoclean
andapt-get autoremove
commands, contributing to a leaner final image. Ensure that these refinements are correctly implemented and efficient.
132-132
: Verify the correctness of the ENTRYPOINT declaration.The ENTRYPOINT has been explicitly defined to use
/bin/bash
, ensuring that the container starts with a bash shell. Ensure that this declaration is correctly implemented and does not introduce any unexpected behavior.
58-58
: Verify the pinning of versions in apt-get install.Existing comments indicate that versions should be pinned in apt-get install. Ensure that this issue has been addressed or is still valid.
131-131
: Verify the last USER directive.Existing comments indicate that the last USER directive should not be root. Ensure that this issue has been addressed or is still valid.
.github/workflows/e2e-max-dim.yml (2)
39-44
: LGTM! But verify the container configuration.The job
e2e-max-dimension-insert
now correctly depends ondetect-ci-container
and includes acontainer
section.Ensure that the container image
ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
is correctly configured and accessible.
34-36
: LGTM! But verify the referenced workflow file.The new job
detect-ci-container
is correctly introduced with specific conditions and uses a separate workflow file.Ensure that the referenced workflow file
./.github/workflows/_detect-ci-container.yml
exists and is correctly configured.Verification successful
The referenced workflow file is correctly configured.
The job
detect-ci-container
references a workflow file that is correctly set up to determine and detect Docker image tags.
- The file
./.github/workflows/_detect-ci-container.yml
exists.- The configuration within the file is appropriate and logically ordered.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and configuration of the referenced workflow file. # Test: Check if the file exists. Expect: The file should exist. if [[ -f ./.github/workflows/_detect-ci-container.yml ]]; then echo "The referenced workflow file exists." else echo "The referenced workflow file does not exist." fiLength of output: 138
Script:
#!/bin/bash # Description: Inspect the contents of the referenced workflow file to verify its configuration. # Display the contents of the workflow file cat ./.github/workflows/_detect-ci-container.ymlLength of output: 1730
dockers/operator/helm/Dockerfile (5)
22-22
: LGTM!The ARG and ENV declarations have been correctly updated to include default values and new environment variables.
Also applies to: 29-29, 44-45, 49-50
30-30
: Verify the necessity and security implications of setting USER to root:root.Setting the USER to
root:root
may have security implications. Ensure this is necessary for the build process.
57-85
: LGTM!The RUN command has been correctly refactored to utilize Docker's buildkit features and improve package management.
77-81
: LGTM!The locale and timezone configuration commands have been correctly added.
83-84
: LGTM!The cleanup commands have been correctly streamlined.
dockers/dev/Dockerfile (6)
22-22
: LGTM!The base image transition from a Debian-based image to an Ubuntu 22.04 base image is correctly done.
34-35
: LGTM!The ENV declarations have been correctly updated to include new environment variables.
Also applies to: 43-44, 49-50
27-27
: Verify the necessity and security implications of setting USER to root:root.Setting the USER to
root:root
may have security implications. Ensure this is necessary for the build process.Also applies to: 151-151
58-86
: LGTM!The RUN command has been correctly refactored to utilize Docker's buildkit features and improve package management.
101-105
: LGTM!The locale and timezone configuration commands have been correctly added.
107-120
: LGTM!The cleanup commands have been correctly streamlined.
.github/workflows/e2e-chaos.yaml (5)
83-88
: Ensure the correct usage of thedetect-ci-container
output.Verify that the
detect-ci-container
job produces the expectedTAG
output and that it is correctly used in therandom-pod-failure
job.
124-129
: Ensure the correct usage of thedetect-ci-container
output.Verify that the
detect-ci-container
job produces the expectedTAG
output and that it is correctly used in theagent-network-partition
job.
165-170
: Ensure the correct usage of thedetect-ci-container
output.Verify that the
detect-ci-container
job produces the expectedTAG
output and that it is correctly used in theclusterwide-network-bandwidth
job.
37-39
: Ensure the correct usage of the_detect-ci-container.yml
workflow.Verify that the
_detect-ci-container.yml
workflow is correctly implemented and referenced.Verification successful
The
_detect-ci-container.yml
workflow is correctly implemented and referenced.The
_detect-ci-container.yml
file exists and contains a valid GitHub Actions workflow that determines the Docker image tag for the CI container.
- The workflow includes the necessary metadata and steps.
- The job
detect
is correctly structured and outputs the tag for use in other workflows.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and correctness of the `_detect-ci-container.yml` workflow. # Test: Check if the `_detect-ci-container.yml` file exists and contains valid YAML syntax. # Expect: The file exists and is valid. if [ -f ".github/workflows/_detect-ci-container.yml" ]; then echo "File exists." yamllint .github/workflows/_detect-ci-container.yml else echo "File does not exist." exit 1 fiLength of output: 220
Script:
#!/bin/bash # Description: Display the contents of the `_detect-ci-container.yml` workflow for manual inspection. # Test: Output the contents of the `_detect-ci-container.yml` file. # Expect: The file contents are displayed for manual verification. cat .github/workflows/_detect-ci-container.ymlLength of output: 1728
42-47
: Ensure the correct usage of thedetect-ci-container
output.Verify that the
detect-ci-container
job produces the expectedTAG
output and that it is correctly used in theagent-failure
job..github/workflows/e2e-profiling.yml (3)
35-37
: New jobdetect-ci-container
added.This job is conditioned to run if the GitHub reference starts with
refs/tags/
or if a specific label is applied to an event. It uses a separate workflow file_detect-ci-container.yml
.
35-35
: Conditional logic fordump-contexts-to-log
altered.The job is no longer conditioned to run under the same conditions as
detect-ci-container
.
40-45
: Jobe2e-profiling
updated to depend ondetect-ci-container
.The job configuration now includes a
container
section that specifies the image to use, which is dynamically set based on the output from thedetect-ci-container
job.Ensure that the new dependency on
detect-ci-container
does not cause any issues in the workflow.Verification successful
Job
e2e-profiling
updated to depend ondetect-ci-container
.The job configuration now includes a
container
section that specifies the image to use, which is dynamically set based on the output from thedetect-ci-container
job.
- The
detect-ci-container
job is correctly referenced and defined.- The
outputs
section, including theTAG
output, is properly set up in the_detect-ci-container.yml
file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the dependency on `detect-ci-container` in the workflow. # Test: Check if the `detect-ci-container` job is correctly referenced. rg --type yaml 'needs: \[detect-ci-container\]' .github/workflows/e2e-profiling.ymlLength of output: 118
Script:
#!/bin/bash # Description: Verify the definition of `detect-ci-container` job and its outputs. # Test: Check if the `detect-ci-container` job is defined in the workflow file. rg --type yaml 'detect-ci-container' .github/workflows/e2e-profiling.yml # Test: Check if the `detect-ci-container` job has outputs defined. rg --type yaml 'outputs:' -A 5 .github/workflows/e2e-profiling.ymlLength of output: 345
Script:
#!/bin/bash # Description: Verify the outputs of the `detect-ci-container` job in the referenced workflow file. # Test: Check if the `detect-ci-container` job in `_detect-ci-container.yml` has outputs defined. rg --type yaml 'outputs:' -A 5 .github/workflows/_detect-ci-container.ymlLength of output: 419
pkg/agent/core/ngt/handler/grpc/insert.go (1)
102-102
: Improved error message for invalid UUIDs.The updated error message provides more context about the invalid ID or vector, which can assist in debugging.
Ensure that the updated error message is consistent with other parts of the codebase.
Verification successful
Improved error message for invalid UUIDs.
The updated error message provides more context about the invalid ID or vector, which can assist in debugging. The error message format is consistent within the relevant parts of the codebase.
pkg/agent/core/ngt/handler/grpc/insert.go
pkg/agent/core/ngt/handler/grpc/insert_test.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistency of the updated error message. # Test: Search for similar error messages in the codebase. Expect: Consistent error messages. rg --type go 'invalid id: "%s" or vector: %v was given' pkg/agent/core/ngt/handler/grpc/Length of output: 90
Script:
#!/bin/bash # Description: Verify the consistency of the updated error message across the entire codebase. # Test: Search for similar error messages in the codebase. Expect: Consistent error messages. rg --type go 'invalid id: "%s" or vector: %v was given'Length of output: 57
Script:
#!/bin/bash # Description: Verify the consistency of similar error messages across the entire codebase. # Test: Search for similar error messages that might use different wording but convey the same meaning. rg --type go 'invalid id' | rg 'vector'Length of output: 883
Makefile.d/dependencies.mk (3)
21-22
: Expandedupdate/libs
target.The
update/libs
target now includesupdate/cmake
andupdate/docker
, expanding the scope of libraries managed by the makefile.
92-94
: Enhanced Rust toolchain installation.The
rust/deps
target now includes commands for installing and setting the default Rust version usingrustup
, improving the setup process for Rust dependencies.
195-198
: New targetupdate/cmake
added.This target uses a curl command to fetch the latest CMake version from GitHub and updates the version file.
.github/workflows/e2e.yml (8)
81-86
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
145-150
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
190-195
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
231-236
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
268-273
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
302-307
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
353-358
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.
40-45
: LGTM! Verify the new dependency.The changes improve modularity by using
detect-ci-container
and adding a container configuration.Ensure that the
detect-ci-container
job is correctly defined and functioning as expected.Verification successful
LGTM! The
detect-ci-container
job is correctly defined and functional.The changes improve modularity by using
detect-ci-container
and adding a container configuration.
- The
detect-ci-container
job is properly defined in.github/workflows/_detect-ci-container.yml
.- It correctly determines, detects, and outputs the Docker image tag for use in dependent jobs.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the presence and correctness of the `detect-ci-container` job. # Test: Search for the job definition. Expect: The job should be defined and correctly configured. rg --type yaml 'detect-ci-container' .github/workflows/Length of output: 9966
Script:
#!/bin/bash # Description: Verify the contents of the `./.github/workflows/_detect-ci-container.yml` file. # Test: Display the contents of the `_detect-ci-container.yml` file. cat .github/workflows/_detect-ci-container.ymlLength of output: 1728
hack/license/gen/main.go (2)
210-218
: LGTM! Verify the correctness of the new criteria.The changes refine the criteria for directory entry handling by including
"FAISS_VERSION"
and"rust-toolchain"
.Ensure that the new criteria are correctly aligned with the updated requirements.
Verification successful
Let's review the
dirwalk
function inhack/license/gen/main.go
to ensure that the new criteria involvingFAISS_VERSION
andrust-toolchain
are correctly aligned with the updated requirements.
The new criteria for directory entry handling in the
dirwalk
function are correctly aligned with the updated requirements.The inclusion of
FAISS_VERSION
andrust-toolchain
in the switch case for filenames ensures that these files are now part of the criteria for directory entry handling.
hack/license/gen/main.go
:
- Lines 210:
FAISS_VERSION
- Lines 218:
rust-toolchain
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the new criteria in the `dirwalk` function. # Test: Search for the usage of `FAISS_VERSION` and `rust-toolchain` in the codebase. Expect: The criteria should be correctly aligned with the requirements. rg --type go 'FAISS_VERSION|rust-toolchain'Length of output: 138
Script:
#!/bin/bash # Description: Extract the `dirwalk` function from `hack/license/gen/main.go` to review its implementation. # Search for the `dirwalk` function definition and its content. ast-grep --lang go --pattern $'func dirwalk($_) $_ { $$$ }' hack/license/gen/main.goLength of output: 3612
264-264
: LGTM! Verify the correctness of the simplified check.The change improves readability by simplifying the conditional check for the
maintainer
variable.Ensure that the simplified check does not introduce any unintended side effects.
Verification successful
The simplified check for the
maintainer
variable is correct and does not introduce any unintended side effects.The code correctly assigns
defaultMaintainer
if the environment variablemaintainerKey
is not set, ensuring thatmaintainer
always has a valid value.
hack/license/gen/main.go
hack/docker/gen/main.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the simplified check in the `readAndRewrite` function. # Test: Search for the usage of the `maintainer` variable in the codebase. Expect: The simplified check should not introduce any unintended side effects. rg --type go 'maintainer'Length of output: 710
Script:
#!/bin/bash # Extract the relevant portions of the code where `maintainer` is used in `hack/license/gen/main.go`. rg --type go -A 5 'maintainer := os.Getenv' hack/license/gen/main.go # Extract the relevant portions of the code where `maintainer` is used in `hack/docker/gen/main.go`. rg --type go -A 5 'maintainer := os.Getenv' hack/docker/gen/main.goLength of output: 435
Tools
GitHub Check: codecov/patch
[warning] 264-264: hack/license/gen/main.go#L264
Added line #L264 was not covered by testshack/docker/gen/main.go (8)
786-786
: LGTM! Verify the correctness of the enhanced logic.The logic for dynamically generating Dockerfiles has been enhanced, improving configurability and robustness.
Ensure that the enhanced logic is correctly integrated
Tools
GitHub Check: codecov/patch
[warning] 786-786: hack/docker/gen/main.go#L786
Added line #L786 was not covered by tests
768-778
: LGTM! Verify the correctness of the refined logic.The logic for setting user-related environment variables has been refined, ensuring the correct home directory and user context.
Ensure that the refined logic is correctly integrated and functioning as expected.
Tools
GitHub Check: codecov/patch
[warning] 768-774: hack/docker/gen/main.go#L768-L774
Added lines #L768 - L774 were not covered by tests
[warning] 776-777: hack/docker/gen/main.go#L776-L777
Added lines #L776 - L777 were not covered by tests
Line range hint
40-156
:
LGTM! Verify the correctness of the transformation.The change transforms
tmpl
into a variable usingfmt.Sprintf
, allowing for dynamic string formatting.Ensure that the transformation does not introduce any unintended side effects.
Verification successful
Transformation of
tmpl
into a variable usingfmt.Sprintf
is correctly implemented.The dynamic string formatting is properly handled, and all usages of
tmpl
in the codebase are consistent with the new format.
hack/docker/gen/main.go
: The transformation maintains the intended functionality without introducing any side effects.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the transformation of `tmpl` into a variable. # Test: Search for the usage of `tmpl` in the codebase. Expect: The transformation should be correctly aligned with the requirements. rg --type go 'tmpl'Length of output: 635
Script:
#!/bin/bash # Extract relevant lines of code from hack/docker/gen/main.go to verify the transformation of `tmpl` into a variable. # Extract lines 40-156 from hack/docker/gen/main.go sed -n '40,156p' hack/docker/gen/main.goLength of output: 3830
Line range hint
465-497
:
LGTM! Verify the correctness of the new function.The
topologicalSort
function sorts environment variables based on their dependencies, ensuring correct order.Ensure that the new function is correctly integrated and functioning as expected.
Verification successful
Let's review the context around the usage of the
topologicalSort
function inhack/docker/gen/main.go
to ensure it is correctly integrated and functioning as expected.
The
topologicalSort
function is correctly integrated and functioning as expected.
- The function processes
data.Environments
and assigns the sorted result todata.EnvironmentsSlice
.- There are no apparent issues with the integration.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the `topologicalSort` function. # Test: Search for the usage of the `topologicalSort` function in the codebase. Expect: The function should be correctly integrated and functioning as expected. rg --type go 'topologicalSort'Length of output: 199
Script:
#!/bin/bash # Description: Retrieve the context around the usage of the `topologicalSort` function in `hack/docker/gen/main.go`. # Extract 10 lines before and after the usage of `topologicalSort` to understand its context. rg --type go 'topologicalSort' -A 10 -B 10 hack/docker/gen/main.goLength of output: 1465
172-185
: LGTM! Verify the correctness of the new function.The
RunMounts
function facilitates the creation of Docker mount commands, improving the handling of container mounts.Ensure that the new function is correctly integrated and functioning as expected.
Verification successful
The
RunMounts
function is correctly integrated and functioning as expected.The function is used within the template rendering process for Docker commands and is assigned appropriate values in various contexts.
hack/docker/gen/main.go
: Multiple instances wheredata.RunMounts
is assigned values and used in template rendering.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the `RunMounts` function. # Test: Search for the usage of the `RunMounts` function in the codebase. Expect: The function should be correctly integrated and functioning as expected. rg --type go 'RunMounts'Length of output: 416
Script:
#!/bin/bash # Description: Extract context around the usage of `RunMounts` in the `hack/docker/gen/main.go` file. # Extract 5 lines before and after the matches to understand the context. rg --type go 'RunMounts' -A 5 -B 5 hack/docker/gen/main.goLength of output: 2995
Tools
GitHub Check: codecov/patch
[warning] 172-174: hack/docker/gen/main.go#L172-L174
Added lines #L172 - L174 were not covered by tests
[warning] 176-179: hack/docker/gen/main.go#L176-L179
Added lines #L176 - L179 were not covered by tests
[warning] 181-181: hack/docker/gen/main.go#L181
Added line #L181 was not covered by tests
[warning] 183-183: hack/docker/gen/main.go#L183
Added line #L183 was not covered by tests
Line range hint
722-763
:
LGTM! Verify the correctness of the improved control flow.The control flow for setting up Docker images and executing commands based on the container type has been improved, streamlining the process.
Ensure that the improved control flow is correctly integrated and functioning as expected.
Verification successful
Control flow improvements for Docker images and commands are correctly integrated.
The control flow for setting up Docker images and executing commands based on the container type has been improved, streamlining the process. The changes are consistent and correctly handle each container type.
hack/docker/gen/main.go
: Verified the case statements and associated logic for different container types (e.g., Go, Rust, DevContainer, HelmOperator, CIContainer).Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the improved control flow for Docker images and commands. # Test: Search for the control flow logic in the codebase. Expect: The improved control flow should be correctly integrated and functioning as expected. rg --type go 'ContainerType'Length of output: 1265
Script:
#!/bin/bash # Extract and display the relevant code snippets where `ContainerType` is used in hack/docker/gen/main.go rg --type go -A 5 -B 5 'ContainerType' hack/docker/gen/main.goLength of output: 5096
Tools
GitHub Check: codecov/patch
[warning] 722-725: hack/docker/gen/main.go#L722-L725
Added lines #L722 - L725 were not covered by tests
[warning] 734-738: hack/docker/gen/main.go#L734-L738
Added lines #L734 - L738 were not covered by tests
[warning] 740-740: hack/docker/gen/main.go#L740
Added line #L740 was not covered by tests
[warning] 747-750: hack/docker/gen/main.go#L747-L750
Added lines #L747 - L750 were not covered by tests
270-277
: LGTM! Verify the correctness of the updated map.New container types such as
CIContainer
have been added to thecontainerTypeName
map, reflecting support for additional container types.Ensure that the updated map is correctly integrated and functioning as expected.
Verification successful
The updated
containerTypeName
map is correctly integrated.The
CIContainer
type, along with other new container types, is used in various contexts within thehack/docker/gen/main.go
file, including in theString()
method of theContainerType
type. This confirms that the new container types are correctly handled and integrated.
hack/docker/gen/main.go
:containerTypeName
map initialization and usage in theString()
method.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the updated `containerTypeName` map. # Test: Search for the usage of the `containerTypeName` map in the codebase. Expect: The updated map should be correctly integrated and functioning as expected. rg --type go 'containerTypeName'Length of output: 156
Script:
#!/bin/bash # Description: Retrieve the function containing the `return containerTypeName[c]` statement. # Search for the function containing the `return containerTypeName[c]` statement in `hack/docker/gen/main.go`. ast-grep --lang go --pattern $'func $_($_) $_ { $$$ return containerTypeName[$_] $$$ }' hack/docker/gen/main.goLength of output: 118
Script:
#!/bin/bash # Description: Search for any tests or usages of the new container types in the codebase. # Search for usages of `CIContainer` in the codebase. rg --type go 'CIContainer'Length of output: 453
Script:
#!/bin/bash # Description: Retrieve the function containing the `return containerTypeName[c]` statement. # Adjusted pattern to capture the function containing the `return containerTypeName[c]` statement in `hack/docker/gen/main.go`. ast-grep --lang go --pattern $'func $_($_) $_ { $$$ return containerTypeName[$_] }' hack/docker/gen/main.goLength of output: 112
Script:
#!/bin/bash # Description: Retrieve the context around the lines where `CIContainer` is used in `hack/docker/gen/main.go`. # Search for `CIContainer` in `hack/docker/gen/main.go` and include context lines. rg --type go -A 5 -B 5 'CIContainer' hack/docker/gen/main.goLength of output: 2012
Script:
#!/bin/bash # Description: Retrieve the function containing the `return containerTypeName[c]` statement. # Adjusted pattern to capture the function containing the `return containerTypeName[c]` statement in `hack/docker/gen/main.go`. ast-grep --lang go --pattern $'func $_($_) $_ { $$$ return containerTypeName[$_] }' hack/docker/gen/main.goLength of output: 112
Script:
#!/bin/bash # Description: Search for the usage of `containerTypeName` in the context of functions. # Search for `containerTypeName` usage in the context of functions in the codebase. rg --type go -A 5 -B 5 'containerTypeName' hack/docker/gen/main.goLength of output: 356
203-221
: LGTM! Verify the correctness of the updated structure.The
Data
structure has been updated to include new fields such asBuildUser
andRunMounts
, reflecting a more comprehensive configuration setup.Ensure that the updated structure is correctly integrated and functioning as expected.
Makefile (4)
82-82
: Reintroduction ofGO_VERSION
is appropriate.Ensuring the Go version is explicitly set from the
versions/GO_VERSION
file maintains consistency in the build environment.
144-144
: Upgrade to C++23 standard is beneficial.Updating
LDFLAGS
to use-std=gnu++23
enables new language features and improvements in the compilation process.
147-147
: Inclusion of-lquadmath
inFAISS_LDFLAGS
is appropriate.Adding support for quad precision math enhances the linking process for certain computational tasks.
655-672
: Addition ofcmake/install
target is beneficial.Ensuring the correct version of CMake is used is critical for projects that depend on specific features or behaviors of CMake.
pkg/agent/core/ngt/handler/grpc/search_test.go (1)
95-96
: Enhanced error message improves debugging.Including a serialized representation of the actual results in JSON format provides more context for debugging.
.gitfiles (4)
1975-1975
: Ensure proper configuration of Rust toolchain.Verify that the
rust/rust-toolchain
file is correctly configured for the Rust toolchain.Verification successful
The
rust/rust-toolchain
file correctly specifies the Rust toolchain version as1.80.0
. This is a valid configuration.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the contents of the rust-toolchain file. # Test: Display the contents of the file. cat rust/rust-toolchainLength of output: 32
121-121
: Ensure proper configuration of action update workflow.Verify that the
.github/workflows/update-actions.yaml
file is correctly configured to update actions in the CI/CD pipeline.
2053-2053
: Ensure proper specification of Peter Evans create pull request action version.Verify that the
versions/actions/PETER_EVANS_CREATE_PULL_REQUEST
file correctly specifies the version of the Peter Evans create pull request action.
74-74
: Ensure proper configuration of conflict check workflow.Verify that the
.github/workflows/check-conflict.yml
file is correctly configured to check for conflicts in the CI/CD pipeline.Verification successful
The conflict check workflow is correctly configured.
The
.github/workflows/check-conflict.yml
file is properly set up to check for conflicts in pull requests and notify the user if any conflicts are found.
- The workflow is triggered on pull requests.
- It includes steps to check out the repository, set Git configuration, and search for conflict markers.
- If conflicts are found, it posts a comment on the pull request using the GitHub API.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the contents of the check-conflict.yml file. # Test: Display the contents of the file. cat .github/workflows/check-conflict.ymlLength of output: 2292
pkg/agent/core/ngt/handler/grpc/insert_test.go (3)
Line range hint
737-744
:
Clarify error message for invalid UUID or vector.The updated error message provides more detailed information about the invalid UUID or vector, which improves the clarity of the error reporting.
Line range hint
789-796
:
Clarify error message for invalid UUID or vector.The updated error message provides more detailed information about the invalid UUID or vector, which improves the clarity of the error reporting.
Line range hint
841-848
:
Clarify error message for invalid UUID or vector.The updated error message provides more detailed information about the invalid UUID or vector, which improves the clarity of the error reporting.
.PHONY: e2e/actions/run/readreplica | ||
## run GitHub Actions E2E test (Stream CRUD with read replica ) | ||
e2e/actions/run/readreplica: \ | ||
hack/benchmark/assets/dataset/$(E2E_DATASET_NAME) \ | ||
minikube/restart | ||
kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
sleep 2 | ||
kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
sleep 3 | ||
make k8s/vald/deploy \ | ||
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml | ||
sleep 20 | ||
kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
make k8s/vald-readreplica/deploy \ | ||
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml | ||
sleep 3 | ||
kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | ||
kubectl get pods | ||
pod_name=$$(kubectl get pods --selector="app=$(LB_GATEWAY_IMAGE)" | tail -1 | awk '{print $$1}'); \ | ||
echo $$pod_name; \ | ||
make E2E_TARGET_POD_NAME=$$pod_name e2e/readreplica | ||
make k8s/vald/delete | ||
$(MAKE) minikube/delete |
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.
Add error handling for kubectl commands.
The kubectl
commands should include error handling to ensure the script exits if any command fails.
- kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
- kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
- kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
- kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
- kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
- kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
- kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
+ kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
.PHONY: e2e/actions/run/readreplica | |
## run GitHub Actions E2E test (Stream CRUD with read replica ) | |
e2e/actions/run/readreplica: \ | |
hack/benchmark/assets/dataset/$(E2E_DATASET_NAME) \ | |
minikube/restart | |
kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
sleep 2 | |
kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
sleep 3 | |
make k8s/vald/deploy \ | |
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml | |
sleep 20 | |
kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
make k8s/vald-readreplica/deploy \ | |
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml | |
sleep 3 | |
kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) | |
kubectl get pods | |
pod_name=$$(kubectl get pods --selector="app=$(LB_GATEWAY_IMAGE)" | tail -1 | awk '{print $$1}'); \ | |
echo $$pod_name; \ | |
make E2E_TARGET_POD_NAME=$$pod_name e2e/readreplica | |
make k8s/vald/delete | |
$(MAKE) minikube/delete | |
.PHONY: e2e/actions/run/readreplica | |
## run GitHub Actions E2E test (Stream CRUD with read replica ) | |
e2e/actions/run/readreplica: \ | |
hack/benchmark/assets/dataset/$(E2E_DATASET_NAME) \ | |
minikube/restart | |
kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
sleep 2 | |
kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
sleep 3 | |
make k8s/vald/deploy \ | |
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml | |
sleep 20 | |
kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
make k8s/vald-readreplica/deploy \ | |
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml | |
sleep 3 | |
kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) || exit 1 | |
kubectl get pods | |
pod_name=$$(kubectl get pods --selector="app=$(LB_GATEWAY_IMAGE)" | tail -1 | awk '{print $$1}'); \ | |
echo $$pod_name; \ | |
make E2E_TARGET_POD_NAME=$$pod_name e2e/readreplica | |
make k8s/vald/delete | |
$(MAKE) minikube/delete |
prettier/install: $(NPM_GLOBAL_PREFIX)/bin/prettier | ||
$(NPM_GLOBAL_PREFIX)/bin/prettier: | ||
npm config -g set registry http://registry.npmjs.org/ | ||
npm cache clean --force |
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.
Add error handling for npm commands.
The npm
commands should include error handling to ensure the script exits if any command fails.
- npm config -g set registry http://registry.npmjs.org/
+ npm config -g set registry http://registry.npmjs.org/ || exit 1
- npm cache clean --force
+ npm cache clean --force || exit 1
- type prettier || npm install -g prettier
+ type prettier || npm install -g prettier || exit 1
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
prettier/install: $(NPM_GLOBAL_PREFIX)/bin/prettier | |
$(NPM_GLOBAL_PREFIX)/bin/prettier: | |
npm config -g set registry http://registry.npmjs.org/ | |
npm cache clean --force | |
prettier/install: $(NPM_GLOBAL_PREFIX)/bin/prettier | |
$(NPM_GLOBAL_PREFIX)/bin/prettier: | |
npm config -g set registry http://registry.npmjs.org/ || exit 1 | |
npm cache clean --force || exit 1 | |
type prettier || npm install -g prettier || exit 1 |
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Potential security issue: Avoid using root user.
The USER root:root
directive allows for elevated permissions during the build phase but can pose security risks. It is recommended to revert to a non-root user after the necessary operations.
- USER root:root
+ USER nonroot:nonroot
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
USER root:root | |
USER nonroot:nonroot |
rustup toolchain install $(RUST_VERSION) | ||
rustup default $(RUST_VERSION) |
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.
Add error handling for rustup commands.
The rustup
commands should include error handling to ensure the script exits if any command fails.
- rustup toolchain install $(RUST_VERSION)
+ rustup toolchain install $(RUST_VERSION) || exit 1
- rustup default $(RUST_VERSION)
+ rustup default $(RUST_VERSION) || exit 1
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
rustup toolchain install $(RUST_VERSION) | |
rustup default $(RUST_VERSION) | |
rustup toolchain install $(RUST_VERSION) || exit 1 | |
rustup default $(RUST_VERSION) || exit 1 |
RUN --mount=type=bind,target=.,rw \ | ||
--mount=type=tmpfs,target=/tmp \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ | ||
&& echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ | ||
&& apt-get clean \ | ||
&& apt-get update -y \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y --no-install-recommends --fix-missing \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
tzdata \ | ||
locales \ | ||
git \ | ||
&& ldconfig \ | ||
&& echo "${LANG} UTF-8" > /etc/locale.gen \ | ||
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ | ||
&& locale-gen ${LANGUAGE} \ | ||
&& update-locale LANG=${LANGUAGE} \ | ||
&& dpkg-reconfigure -f noninteractive tzdata \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
/var/cache/* \ | ||
&& apt-get autoremove | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
COPY Makefile . | ||
COPY .git . | ||
COPY go.mod . | ||
COPY go.sum . | ||
COPY cmd/${PKG}/sample.yaml /tmp/config.yaml | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d | ||
COPY Makefile.d . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions | ||
COPY versions . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal | ||
COPY internal . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc | ||
COPY apis/grpc . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} | ||
COPY pkg/${PKG} . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
COPY cmd/${PKG} . | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
#skipcq: DOK-W1001, DOK-SC2086 | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make GO_VERSION="${GO_VERSION}" go/install \ | ||
&& make go/download \ | ||
&& apt-get autoclean -y \ | ||
&& apt-get autoremove -y \ | ||
&& make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ | ||
&& make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ |
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.
Pin versions in apt-get install.
The apt-get install
command should pin package versions to ensure reproducible builds.
- && apt-get install -y --no-install-recommends --fix-missing \
+ && apt-get install -y --no-install-recommends --fix-missing \
+ build-essential=<version> \
+ ca-certificates=<version> \
+ curl=<version> \
+ tzdata=<version> \
+ locales=<version> \
+ git=<version> \
Committable suggestion was skipped due to low confidence.
RUN --mount=type=bind,target=.,rw \ | ||
--mount=type=tmpfs,target=/tmp \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ | ||
&& echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ | ||
&& apt-get clean \ | ||
&& apt-get update -y \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y --no-install-recommends --fix-missing \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
tzdata \ | ||
locales \ | ||
git \ | ||
&& ldconfig \ | ||
&& echo "${LANG} UTF-8" > /etc/locale.gen \ | ||
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ | ||
&& locale-gen ${LANGUAGE} \ | ||
&& update-locale LANG=${LANGUAGE} \ | ||
&& dpkg-reconfigure -f noninteractive tzdata \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
/var/cache/* \ | ||
&& apt-get autoremove | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
COPY Makefile . | ||
COPY .git . | ||
COPY go.mod . | ||
COPY go.sum . | ||
COPY cmd/${PKG}/sample.yaml /tmp/config.yaml | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d | ||
COPY Makefile.d . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions | ||
COPY versions . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal | ||
COPY internal . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc | ||
COPY apis/grpc . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} | ||
COPY pkg/${PKG} . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
COPY cmd/${PKG} . | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
#skipcq: DOK-W1001, DOK-SC2086 | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make GO_VERSION="${GO_VERSION}" go/install \ | ||
&& make go/download \ | ||
&& apt-get autoclean -y \ | ||
&& apt-get autoremove -y \ | ||
&& make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ | ||
&& make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ |
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.
Pin versions in apt-get install.
The apt-get install
command should pin package versions to ensure reproducible builds.
- && apt-get install -y --no-install-recommends --fix-missing \
+ && apt-get install -y --no-install-recommends --fix-missing \
+ build-essential=<version> \
+ ca-certificates=<version> \
+ curl=<version> \
+ tzdata=<version> \
+ locales=<version> \
+ git=<version> \
Committable suggestion was skipped due to low confidence.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Potential security issue: Avoid using root user.
The USER root:root
directive allows for elevated permissions during the build phase but can pose security risks. It is recommended to revert to a non-root user after the necessary operations.
- USER root:root
+ USER nonroot:nonroot
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
USER root:root | |
USER nonroot:nonroot |
RUN --mount=type=bind,target=.,rw \ | ||
--mount=type=tmpfs,target=/tmp \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ | ||
&& echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ | ||
&& apt-get clean \ | ||
&& apt-get update -y \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y --no-install-recommends --fix-missing \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
tzdata \ | ||
locales \ | ||
git \ | ||
&& ldconfig \ | ||
&& echo "${LANG} UTF-8" > /etc/locale.gen \ | ||
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ | ||
&& locale-gen ${LANGUAGE} \ | ||
&& update-locale LANG=${LANGUAGE} \ | ||
&& dpkg-reconfigure -f noninteractive tzdata \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
/var/cache/* \ | ||
&& apt-get autoremove | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
COPY Makefile . | ||
COPY .git . | ||
COPY go.mod . | ||
COPY go.sum . | ||
COPY cmd/${PKG}/sample.yaml /tmp/config.yaml | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d | ||
COPY Makefile.d . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions | ||
COPY versions . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal | ||
COPY internal . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc | ||
COPY apis/grpc . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} | ||
COPY pkg/${PKG} . | ||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
COPY cmd/${PKG} . | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
#skipcq: DOK-W1001, DOK-SC2086 | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make GO_VERSION="${GO_VERSION}" go/install \ | ||
&& make go/download \ | ||
&& apt-get autoclean -y \ | ||
&& apt-get autoremove -y \ | ||
&& make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ | ||
&& make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ |
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.
Pin versions in apt-get install.
The apt-get install
command should pin package versions to ensure reproducible builds.
- && apt-get install -y --no-install-recommends --fix-missing \
+ && apt-get install -y --no-install-recommends --fix-missing \
+ build-essential=<version> \
+ ca-certificates=<version> \
+ curl=<version> \
+ tzdata=<version> \
+ locales=<version> \
+ git=<version> \
Committable suggestion was skipped due to low confidence.
FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
# skipcq: DOK-DL3002 | ||
USER root:root |
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.
Potential security issue: Avoid using root user.
The USER root:root
directive allows for elevated permissions during the build phase but can pose security risks. It is recommended to revert to a non-root user after the necessary operations.
- USER root:root
+ USER nonroot:nonroot
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
USER root:root | |
USER nonroot:nonroot |
ENV ORG=vdaas | ||
ENV PKG=discoverer/k8s | ||
ENV REPO=vald | ||
ENV TZ=Etc/UTC | ||
ENV USER=root |
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.
Potential security issue: Avoid using root user.
The ENV USER=root
directive sets the default user to root, which can pose security risks. It is recommended to use a non-root user.
- ENV USER=root
+ ENV USER=nonroot
Committable suggestion was skipped due to low confidence.
fix: git add chart directory for release (#2356) (#2357) [patch] release v1.7.11 (#2358) :bookmark: :robot: Release v1.7.11 (#2360) Change docker scan timeout longer (#2363) (#2364) refactor code using golangci-lint (#2362) (#2365) Create SECURITY.md (#2367) (#2368) add commit hash build image (#2359) (#2371) update docker build target platform selection rules (#2370) (#2374) Make agent export index metrics to Pod k8s resource (#2319) (#2372) backport ci deps others (#2386) Update workflow to release readreplica chart (#2383) (#2387) :green_heart: :recycle: Add Con-Bench helm chart to the Vald charts (#2388) (#2389) Delete unnecessary code for mirror (#2366) (#2391) change JP logo to EN logo (#2369) (#2392) Add rotate-all option to rotator (#2305) (#2393) fix: build error of internal kvs test (#2396) (#2398) Resolve kvs already closed before last saving (#2390) (#2394) :robot: Update license headers / Format Go codes and YAML files (#2397) (#2400) create continous benchmark doc (#2352) (#2395) fix: disable protobuf dispatch for client (#2401) (#2403) update deps (#2404) (#2405) [patch] release v1.7.12 (#2406) :bookmark: :robot: Release v1.7.12 (#2408) :pencil: Fix typo of file name (#2413) (#2415) Fix agent-faiss build failed (#2418) (#2419) Add tests for index information export (#2412) (#2414) Fix the logic to determine docker image (#2410) (#2420) Update build rule for nightly image (#2421) (#2422) Fix output settings to determine-docker-image-tag action and release branch build tag name (#2423) (#2425) Add `index-operator` template implementation (#2375) (#2424) fix: typo of execution rule (#2426) (#2427) Backport Flush API (#2434) update deps & add validation for Flush API when agent is Read Only (#2433) (#2436) docs: add hrichiksite as a contributor for doc (#2441) (#2442) fix: bugfix version update for docker build (#2445) (#2446) Fix index job logic to pass DNS A record (#2438) (#2448) Added snapshot timestamp annotations to read replica agent (#2428) (#2443) Fix operator-sdk version (#2447) (#2449) add file name lint (#2417) (#2450) fix: add extra option for ci-container build (#2451) (#2452) Add base of benchmark operator dashboard (#2430) (#2453) Implement index operator logic for read replica rotation (#2444) (#2456) add inner product distance type for ngt (#2454) (#2458) Fix e2e for read replica and add e2e for index operator (#2455) (#2459) Add unit tests for index operator (#2460) (#2461) Bugfix recreate benchmark job when operator reboot (#2463) (#2464) Refactor k8s types (#2462) (#2465) :robot: Automatically update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE (#2457) (#2469) Fix workflow trigger for backport pr creation (#2471) (#2472) Automatically add backport main label for release-pr (#2473) (#2475) update deps (#2468) (#2476) Implement client metrics interceptor for continuous benchmark job (#2477) (#2480) :chart_with_upwards_trend: Add client metrics panels for continuous benchmark job (#2481) (#2483) Update continuous benchmark docs (#2485) (#2486) Sync release/v1.7 to main (#2495) add read replica and rotator docs (#2497) (#2499) add reviewer guideline (#2507) (#2508) update large top-K ratio handling logic (#2509) (#2511) Change default image tag from latest to nightly (#2516) (#2518) Bugfix that caused an error when argument has 3 or more nil arguments (#2517) (#2520) add faiss in values.yaml & valdrelease.yaml (#2514) (#2519) capitalize faq (#2512) (#2522) Backport docs updates to release/v1.7 (#2521) [CI] Add workflow to synchronize ubuntu base image (#2526) (#2527) fix: update schedule (#2528) (#2530) refactor index manager service add index service API to expose index informations (#2525) (#2532) fix conflict bug (#2537) fix: make format (#2534) (#2540) Backport PR #2542, #2538 to release/v1.7 (#2543) fix: add checkout option (#2545) (#2546) Implement ngt Statistics API (#2539) (#2547) Add workflow to check git conflict for backport PR (#2548) (#2550) [create-pull-request] automated change (#2552) (#2556) Update dependencies, C++ standard, and improve Dockerfiles for better build systems and localization (#2549) (#2557) Backport #2559 (#2560) [BUGFIX] index correction process (#2565) (#2566) change external docker image reference to ghcr.io registry (#2567) (#2568) [patch] Release v1.7.13 (#2569) :bookmark: :robot: Release v1.7.13 (#2570) add HTTP2 support for http.Client and Vald HTTP Server (#2572) (#2575) Signed-off-by: kpango <[email protected]>
fix: git add chart directory for release (#2356) (#2357) [patch] release v1.7.11 (#2358) :bookmark: :robot: Release v1.7.11 (#2360) Change docker scan timeout longer (#2363) (#2364) refactor code using golangci-lint (#2362) (#2365) Create SECURITY.md (#2367) (#2368) add commit hash build image (#2359) (#2371) update docker build target platform selection rules (#2370) (#2374) Make agent export index metrics to Pod k8s resource (#2319) (#2372) backport ci deps others (#2386) Update workflow to release readreplica chart (#2383) (#2387) :green_heart: :recycle: Add Con-Bench helm chart to the Vald charts (#2388) (#2389) Delete unnecessary code for mirror (#2366) (#2391) change JP logo to EN logo (#2369) (#2392) Add rotate-all option to rotator (#2305) (#2393) fix: build error of internal kvs test (#2396) (#2398) Resolve kvs already closed before last saving (#2390) (#2394) :robot: Update license headers / Format Go codes and YAML files (#2397) (#2400) create continous benchmark doc (#2352) (#2395) fix: disable protobuf dispatch for client (#2401) (#2403) update deps (#2404) (#2405) [patch] release v1.7.12 (#2406) :bookmark: :robot: Release v1.7.12 (#2408) :pencil: Fix typo of file name (#2413) (#2415) Fix agent-faiss build failed (#2418) (#2419) Add tests for index information export (#2412) (#2414) Fix the logic to determine docker image (#2410) (#2420) Update build rule for nightly image (#2421) (#2422) Fix output settings to determine-docker-image-tag action and release branch build tag name (#2423) (#2425) Add `index-operator` template implementation (#2375) (#2424) fix: typo of execution rule (#2426) (#2427) Backport Flush API (#2434) update deps & add validation for Flush API when agent is Read Only (#2433) (#2436) docs: add hrichiksite as a contributor for doc (#2441) (#2442) fix: bugfix version update for docker build (#2445) (#2446) Fix index job logic to pass DNS A record (#2438) (#2448) Added snapshot timestamp annotations to read replica agent (#2428) (#2443) Fix operator-sdk version (#2447) (#2449) add file name lint (#2417) (#2450) fix: add extra option for ci-container build (#2451) (#2452) Add base of benchmark operator dashboard (#2430) (#2453) Implement index operator logic for read replica rotation (#2444) (#2456) add inner product distance type for ngt (#2454) (#2458) Fix e2e for read replica and add e2e for index operator (#2455) (#2459) Add unit tests for index operator (#2460) (#2461) Bugfix recreate benchmark job when operator reboot (#2463) (#2464) Refactor k8s types (#2462) (#2465) :robot: Automatically update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE (#2457) (#2469) Fix workflow trigger for backport pr creation (#2471) (#2472) Automatically add backport main label for release-pr (#2473) (#2475) update deps (#2468) (#2476) Implement client metrics interceptor for continuous benchmark job (#2477) (#2480) :chart_with_upwards_trend: Add client metrics panels for continuous benchmark job (#2481) (#2483) Update continuous benchmark docs (#2485) (#2486) Sync release/v1.7 to main (#2495) add read replica and rotator docs (#2497) (#2499) add reviewer guideline (#2507) (#2508) update large top-K ratio handling logic (#2509) (#2511) Change default image tag from latest to nightly (#2516) (#2518) Bugfix that caused an error when argument has 3 or more nil arguments (#2517) (#2520) add faiss in values.yaml & valdrelease.yaml (#2514) (#2519) capitalize faq (#2512) (#2522) Backport docs updates to release/v1.7 (#2521) [CI] Add workflow to synchronize ubuntu base image (#2526) (#2527) fix: update schedule (#2528) (#2530) refactor index manager service add index service API to expose index informations (#2525) (#2532) fix conflict bug (#2537) fix: make format (#2534) (#2540) Backport PR #2542, #2538 to release/v1.7 (#2543) fix: add checkout option (#2545) (#2546) Implement ngt Statistics API (#2539) (#2547) Add workflow to check git conflict for backport PR (#2548) (#2550) [create-pull-request] automated change (#2552) (#2556) Update dependencies, C++ standard, and improve Dockerfiles for better build systems and localization (#2549) (#2557) Backport #2559 (#2560) [BUGFIX] index correction process (#2565) (#2566) change external docker image reference to ghcr.io registry (#2567) (#2568) [patch] Release v1.7.13 (#2569) :bookmark: :robot: Release v1.7.13 (#2570) add HTTP2 support for http.Client and Vald HTTP Server (#2572) (#2575) Signed-off-by: kpango <[email protected]>
fix: git add chart directory for release (#2356) (#2357) [patch] release v1.7.11 (#2358) :bookmark: :robot: Release v1.7.11 (#2360) Change docker scan timeout longer (#2363) (#2364) refactor code using golangci-lint (#2362) (#2365) Create SECURITY.md (#2367) (#2368) add commit hash build image (#2359) (#2371) update docker build target platform selection rules (#2370) (#2374) Make agent export index metrics to Pod k8s resource (#2319) (#2372) backport ci deps others (#2386) Update workflow to release readreplica chart (#2383) (#2387) :green_heart: :recycle: Add Con-Bench helm chart to the Vald charts (#2388) (#2389) Delete unnecessary code for mirror (#2366) (#2391) change JP logo to EN logo (#2369) (#2392) Add rotate-all option to rotator (#2305) (#2393) fix: build error of internal kvs test (#2396) (#2398) Resolve kvs already closed before last saving (#2390) (#2394) :robot: Update license headers / Format Go codes and YAML files (#2397) (#2400) create continous benchmark doc (#2352) (#2395) fix: disable protobuf dispatch for client (#2401) (#2403) update deps (#2404) (#2405) [patch] release v1.7.12 (#2406) :bookmark: :robot: Release v1.7.12 (#2408) :pencil: Fix typo of file name (#2413) (#2415) Fix agent-faiss build failed (#2418) (#2419) Add tests for index information export (#2412) (#2414) Fix the logic to determine docker image (#2410) (#2420) Update build rule for nightly image (#2421) (#2422) Fix output settings to determine-docker-image-tag action and release branch build tag name (#2423) (#2425) Add `index-operator` template implementation (#2375) (#2424) fix: typo of execution rule (#2426) (#2427) Backport Flush API (#2434) update deps & add validation for Flush API when agent is Read Only (#2433) (#2436) docs: add hrichiksite as a contributor for doc (#2441) (#2442) fix: bugfix version update for docker build (#2445) (#2446) Fix index job logic to pass DNS A record (#2438) (#2448) Added snapshot timestamp annotations to read replica agent (#2428) (#2443) Fix operator-sdk version (#2447) (#2449) add file name lint (#2417) (#2450) fix: add extra option for ci-container build (#2451) (#2452) Add base of benchmark operator dashboard (#2430) (#2453) Implement index operator logic for read replica rotation (#2444) (#2456) add inner product distance type for ngt (#2454) (#2458) Fix e2e for read replica and add e2e for index operator (#2455) (#2459) Add unit tests for index operator (#2460) (#2461) Bugfix recreate benchmark job when operator reboot (#2463) (#2464) Refactor k8s types (#2462) (#2465) :robot: Automatically update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE (#2457) (#2469) Fix workflow trigger for backport pr creation (#2471) (#2472) Automatically add backport main label for release-pr (#2473) (#2475) update deps (#2468) (#2476) Implement client metrics interceptor for continuous benchmark job (#2477) (#2480) :chart_with_upwards_trend: Add client metrics panels for continuous benchmark job (#2481) (#2483) Update continuous benchmark docs (#2485) (#2486) Sync release/v1.7 to main (#2495) add read replica and rotator docs (#2497) (#2499) add reviewer guideline (#2507) (#2508) update large top-K ratio handling logic (#2509) (#2511) Change default image tag from latest to nightly (#2516) (#2518) Bugfix that caused an error when argument has 3 or more nil arguments (#2517) (#2520) add faiss in values.yaml & valdrelease.yaml (#2514) (#2519) capitalize faq (#2512) (#2522) Backport docs updates to release/v1.7 (#2521) [CI] Add workflow to synchronize ubuntu base image (#2526) (#2527) fix: update schedule (#2528) (#2530) refactor index manager service add index service API to expose index informations (#2525) (#2532) fix conflict bug (#2537) fix: make format (#2534) (#2540) Backport PR #2542, #2538 to release/v1.7 (#2543) fix: add checkout option (#2545) (#2546) Implement ngt Statistics API (#2539) (#2547) Add workflow to check git conflict for backport PR (#2548) (#2550) [create-pull-request] automated change (#2552) (#2556) Update dependencies, C++ standard, and improve Dockerfiles for better build systems and localization (#2549) (#2557) Backport #2559 (#2560) [BUGFIX] index correction process (#2565) (#2566) change external docker image reference to ghcr.io registry (#2567) (#2568) [patch] Release v1.7.13 (#2569) :bookmark: :robot: Release v1.7.13 (#2570) add HTTP2 support for http.Client and Vald HTTP Server (#2572) (#2575) Signed-off-by: kpango <[email protected]>
Description
This commit includes updates to various dependencies, Dockerfile enhancements, and build configuration improvements:
Dependency Updates:
Upgraded modules in go.mod, including code.cloudfoundry.org/bytefmt, github.com/aws/aws-sdk-go, github.com/google/pprof, github.com/onsi/ginkgo/v2, and several Kubernetes-related modules.
Makefile Changes:
Updated C++ standard from gnu++20 to gnu++23.
Specified build directories for NGT and FAISS using the -B option.
Added a target for CMake installation, including cloning the repository and configuring build parameters.
Dockerfile Enhancements:
Set environment variables for locale (LANGUAGE, LC_ALL) and timezone (TZ).
Added packages like locales and tzdata for locale generation and timezone management.
Improved cleanup commands with apt-get autoclean -y for a cleaner build process.
Set the USER directive to root:root to affect permissions during the build process.
Rust Toolchain Updates:
Updated Rust version to 1.80.0.
Version File Updates:
CMake version set to 3.30.1.
Updated Jaeger Operator from 2.54.0 to 2.55.0.
Rolled back Operator SDK from v1.35 to v1.33.
Updated Prometheus Stack from 61.3.2 to 61.6.0.
Updated Rust version from 1.77.2 to 1.80.0.
These changes aim to improve the build process, localization, and timezone management within the containers, ensuring a more efficient and consistent development environment.
Related Issue
Versions
Checklist
Special notes for your reviewer
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Chores