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

vcf-validator: add linux-aarch64 build #51425

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

martin-g
Copy link
Contributor

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@martin-g martin-g added the aarch64 Related to adding linux-aarch64 support label Oct 16, 2024
Copy link
Contributor

coderabbitai bot commented Oct 16, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces modifications to the build.sh script and the meta.yaml file for the vcf-validator recipe. In build.sh, debugging output has been enabled by adding set -x, which prints all executed commands to the terminal. Additionally, a conditional block has been introduced to set compiler flags for ARM architectures, specifically adding -funsigned-char to CXXFLAGS for aarch64 or arm64. The script now uses the ${CPU_COUNT} variable instead of a hardcoded value of 2 for the make command, allowing for a more adaptable build process. The meta.yaml file has been updated to reflect a new version number of 0.10.1 and an incremented build number from 0 to 1. The host dependencies have been reorganized, with libcurl moved from the host list to the build section, while the run section retains zstd and libcurl. Furthermore, the extra section now includes linux-aarch64 as an additional platform, and the recipe-maintainers list has been adjusted for alignment.

Possibly related PRs

Suggested labels

please review & merge

Suggested reviewers

  • bgruening

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e3e31a0 and 0d1945d.

📒 Files selected for processing (1)
  • recipes/vcf-validator/build.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • recipes/vcf-validator/build.sh

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 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.

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: 1

🧹 Outside diff range and nitpick comments (3)
recipes/vcf-validator/build.sh (2)

3-4: Approved: Enhanced debugging with set -x

The addition of set -x is beneficial for debugging purposes, as it will print each command before execution. This can be particularly useful for troubleshooting build issues.

However, please be aware that this may produce verbose output and could potentially expose sensitive information in logs. Consider wrapping this command with a conditional statement to enable it only when needed, e.g., if [ "${DEBUG}" = "true" ]; then set -x; fi.


11-11: Approved: Optimized parallel build with ${CPU_COUNT}

The modification to use ${CPU_COUNT} instead of a hardcoded value for parallel builds is an excellent improvement. This change allows the build process to adapt to the available resources in different environments, potentially speeding up the build on systems with more cores.

For added robustness, consider adding a fallback value:

make -j"${CPU_COUNT:-2}" || { echo "Build failed" >&2; exit 1; }

This ensures that if ${CPU_COUNT} is not set, the build will default to using 2 cores, maintaining the previous behavior.

recipes/vcf-validator/meta.yaml (1)

Line range hint 2-2: Update the package version to 0.10.1

The version in the recipe (0.10.0) does not match the version mentioned in the PR summary (0.10.1). Please update the version to ensure consistency with the intended release.

Apply this change:

-{% set version = "0.10.0" %}
+{% set version = "0.10.1" %}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0a248ea and b127f4f.

📒 Files selected for processing (2)
  • recipes/vcf-validator/build.sh (1 hunks)
  • recipes/vcf-validator/meta.yaml (2 hunks)
🧰 Additional context used
🔇 Additional comments (4)
recipes/vcf-validator/build.sh (1)

Line range hint 1-20: Overall: Improved build script with enhanced debugging and efficiency

The changes to this build script are well-aligned with the PR objectives and represent good improvements:

  1. The addition of set -x enhances debugging capabilities, which can be crucial when troubleshooting build issues across different architectures.
  2. The use of ${CPU_COUNT} for parallel builds allows for better utilization of available resources, which is particularly beneficial when building for different architectures like linux-aarch64.

These changes should contribute to a more robust and efficient build process for the vcf-validator package across different platforms, including the newly added linux-aarch64 architecture.

recipes/vcf-validator/meta.yaml (3)

13-13: LGTM: Build number increment

The build number has been correctly incremented from 0 to 1. This change is appropriate when updating the recipe without changing the upstream version.


49-49: LGTM: Added linux-aarch64 platform support

The addition of linux-aarch64 to the additional-platforms list is consistent with the PR objectives. This change will enable builds for the linux-aarch64 architecture.

To ensure the build works correctly for the new platform, please verify the build process specifically for linux-aarch64. You can use the following command to trigger a test build for this platform:

#!/bin/bash
# Trigger a test build for the recipe on linux-aarch64
bioconda-utils build recipes/vcf-validator --docker --mulled-test --target-platform linux-aarch64

Line range hint 1-54: Summary of review

The changes in this file generally align well with the PR objectives to add linux-aarch64 build support for the vcf-validator package. The build number increment, dependency updates, and addition of the linux-aarch64 platform are all appropriate changes.

However, there is one critical issue that needs to be addressed:

  1. The version number in the recipe (0.10.0) does not match the version mentioned in the PR summary (0.10.1). This discrepancy needs to be resolved before the PR can be approved.

Once the version number is updated and the suggested verifications are performed, this PR should be ready for approval.

After addressing the version discrepancy, please run a final verification build for all platforms:

#!/bin/bash
# Trigger a test build for the recipe on all platforms
bioconda-utils build recipes/vcf-validator --docker --mulled-test

Comment on lines +23 to 31
host:
- libboost-devel
- libcurl
- libtool
- zstd
- c-ares
- libcurl
- openssl
- bzip2
- libzlib
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Issue Detected: Missing Installation of bioconda-utils

The build process fails because bioconda-utils is not found. While several pipeline configurations reference installing bioconda-utils, there are no actual installation commands present in the codebase. Ensure that bioconda-utils is properly installed in the build environment to resolve the build failures.

🔗 Analysis chain

LGTM: Updated build and host dependencies

The changes to the build and host sections look good:

  1. Moving libcurl to the build section is appropriate if it's only needed during the build process.
  2. The addition of new build dependencies (libtool, zstd, c-ares, openssl, bzip2, and libzlib) provides a more comprehensive build environment.

These changes align with the PR objectives and should improve the build process for the linux-aarch64 platform.

To ensure these changes don't introduce any issues, please verify the build process for all supported platforms. You can use the following command to trigger a test build:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Trigger a test build for the recipe
bioconda-utils build recipes/vcf-validator

Length of output: 268


Script:

#!/bin/bash
# Check if 'bioconda-utils' is installed and available in PATH
which bioconda-utils

Length of output: 95


Script:

#!/bin/bash
# Search for occurrences of 'bioconda-utils' in the codebase
rg "bioconda-utils"

Length of output: 4719


Script:

#!/bin/bash
# Search for installation commands related to 'bioconda-utils' in the codebase
rg -i "install.*bioconda-utils"

Length of output: 516

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

🧹 Outside diff range and nitpick comments (3)
recipes/vcf-validator/build.sh (3)

3-4: Consider making debug output conditional.

The addition of set -x is helpful for troubleshooting build issues. However, it may produce verbose output in CI logs.

Consider making this conditional, so it's only enabled when needed:

-set -x
+if [ "${DEBUG_BUILD:-false}" = "true" ]; then
+  set -x
+fi

This way, you can enable debugging by setting the DEBUG_BUILD environment variable without modifying the script.


8-14: LGTM! Consider adding a comment for non-ARM architectures.

The addition of ARM architecture handling is well-implemented and addresses a specific issue with unsigned char on these platforms.

Consider adding a comment in the *) case for clarity:

 case $(uname -m) in 
   aarch64 | arm64)
     export CXXFLAGS="${CXXFLAGS} -funsigned-char" # .../vcf/compression.cpp:101:9: error: narrowing conversion of '-117' from 'int' to 'char'
     ;;
   *)
+    # No additional flags needed for other architectures
     ;;
 esac

19-19: LGTM! Consider adding a fallback for CPU_COUNT.

The use of ${CPU_COUNT} instead of a hardcoded value is an excellent improvement. It allows the build to utilize all available CPU cores, potentially speeding up the build process significantly.

Consider adding a fallback value in case CPU_COUNT is not set:

-make -j"${CPU_COUNT}" || { echo "Build failed" >&2; exit 1; }
+make -j"${CPU_COUNT:-2}" || { echo "Build failed" >&2; exit 1; }

This ensures that if CPU_COUNT is not set for some reason, the build will still proceed with a reasonable default value.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b127f4f and e3e31a0.

📒 Files selected for processing (1)
  • recipes/vcf-validator/build.sh (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
recipes/vcf-validator/build.sh (1)

18-18: LGTM! Proper propagation of CXXFLAGS to cmake.

The addition of -DCMAKE_CXX_FLAGS="${CXXFLAGS}" to the cmake command ensures that all compiler flags, including those set for specific architectures, are properly passed to the build system. This is a good practice for maintaining consistency.

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@martin-g martin-g force-pushed the aarch64-vcf-validator branch from e3e31a0 to 0d1945d Compare October 16, 2024 12:12
@martin-g
Copy link
Contributor Author

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
linux-64 vcf-validator-0.10.0-h05c6178_1.tar.bz2 LinuxArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the LinuxArtifacts directory: conda install -c ./packages <package name>
osx-64 vcf-validator-0.10.0-hd9f7a53_1.tar.bz2 OSXArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the OSXArtifacts directory: conda install -c ./packages <package name>
osx-arm64 vcf-validator-0.10.0-hba7a744_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/135b1e01-3814-4ad9-9e0b-2c902d35829a/artifacts/0/tmp/artifacts/packages <package name>
linux-aarch64 vcf-validator-0.10.0-hd29332b_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/5662fa01-e7dd-4e01-aea5-d7f7824ba0b6/artifacts/0/tmp/artifacts/packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
vcf-validator 0.10.0--h05c6178_1 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/vcf-validator:0.10.0--h05c6178_1.tar.gz | docker load

@martin-g
Copy link
Contributor Author

mgrigorov in 🌐 euler-arm-22 in /tmp/vcf-validator via 🅒 test123 took 2s 
❯ tar xvf vcf-validator-0.10.0-hd29332b_1.tar.bz2                                                                                                                                                          (test123) 
info/files
info/run_exports.json
info/test/run_test.sh
info/hash_input.json
info/index.json
info/has_prefix
info/recipe/build.sh
info/recipe/meta.yaml.template
info/paths.json
info/recipe/meta.yaml
info/recipe/conda_build_config.yaml
info/about.json
info/licenses/LICENSE
info/recipe/LICENSE
info/git
bin/vcf_assembly_checker
bin/vcf_validator

mgrigorov in 🌐 euler-arm-22 in /tmp/vcf-validator via 🅒 test123 
❯ file bin/*                                                                                                                                                                                               (test123) 
bin/vcf_assembly_checker: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped
bin/vcf_validator:        ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped                                                                                                                                                                                 

mgrigorov in 🌐 euler-arm-22 in /tmp/vcf-validator via 🅒 test123 took 1m53s 
❯ ./bin/vcf_validator                                                                                                                                                                                      (test123) 
[info] Reading from standard input...
^C⏎     

LGTM!

@martin-g
Copy link
Contributor Author

@BiocondaBot please add label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aarch64 Related to adding linux-aarch64 support please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants