Skip to content
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 #2806 to release/v1.7 for 🐛 fix go build argument (#2806) #2810

Conversation

vankichi
Copy link
Contributor

@vankichi vankichi commented Jan 23, 2025

  • fix go build argument

  • update go

Description

Related Issue

Versions

  • Vald Version: v1.7.15
  • Go Version: v1.23.4
  • Rust Version: v1.83.0
  • Docker Version: v27.4.0
  • Kubernetes Version: v1.32.0
  • Helm Version: v3.16.3
  • NGT Version: v2.3.5
  • Faiss Version: v1.9.0

Checklist

Special notes for your reviewer

Summary by CodeRabbit

  • Dependency Updates

    • Go version updated from 1.23.4 to 1.23.5
    • Multiple package dependencies updated across various modules
    • Updated dependencies for cloud services, Azure, AWS, and testing frameworks
  • Build Configuration

    • Modified Dockerfiles to adjust repository referencing in build commands
    • Updated make command arguments to include both organization and repository names

* fix go build argument

* update go
Copy link
Contributor

coderabbitai bot commented Jan 23, 2025

📝 Walkthrough

Walkthrough

This pull request involves a comprehensive update across multiple Dockerfiles in the project. The primary modification is a consistent change to the make command's REPO argument in various Dockerfiles. Instead of using just the ORG variable, the command now concatenates ORG and REPO with a slash, potentially affecting how repositories are referenced during the build process. Additionally, the Go version has been updated from 1.23.4 to 1.23.5 across multiple go.mod files and dependency versions have been incrementally updated.

Changes

File Path Change Summary
dockers/*/Dockerfile Updated make command to use REPO="${ORG}/${REPO}" instead of REPO="${ORG}"
example/client/go.mod Go version updated to 1.23.5, multiple dependencies upgraded
go.mod Go version updated to 1.23.5, numerous dependencies updated
versions/GO_VERSION Version number incremented from 1.23.4 to 1.23.5

Possibly related PRs

Suggested Labels

type/bug, priority/medium, actions/backport/release/v1.7

Suggested Reviewers

  • vankichi

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

Copy link

cloudflare-workers-and-pages bot commented Jan 23, 2025

Deploying vald with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6919a58
Status: ✅  Deploy successful!
Preview URL: https://5606aad6.vald.pages.dev
Branch Preview URL: https://backport-release-v1-7-bugfix-3ljc.vald.pages.dev

View logs

@vankichi vankichi requested a review from kpango January 23, 2025 08:11
@vankichi
Copy link
Contributor Author

@coderabbitai review please

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
dockers/agent/core/faiss/Dockerfile (1)

89-89: Overall implementation looks great!

The changes across all Dockerfiles:

  1. Consistently implement the correct repository reference format
  2. Align with the PR's objective of fixing Go build arguments
  3. Follow the established pattern from the codebase

Note: Since these files are generated by hack/docker/gen/main.go, consider reviewing the generator script to ensure it's updated to consistently produce this format.

Also applies to: 88-88, 90-90

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 00a886b and 6919a58.

⛔ Files ignored due to path filters (3)
  • example/client/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • hack/docker/gen/main.go is excluded by !**/gen/**
📒 Files selected for processing (23)
  • dockers/agent/core/faiss/Dockerfile (1 hunks)
  • dockers/agent/core/ngt/Dockerfile (1 hunks)
  • dockers/agent/sidecar/Dockerfile (1 hunks)
  • dockers/discoverer/k8s/Dockerfile (1 hunks)
  • dockers/example/client/Dockerfile (1 hunks)
  • dockers/gateway/filter/Dockerfile (1 hunks)
  • dockers/gateway/lb/Dockerfile (1 hunks)
  • dockers/gateway/mirror/Dockerfile (1 hunks)
  • dockers/index/job/correction/Dockerfile (1 hunks)
  • dockers/index/job/creation/Dockerfile (1 hunks)
  • dockers/index/job/deletion/Dockerfile (1 hunks)
  • dockers/index/job/readreplica/rotate/Dockerfile (1 hunks)
  • dockers/index/job/save/Dockerfile (1 hunks)
  • dockers/index/operator/Dockerfile (1 hunks)
  • dockers/manager/index/Dockerfile (1 hunks)
  • dockers/tools/benchmark/job/Dockerfile (1 hunks)
  • dockers/tools/benchmark/operator/Dockerfile (1 hunks)
  • dockers/tools/cli/loadtest/Dockerfile (1 hunks)
  • example/client/go.mod (1 hunks)
  • example/client/go.mod.default (1 hunks)
  • go.mod (15 hunks)
  • hack/go.mod.default (1 hunks)
  • versions/GO_VERSION (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • versions/GO_VERSION
  • example/client/go.mod.default
🧰 Additional context used
📓 Learnings (1)
📓 Common learnings
Learnt from: vankichi
PR: vdaas/vald#0
File: :0-0
Timestamp: 2025-01-23T08:14:18.177Z
Learning: In Vald's Dockerfiles, the REPO argument should be set as `REPO="${ORG}/${REPO}"` to properly reference the repository.
🔇 Additional comments (26)
dockers/agent/sidecar/Dockerfile (1)

80-80: LGTM! The Go build argument fix is correctly implemented.

The change to use REPO="${ORG}/${REPO}" instead of REPO="${ORG}" in the make command is consistent with Vald's Dockerfile requirements and properly fixes the Go build argument issue.

Let's verify that this change is consistently applied across all Dockerfiles:

✅ Verification successful

Verified: The REPO argument format is consistently implemented across Dockerfiles

The REPO="${ORG}/${REPO}" format is correctly used in all relevant Dockerfiles, including:

  • dockers/agent/sidecar/Dockerfile
  • dockers/agent/core/faiss/Dockerfile
  • dockers/agent/core/ngt/Dockerfile
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the REPO argument format in all Dockerfiles
# Test: Search for any Dockerfiles still using the old format. Expect: No matches.

echo "Checking for Dockerfiles with incorrect REPO format..."
rg -g 'dockers/*/Dockerfile' 'make.*REPO="\$\{ORG\}".*cmd/'

echo "Verifying the new REPO format is consistently applied..."
rg -g 'dockers/*/Dockerfile' 'make.*REPO="\$\{ORG\}/\$\{REPO\}".*cmd/'

Length of output: 376


Script:

#!/bin/bash
# First verify Dockerfiles exist
echo "Checking for Dockerfiles..."
fd Dockerfile dockers/

echo -e "\nChecking make commands in Dockerfiles..."
rg -g 'dockers/*/Dockerfile' 'make.*cmd/' -A 1 -B 1

echo -e "\nChecking for ORG variable usage..."
rg -g 'dockers/*/Dockerfile' '\${ORG}' -A 1 -B 1

echo -e "\nChecking for REPO variable usage..."
rg -g 'dockers/*/Dockerfile' '\${REPO}' -A 1 -B 1

Length of output: 1600


Script:

#!/bin/bash
echo "Checking make commands in Dockerfiles..."
rg -g 'dockers/*/Dockerfile' 'make.*GOARCH' -A 2 -B 1

echo -e "\nChecking variable usage with fixed regex..."
rg -g 'dockers/*/Dockerfile' '\$\{ORG\}' -A 1 -B 1

echo -e "\nInspecting reference file..."
cat dockers/agent/sidecar/Dockerfile

echo -e "\nInspecting other agent Dockerfiles..."
cat dockers/agent/core/agent/Dockerfile | grep -A 2 -B 1 'make.*GOARCH' || true
cat dockers/agent/core/faiss/Dockerfile | grep -A 2 -B 1 'make.*GOARCH' || true
cat dockers/agent/core/ngt/Dockerfile | grep -A 2 -B 1 'make.*GOARCH' || true

Length of output: 5430

dockers/discoverer/k8s/Dockerfile (1)

80-80: LGTM! The REPO argument fix is correctly applied.

The change from REPO="${ORG}" to REPO="${ORG}/${REPO}" aligns with the correct format for Vald's Dockerfiles, as confirmed by previous learnings.

dockers/index/job/save/Dockerfile (1)

80-80: LGTM! The REPO argument fix is consistently applied.

The REPO argument format matches the fix applied in other Dockerfiles.

dockers/tools/benchmark/operator/Dockerfile (1)

80-80: LGTM! The REPO argument fix is properly implemented.

The change maintains consistency with the repository-wide fix.

dockers/index/operator/Dockerfile (1)

80-80: LGTM! The REPO argument fix is correctly implemented.

The change follows the established pattern for fixing the repository reference.

dockers/index/job/creation/Dockerfile (1)

80-80: LGTM! The REPO argument fix is properly applied.

The change maintains consistency with the fix across all Dockerfiles.

Let's verify that this fix has been applied consistently across all Dockerfiles:

✅ Verification successful

Confirmed: REPO argument format is consistent across all Dockerfiles

All Dockerfiles in the repository consistently use the correct format REPO="${ORG}/${REPO}". The fix has been properly implemented across the entire codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all Dockerfiles use the correct REPO argument format

# Test: Search for any Dockerfiles still using the old format
# Expect: No matches as all should be updated
rg -g 'dockers/*/Dockerfile' 'make.*REPO="\${ORG}".*cmd/'

# Test: Verify all Dockerfiles use the new format
# Expect: All Dockerfiles should use the new format
rg -g 'dockers/*/Dockerfile' 'make.*REPO="\${ORG}/\${REPO}".*cmd/'

Length of output: 385


Script:

#!/bin/bash
# Search for make commands in Dockerfiles with surrounding context
rg -g 'dockers/*/Dockerfile' -B 1 -A 1 'make.*GOARCH.*GOOS.*REPO'

Length of output: 67


Script:

#!/bin/bash
# First find all Dockerfiles
echo "=== Finding Dockerfiles ==="
fd Dockerfile

# Then examine their content
echo -e "\n=== Examining Dockerfile contents ==="
for f in $(fd Dockerfile); do
  echo -e "\n=== File: $f ==="
  cat "$f" | grep -A 1 -B 1 "make.*GOARCH"
done

Length of output: 11873

dockers/index/job/deletion/Dockerfile (1)

80-80: LGTM! The REPO argument is now correctly formatted.

The change properly concatenates ${ORG}/${REPO} in the make command's REPO argument, which aligns with Vald's Dockerfile standards.

Let's verify the consistency of this change across all Dockerfiles:

✅ Verification successful

Verified: REPO argument format is consistent across all Dockerfiles

The change in dockers/index/job/deletion/Dockerfile follows the correct pattern REPO="${ORG}/${REPO}" which is consistently used across all Dockerfiles in the repository. No instances of the old format were found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all Dockerfiles use the correct REPO argument format
# Expected: All make commands should use REPO="${ORG}/${REPO}"

echo "Checking for any Dockerfiles still using the old format..."
rg -l 'make.*REPO="\$\{ORG\}".*' 'dockers/**/*Dockerfile'

echo "Verifying the new format is used consistently..."
rg -l 'make.*REPO="\$\{ORG\}/\$\{REPO\}".*' 'dockers/**/*Dockerfile'

Length of output: 490


Script:

#!/bin/bash
# First, find all Dockerfiles
echo "Listing all Dockerfiles:"
fd Dockerfile

echo -e "\nChecking for old format (REPO=\"\${ORG}\"):"
fd Dockerfile -x rg -l 'make.*REPO="\$\{ORG\}"'

echo -e "\nChecking for new format (REPO=\"\${ORG}/\${REPO}\"):"
fd Dockerfile -x rg -l 'make.*REPO="\$\{ORG\}/\$\{REPO\}"'

Length of output: 1984

dockers/index/job/correction/Dockerfile (1)

80-80: Same change as in other Dockerfiles.

dockers/example/client/Dockerfile (1)

88-88: Same change as in other Dockerfiles.

dockers/index/job/readreplica/rotate/Dockerfile (1)

80-80: Same change as in other Dockerfiles.

dockers/tools/benchmark/job/Dockerfile (1)

88-88: Same change as in other Dockerfiles.

dockers/agent/core/ngt/Dockerfile (1)

89-89: LGTM! Change aligns with repository standards.

The modification to use REPO="${ORG}/${REPO}" correctly implements the repository reference format.

dockers/tools/cli/loadtest/Dockerfile (1)

88-88: LGTM! Consistent implementation across files.

The change maintains consistency with other Dockerfiles in the repository.

dockers/agent/core/faiss/Dockerfile (1)

90-90: LGTM! Consistent implementation.

The change follows the same pattern as other Dockerfiles.

Let's verify the consistency of this change across all Dockerfiles:

✅ Verification successful

✅ Verified: REPO format is consistent across all Dockerfiles

All 17 Dockerfiles in the repository use the identical format REPO="${ORG}/${REPO}" in their make commands, confirming full consistency.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all Dockerfiles use the correct REPO format
# Expected: All matches should show REPO="${ORG}/${REPO}"

echo "Checking all Dockerfiles for REPO argument format..."
rg -U 'make.*REPO="[^"]*".*cmd/\$\{PKG\}/\$\{APP_NAME\}' dockers/

Length of output: 2775

hack/go.mod.default (2)

3-3: Go version update looks consistent.

The Go version has been updated from 1.23.4 to 1.23.5 consistently across all module files.


Line range hint 6-350: Verify the impact of using "upgrade" for dependency versions.

Most dependencies are set to "upgrade" which could lead to unpredictable builds. Consider:

  1. Using specific versions for better reproducibility
  2. Documenting the rationale for using "upgrade"
  3. Adding version constraints where necessary

Note: Some dependencies already have specific versions due to known issues:

Run this script to analyze the dependency resolution:

example/client/go.mod (2)

3-3: Go version update is consistent.

The Go version has been updated from 1.23.4 to 1.23.5, maintaining consistency with other module files.


6-41: Dependency updates look well-structured.

The dependencies use specific version constraints which is good for build reproducibility. Notable updates include:

  • github.com/goccy/go-json v0.10.4
  • golang.org/x/crypto v0.32.0
  • google.golang.org/grpc v1.69.4
go.mod (4)

3-3: Go version update is consistent.

The Go version has been updated from 1.23.4 to 1.23.5, maintaining consistency with other module files.


352-413: Direct dependencies are well-structured.

The direct dependencies use specific version constraints which is good for build reproducibility. Notable updates include:

  • cloud.google.com/go/storage v1.50.0
  • github.com/aws/aws-sdk-go v1.55.6
  • google.golang.org/grpc v1.69.4

415-419: Verify Kubernetes client-go version compatibility.

The k8s.io/client-go version (v1.5.2) seems outdated compared to other Kubernetes dependencies (v0.32.1). This version mismatch might cause compatibility issues.

Run this script to check Kubernetes dependency compatibility:


Line range hint 1-542: Request for missing Dockerfile changes.

The PR objectives mention fixing the Go build argument, but no Dockerfile changes are provided in this review. Based on the retrieved learning about proper repository referencing in Dockerfiles (REPO="${ORG}/${REPO}"), please provide the relevant Dockerfile changes for review.

Run this script to locate the relevant Dockerfiles:

dockers/gateway/lb/Dockerfile (1)

80-80: LGTM! Correct fix for the repository reference.

The change properly concatenates the organization and repository names in the REPO argument, which aligns with Vald's Dockerfile standards.

Let's verify if the original PR #2806 was successfully merged:

✅ Verification successful

Verified: The repository reference format is consistent across all Dockerfiles

The change in gateway/lb/Dockerfile correctly follows the project-wide standard for make commands, matching the pattern used in all other components including other gateways (filter, mirror). This format is defined as a template in hack/docker/gen/main.go and consistently used across the entire codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the status of the original PR
gh pr view 2806 --json state,mergedAt,title

Length of output: 134


Script:

#!/bin/bash
# Search for similar make commands in Dockerfiles
rg -U "make.*REPO.*=.*" --type dockerfile -A 2 -B 2

# Also check if there are other Dockerfiles with similar patterns
fd Dockerfile$ --type f

Length of output: 1014


Script:

#!/bin/bash
# Search for make commands with REPO parameter in all files
rg -U "make.*REPO.*=.*" -A 2 -B 2

# Specifically check gateway Dockerfiles content
cat dockers/gateway/filter/Dockerfile dockers/gateway/mirror/Dockerfile

Length of output: 17545

dockers/manager/index/Dockerfile (1)

80-80: LGTM! Consistent with the repository reference fix pattern.

The change maintains consistency with other Dockerfiles in properly referencing the repository.

dockers/gateway/filter/Dockerfile (1)

80-80: LGTM! Repository reference fix applied consistently.

The change follows the same pattern of properly concatenating organization and repository names.

dockers/gateway/mirror/Dockerfile (1)

80-80: LGTM! Consistent repository reference fix across all Dockerfiles.

The change maintains the same pattern of properly concatenating organization and repository names in the REPO argument, ensuring consistency across all components.

Copy link
Contributor

coderabbitai bot commented Jan 23, 2025

@vankichi the changes look good. this pr correctly backports the fix for docker build argument from #2806 to the release/v1.7 branch, ensuring that repo is properly set to ${org}/${repo} in all dockerfiles. the go version update to 1.23.5 and dependency updates are also included.

🔗 analysis chain

🏁 scripts executed

the following scripts were executed for the analysis:

script:

#!/bin/bash
# fetch pr details and changes
gh pr view 2810 --json files,commits,body,title
gh pr diff 2810

length of output: 77668


✏️ learnings added

learnt from: vankichi
url: https://github.com/vdaas/vald/pull/2810

timestamp: 2025-01-23t08:14:18.020z
learning: in vald's dockerfiles, the repo argument should be set as `repo="${org}/${repo}"` to properly reference the repository.

note: learnings are effective only in the context of similar code segments. to apply general coding guidelines, please configure review instructions. you can manage existing learnings in the app.

✅ Actions performed

Comments resolved and changes approved.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
dockers/gateway/filter/Dockerfile (1)

80-80: Consider documenting the REPO argument format requirement.

While the change is correct, it would be helpful to document that the REPO argument now expects the format "org/repo" in the Dockerfile or Makefile.

dockers/tools/benchmark/job/Dockerfile (1)

Line range hint 80-88: Systematic update to standardize repository referencing across all Dockerfiles.

The change from REPO="${ORG}" to REPO="${ORG}/${REPO}" has been consistently applied across all Dockerfiles. This standardization:

  1. Provides a more explicit repository reference
  2. Maintains consistency across all components
  3. Fixes the reported Go build argument issue

The systematic nature of the change suggests it was automated, reducing the likelihood of inconsistencies.

dockers/agent/core/faiss/Dockerfile (1)

89-89: Consider centralizing the REPO argument format.

Since this change is being made across multiple Dockerfiles, consider defining the REPO format in a central location (e.g., a common Makefile include or Docker build script) to improve maintainability and ensure consistency.

This could be achieved by:

  1. Creating a common Makefile include with the REPO variable definition
  2. Using Docker build arguments to pass the full repository path
  3. Implementing a build wrapper script that handles the repository path construction

Also applies to: 88-88, 90-90

hack/go.mod.default (1)

Line range hint 6-350: Consider pinning dependency versions instead of using "upgrade" directive.

Using the "upgrade" directive for dependencies can lead to unexpected behavior and make builds non-reproducible. Consider:

  1. Pinning specific versions for better stability and reproducibility
  2. Documenting version constraints where needed (like the cloud.google.com/go/storage example)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 00a886b and 6919a58.

⛔ Files ignored due to path filters (3)
  • example/client/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • hack/docker/gen/main.go is excluded by !**/gen/**
📒 Files selected for processing (23)
  • dockers/agent/core/faiss/Dockerfile (1 hunks)
  • dockers/agent/core/ngt/Dockerfile (1 hunks)
  • dockers/agent/sidecar/Dockerfile (1 hunks)
  • dockers/discoverer/k8s/Dockerfile (1 hunks)
  • dockers/example/client/Dockerfile (1 hunks)
  • dockers/gateway/filter/Dockerfile (1 hunks)
  • dockers/gateway/lb/Dockerfile (1 hunks)
  • dockers/gateway/mirror/Dockerfile (1 hunks)
  • dockers/index/job/correction/Dockerfile (1 hunks)
  • dockers/index/job/creation/Dockerfile (1 hunks)
  • dockers/index/job/deletion/Dockerfile (1 hunks)
  • dockers/index/job/readreplica/rotate/Dockerfile (1 hunks)
  • dockers/index/job/save/Dockerfile (1 hunks)
  • dockers/index/operator/Dockerfile (1 hunks)
  • dockers/manager/index/Dockerfile (1 hunks)
  • dockers/tools/benchmark/job/Dockerfile (1 hunks)
  • dockers/tools/benchmark/operator/Dockerfile (1 hunks)
  • dockers/tools/cli/loadtest/Dockerfile (1 hunks)
  • example/client/go.mod (1 hunks)
  • example/client/go.mod.default (1 hunks)
  • go.mod (15 hunks)
  • hack/go.mod.default (1 hunks)
  • versions/GO_VERSION (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • versions/GO_VERSION
  • example/client/go.mod.default
⏰ Context from checks skipped due to timeout of 90000ms (79)
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
  • GitHub Check: grpc-stream
  • GitHub Check: grpc-sequential
  • GitHub Check: build
  • GitHub Check: CodeQL
  • GitHub Check: Run tests for hack packages
  • GitHub Check: runner / go build
  • GitHub Check: build / build
  • GitHub Check: build / build
🔇 Additional comments (21)
dockers/gateway/lb/Dockerfile (1)

80-80: Consistent change across Dockerfiles.

The modification to use REPO="${ORG}/${REPO}" matches the pattern applied across other Dockerfiles, maintaining consistency in how the repository is referenced during builds.

dockers/manager/index/Dockerfile (1)

80-80: Verify build artifacts are generated in the correct location.

The change to REPO="${ORG}/${REPO}" might affect the output path of built artifacts.

Let's check the build output paths:

dockers/gateway/mirror/Dockerfile (1)

80-80: LGTM! Consistent with the build argument fix.

The change aligns with the fix for the Go build argument issue and maintains consistency with other Dockerfile changes.

dockers/discoverer/k8s/Dockerfile (1)

Line range hint 1-1: Verify the template generator changes.

Since this Dockerfile is generated by hack/docker/gen/main.go, we should verify that the template generator has been updated accordingly.

Let's check the template generator:

✅ Verification successful

Template generator is correctly configured

The template generator in hack/docker/gen/main.go already contains the correct Dockerfile syntax directive (# syntax = docker/dockerfile:latest), which matches the generated Dockerfile. No updates are needed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the template generator changes

# Check the template generator
echo "Checking template generator..."
rg -A 5 'REPO=' hack/docker/gen/main.go

# Check if there are any other template files
echo "Checking other template files..."
fd -t f . hack/docker/gen/ -x rg -l 'REPO='

Length of output: 801


Script:

#!/bin/bash
# Search for Dockerfile syntax and related template configurations
echo "Checking for Dockerfile syntax directive..."
rg -A 5 'syntax.*dockerfile' hack/docker/gen/main.go

echo "Checking for k8s discoverer template..."
rg -A 10 'discoverer.*template|template.*discoverer' hack/docker/gen/main.go

echo "Checking for general Dockerfile template definitions..."
ast-grep --pattern 'const $_Template = `$$$`' hack/docker/gen/main.go

Length of output: 704

dockers/index/job/save/Dockerfile (1)

80-80: Verify build success in the original PR.

Since this is a backport of PR #2806, we should verify that the build was successful in the original PR.

Let's check the original PR:

dockers/tools/benchmark/operator/Dockerfile (1)

80-80: Changes consistent with other Dockerfiles.

The modification to the REPO argument matches the changes in other Dockerfiles.

dockers/index/operator/Dockerfile (1)

80-80: Changes consistent with other Dockerfiles.

The modification to the REPO argument matches the changes in other Dockerfiles.

dockers/index/job/deletion/Dockerfile (1)

80-80: Changes consistent with other Dockerfiles.

The modification to the REPO argument matches the changes in other Dockerfiles.

dockers/index/job/creation/Dockerfile (1)

80-80: Verify the Makefile compatibility with the new REPO format.

The REPO argument format has been changed from ${ORG} to ${ORG}/${REPO}. This change is consistent across all Dockerfiles and appears to be fixing a build argument issue.

Let's verify if the Makefile correctly handles this new format:

✅ Verification successful

The Makefile is compatible with the new REPO format

The Makefile already uses an equivalent format REPO = $(ORG)/$(NAME) which perfectly matches the Dockerfile's ${ORG}/${REPO} format, just using make-specific syntax and variable names.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check how the REPO variable is used in Makefiles
# Expected: The Makefile should handle the new ${ORG}/${REPO} format

# Search for REPO variable usage in Makefiles
rg -p "REPO.*:?=" Makefile* --type make

# Search for how the REPO variable is used in make targets
rg "\\$\{REPO\}" Makefile* --type make

Length of output: 623

dockers/index/job/correction/Dockerfile (1)

80-80: Consistent change with other Dockerfiles.

The modification to the REPO argument matches the pattern seen in other Dockerfiles, maintaining consistency across the project.

dockers/example/client/Dockerfile (1)

88-88: Consistent change with other Dockerfiles.

The modification to the REPO argument matches the pattern seen in other Dockerfiles, maintaining consistency across the project.

dockers/index/job/readreplica/rotate/Dockerfile (1)

80-80: Consistent change with other Dockerfiles.

The modification to the REPO argument matches the pattern seen in other Dockerfiles, maintaining consistency across the project.

dockers/tools/benchmark/job/Dockerfile (1)

88-88: Consistent change with other Dockerfiles.

The modification to the REPO argument matches the pattern seen in other Dockerfiles, maintaining consistency across the project.

dockers/agent/core/ngt/Dockerfile (1)

89-89: Verify the impact of the REPO argument change on the build system.

The REPO argument format has been changed from ${ORG} to ${ORG}/${REPO}. While this change aligns with the GitHub repository format, we should verify that this modification is compatible with the build system's expectations.

Let's verify the make target behavior with the new argument format:

✅ Verification successful

The REPO argument change is safe and consistent with repository standards

The modification from REPO="${ORG}" to REPO="${ORG}/${REPO}" is a safe standardization change that:

  • Aligns with GitHub repository format (vdaas/vald)
  • Is consistently applied across all Dockerfiles
  • Does not impact the build system functionality as the make targets don't depend on the REPO format
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the make target expects the new REPO format
# and verify this change is consistent across the codebase

# Check the Makefile for REPO variable usage
echo "Checking Makefile for REPO variable usage:"
rg "REPO.*:=" -A 5 Makefile

# Check for any other make targets that might be affected
echo "Checking for other make targets using REPO:"
rg "REPO=[\"\$]" --type make

Length of output: 250


Script:

#!/bin/bash
# Search for all Dockerfiles and their REPO usage
echo "=== Checking REPO usage in Dockerfiles ==="
fd Dockerfile | xargs grep -l "REPO=" | while read -r file; do
  echo "=== $file ==="
  grep -A 2 "REPO=" "$file"
done

echo -e "\n=== Checking for build documentation ==="
fd -e md | xargs grep -l "build" | while read -r file; do
  echo "=== $file ==="
  grep -A 5 -i "build" "$file"
done

echo -e "\n=== Looking for make-related files ==="
fd "Makefile|\.mk$"

Length of output: 48451


Script:

#!/bin/bash
# Check the NGT Makefile for build rules
echo "=== Checking NGT Makefile build rules ==="
cat internal/core/algorithm/ngt/Makefile

# Check if there are any other Makefiles that might contain relevant build rules
echo -e "\n=== Checking build.mk for make rules ==="
cat Makefile.d/build.mk

Length of output: 8304


Script:

#!/bin/bash
# Check functions.mk for go-build function definition
echo "=== Checking functions.mk for go-build definition ==="
cat Makefile.d/functions.mk

# Also check if there are any direct references to REPO in other make files
echo -e "\n=== Checking all makefiles for REPO usage ==="
fd "\.mk$" Makefile.d/ | xargs grep -l "REPO"

Length of output: 15488

dockers/tools/cli/loadtest/Dockerfile (1)

88-88: LGTM - Consistent with other Dockerfile changes.

The modification to the REPO argument follows the same pattern as other Dockerfiles, maintaining consistency across the codebase.

dockers/agent/core/faiss/Dockerfile (1)

90-90: LGTM - Consistent with other Dockerfile changes.

The modification to the REPO argument follows the same pattern as other Dockerfiles, maintaining consistency across the codebase.

hack/go.mod.default (1)

3-3: Go version update looks good.

The Go version has been updated from 1.23.4 to 1.23.5, which is consistent with the version updates in other files.

example/client/go.mod (2)

3-3: Go version update is consistent.

The Go version has been updated from 1.23.4 to 1.23.5, matching the version in hack/go.mod.default.


11-11: Verify the version downgrade for golang.org/x/crypto.

The version has been downgraded from v0.31.0 to v0.32.0. Please verify this is intentional and not a typo.

go.mod (2)

3-3: Go version update is consistent across all files.

The Go version has been updated from 1.23.4 to 1.23.5, matching the version in both hack/go.mod.default and example/client/go.mod.


Line range hint 29-37: Verify the commit hash references for Azure dependencies.

Several Azure dependencies are using commit hashes (e.g., f7ea664c9cff). Please verify these are the correct and latest stable commits.

✅ Verification successful

Azure dependency versions are correct and up-to-date

The commit hash f7ea664c9cff references the latest stable release from May 30, 2024, in the Azure/go-autorest repository. All package paths are valid submodules within this repository, and their versions align with the latest releases.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the commit hashes for Azure dependencies exist and are from the main branch

for repo in "go-autorest" "autorest" "autorest/date" "autorest/mocks" "autorest/to" "logger" "tracing"; do
  echo "Checking $repo..."
  curl -s "https://api.github.com/repos/Azure/$repo/commits/f7ea664c9cff" | jq '.sha,.commit.message'
done

Length of output: 2094


Script:

#!/bin/bash
# Check the repository structure and latest releases
echo "Checking repository structure..."
curl -s "https://api.github.com/repos/Azure/go-autorest/git/trees/f7ea664c9cff?recursive=1" | jq '.tree[] | select(.path | contains("autorest/") or contains("logger/") or contains("tracing/")) | .path'

echo -e "\nChecking latest releases..."
curl -s "https://api.github.com/repos/Azure/go-autorest/releases" | jq -r '.[] | select(.prerelease==false) | {tag_name: .tag_name, published_at: .published_at} | [.tag_name, .published_at] | @tsv' | head -n 5

Length of output: 4488

dockers/agent/sidecar/Dockerfile Show resolved Hide resolved
dockers/discoverer/k8s/Dockerfile Show resolved Hide resolved
go.mod Show resolved Hide resolved
@vankichi
Copy link
Contributor Author

@coderabbitai review please

Copy link
Contributor

coderabbitai bot commented Jan 23, 2025

@vankichi the changes look good. the pr correctly backports:

  1. the docker build argument fix from 🐛 fix go build argument #2806, ensuring repo is properly set as ${org}/${repo} in all dockerfiles
  2. go version update to 1.23.5
  3. required dependency updates

🔗 analysis chain

🏁 scripts executed

the following scripts were executed for the analysis:

script:

#!/bin/bash
# fetch details of both prs
echo "=== original pr #2806 ==="
gh pr view 2806 --json files,commits,body,title
gh pr diff 2806

echo -e "\n=== backport pr #2810 ==="
gh pr view 2810 --json files,commits,body,title
gh pr diff 2810

# check branch information
git branch -r --contains head

length of output: 79453

✅ Actions performed

Comments resolved and changes approved.

@kpango kpango merged commit 814e131 into release/v1.7 Jan 23, 2025
202 of 204 checks passed
@kpango kpango deleted the backport/release/v1.7/bugfix/dockerfile/invalid-build-argument branch January 23, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants