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 #2829 to release/v1.7 for Add TEST_LDFLAGS #2830

Conversation

vdaas-ci
Copy link
Collaborator

@vdaas-ci vdaas-ci commented Feb 4, 2025

Description

SSIA

Related Issue

Versions

  • Vald Version: v1.7.16
  • Go Version: v1.23.5
  • 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

  • Chores
    • Consolidated build configurations for testing and benchmarking to enhance consistency and reliability in the build and validation processes.

* ♻️ Add Link opts for HDF Flg

Signed-off-by: vankichi <[email protected]>

* ♻️ Add TEST_FLAGS

Signed-off-by: vankichi <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>
Copy link

cloudflare-workers-and-pages bot commented Feb 4, 2025

Deploying vald with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9d3359f
Status: ✅  Deploy successful!
Preview URL: https://9cfb341c.vald.pages.dev
Branch Preview URL: https://backport-release-v1-7-docker-xo4s.vald.pages.dev

View logs

Copy link
Contributor

coderabbitai bot commented Feb 4, 2025

📝 Walkthrough

Walkthrough

This pull request introduces a new variable TEST_LDFLAGS in the Makefile that aggregates LDFLAGS, FAISS_LDFLAGS, and HDF5_LDFLAGS. Subsequent modifications in the benchmark, function, and test makefile fragments update their linker flag settings by replacing their previous CGO_LDFLAGS references with $(TEST_LDFLAGS). The changes standardize the configuration for linking during testing and benchmarking without altering existing functionality.

Changes

File(s) Change Summary
Makefile Added new variable TEST_LDFLAGS defined as $(LDFLAGS) $(FAISS_LDFLAGS) $(HDF5_LDFLAGS)
Makefile.d/bench.mk,
Makefile.d/functions.mk,
Makefile.d/test.mk
Replaced CGO_LDFLAGS with $(TEST_LDFLAGS) in various benchmark, function, and test targets, altering linker flag usage

Sequence Diagram(s)

sequenceDiagram
    participant Developer as Developer
    participant Make as Makefile
    participant Bench as bench.mk
    participant Func as functions.mk
    participant Test as test.mk

    Developer->>Make: Initiate build/test
    Make-->>Developer: Define TEST_LDFLAGS (aggregates LDFLAGS, FAISS_LDFLAGS, HDF5_LDFLAGS)
    Make->>Bench: Update CGO_LDFLAGS with $(TEST_LDFLAGS)
    Make->>Func: Update CGO_LDFLAGS with $(TEST_LDFLAGS)
    Make->>Test: Update CGO_LDFLAGS with $(TEST_LDFLAGS)
Loading

Possibly related PRs

Suggested labels

priority/low, size/XXXL, area/makefile

Suggested reviewers

  • kpango
  • vankichi

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 39ed0f2 and 9d3359f.

📒 Files selected for processing (4)
  • Makefile (1 hunks)
  • Makefile.d/bench.mk (6 hunks)
  • Makefile.d/functions.mk (5 hunks)
  • Makefile.d/test.mk (19 hunks)
🔇 Additional comments (4)
Makefile (1)

167-167: LGTM! Good consolidation of linker flags.

The introduction of TEST_LDFLAGS effectively consolidates commonly used linker flags (LDFLAGS, FAISS_LDFLAGS, and HDF5_LDFLAGS) into a single variable, improving maintainability and consistency across test-related targets.

Makefile.d/bench.mk (1)

133-133: LGTM! Consistent update of linker flags across benchmark targets.

The changes uniformly adopt $(TEST_LDFLAGS) across all benchmark targets, ensuring consistent linking behavior during benchmarking. This standardization improves maintainability and reduces the risk of inconsistent flag usage.

Also applies to: 158-158, 190-190, 216-216, 247-247, 296-296

Makefile.d/test.mk (1)

48-48: LGTM! Consistent update of linker flags across test targets.

The changes uniformly adopt $(TEST_LDFLAGS) across all test targets, ensuring consistent linking behavior during testing. This standardization improves maintainability and reduces the risk of inconsistent flag usage.

Also applies to: 60-60, 74-74, 88-88, 102-102, 118-118, 137-137, 151-151, 165-165, 179-179, 193-193, 209-209, 228-228, 266-266, 275-275, 284-284, 305-305, 319-319, 328-328

Makefile.d/functions.mk (1)

138-138: LGTM! Consistent update of linker flags across e2e test functions.

The changes uniformly adopt $(TEST_LDFLAGS) across all e2e test functions, ensuring consistent linking behavior during e2e testing. This standardization improves maintainability and reduces the risk of inconsistent flag usage.

Also applies to: 177-177, 203-203, 233-233, 255-255


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 Author

vdaas-ci commented Feb 4, 2025

[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

@vankichi vankichi merged commit 8c1eef0 into release/v1.7 Feb 4, 2025
157 checks passed
@vankichi vankichi deleted the backport/release/v1.7/docker/add-lib-hdf5-for-ci-dev-container branch February 4, 2025 11:01
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.

2 participants