-
Notifications
You must be signed in to change notification settings - Fork 866
skip arm package failures #8588
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
Open
edmundmiller
wants to merge
14
commits into
master
Choose a base branch
from
skip-arm-package-failures
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+333
−53
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d436afc
ci: Add a note about architecture
edmundmiller 2c8987a
feat: Add scripts for managing ARM build failures and filtering tests
edmundmiller 38174a0
ci: Replace ARM failure management with skip marker system
edmundmiller 07e379a
ci: Update ARM test skip marker path in scripts
edmundmiller cf2075f
chore: Trigger wave build
edmundmiller 23a2f2e
chore: Trigger a .arm-skip creation
edmundmiller 8a23c32
ci: Add ARM skip marker commit step in workflows
edmundmiller 5402cf4
Revert "chore: Trigger a .arm-skip creation"
edmundmiller 334964e
ci: Remove more filtering from wave
edmundmiller 37e652c
refactor: Use arm_failure tags in nf-test files
edmundmiller 963304f
style: Touch a module that works with arm
edmundmiller bdee331
chore: Manually add arm failures for subworkflows
edmundmiller 3d8a24e
chore: Remove experiments
edmundmiller 7344705
test: Mark arm_failures
edmundmiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env python3 | ||
"""Add arm_failure tag to nf-test files for modules that fail on ARM""" | ||
|
||
import sys | ||
import re | ||
from pathlib import Path | ||
|
||
def add_arm_failure_tag(test_file_path): | ||
"""Add arm_failure tag to the test file if it doesn't already exist""" | ||
|
||
if not test_file_path.exists(): | ||
print(f"Test file not found: {test_file_path}") | ||
return False | ||
|
||
content = test_file_path.read_text() | ||
|
||
# Check if arm_failure tag already exists | ||
if 'tag "arm_failure"' in content: | ||
print(f"ARM failure tag already exists in {test_file_path}") | ||
return False | ||
|
||
# Find the last tag line in the file - looking for pattern: tag "something" | ||
tag_pattern = r'(\s*tag\s+"[^"]+"\s*\n)' | ||
tag_matches = list(re.finditer(tag_pattern, content)) | ||
|
||
if tag_matches: | ||
# Get the last tag match | ||
last_tag = tag_matches[-1] | ||
# Insert the new tag after the last existing tag with proper formatting | ||
before = content[:last_tag.end()] | ||
after = content[last_tag.end():] | ||
new_content = before + ' tag "arm_failure"\n\n' + after | ||
else: | ||
# No existing tags, add after the process line | ||
process_pattern = r'(process\s+"[^"]+"\s*\n)' | ||
process_match = re.search(process_pattern, content) | ||
if process_match: | ||
before = content[:process_match.end()] | ||
after = content[process_match.end():] | ||
new_content = before + '\n tag "arm_failure"\n' + after | ||
else: | ||
print(f"Could not find process line in {test_file_path}") | ||
return False | ||
|
||
# Write the updated content | ||
test_file_path.write_text(new_content) | ||
print(f"Added ARM failure tag to {test_file_path}") | ||
return True | ||
|
||
def main(): | ||
if len(sys.argv) < 2: | ||
print("Usage: add_arm_failure_tag.py <module_path> [module_path2] ...") | ||
print("Example: add_arm_failure_tag.py modules/nf-core/fastqc") | ||
sys.exit(1) | ||
|
||
success_count = 0 | ||
for module_path in sys.argv[1:]: | ||
module_dir = Path(module_path) | ||
test_file = module_dir / "tests" / "main.nf.test" | ||
|
||
if add_arm_failure_tag(test_file): | ||
success_count += 1 | ||
|
||
print(f"Successfully added ARM failure tags to {success_count} module(s)") | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,18 +50,16 @@ jobs: | |
conda-wave: | ||
# NOTE This should get skipped because generate-matrix won't run | ||
# if: github.repository == 'nf-core/modules' | ||
if: ${{ needs.generate-matrix.outputs.conda-matrix != '[]' }} | ||
if: ${{ needs.generate-matrix.outputs.conda-matrix != '' && needs.generate-matrix.outputs.conda-matrix != '{"include":[]}' }} | ||
needs: generate-matrix | ||
name: Build ${{ matrix.profile }} ${{ matrix.platform }} Container | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
files: "${{ fromJson(needs.generate-matrix.outputs.conda-matrix) }}" | ||
profile: [docker, singularity] | ||
platform: ["linux/amd64", "linux/arm64"] | ||
matrix: ${{ fromJson(needs.generate-matrix.outputs.conda-matrix) }} | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
|
@@ -85,23 +83,35 @@ jobs: | |
--tower-token ${{ secrets.TOWER_ACCESS_TOKEN }} \ | ||
--tower-workspace-id ${{ secrets.TOWER_WORKSPACE_ID }} | ||
|
||
- name: Mark ARM build failure | ||
if: ${{ failure() && matrix.platform == 'linux/arm64' }} | ||
run: | | ||
MODULE_DIR=$(dirname "${{ matrix.files }}") | ||
|
||
# Add arm_failure tag to nf-test file | ||
python .github/scripts/add_arm_failure_tag.py "$MODULE_DIR" | ||
|
||
- name: Commit ARM failure tag | ||
if: ${{ failure() && matrix.platform == 'linux/arm64' }} | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "nf-core-bot" | ||
git add . | ||
git commit -m "Add ARM failure tag for $(dirname "${{ matrix.files }}")" || exit 0 | ||
git push | ||
|
||
dockerfile-wave: | ||
# NOTE This should get skipped because generate-matrix won't run | ||
# if: github.repository == 'nf-core/modules' | ||
if: ${{ needs.generate-matrix.outputs.dockerfile-matrix != '[]' }} | ||
if: ${{ needs.generate-matrix.outputs.dockerfile-matrix != '' && needs.generate-matrix.outputs.dockerfile-matrix != '{"include":[]}' }} | ||
needs: generate-matrix | ||
name: Build Dockerfile-based ${{ matrix.platform }} Container | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
files: "${{ fromJson(needs.generate-matrix.outputs.dockerfile-matrix) }}" | ||
# NOTE singularity build requires a Singularity definition file in place of Dockerfile | ||
# https://nextflow.slack.com/archives/C0477AS31T5/p1731755350230149?thread_ts=1731697852.661849&cid=C0477AS31T5 | ||
# profile: [docker] | ||
platform: ["linux/amd64", "linux/arm64"] | ||
matrix: ${{ fromJson(needs.generate-matrix.outputs.dockerfile-matrix) }} | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
|
@@ -132,6 +142,23 @@ jobs: | |
--tower-token ${{ secrets.TOWER_ACCESS_TOKEN }} \ | ||
--tower-workspace-id ${{ secrets.TOWER_WORKSPACE_ID }} | ||
|
||
- name: Mark ARM build failure | ||
if: ${{ failure() && matrix.platform == 'linux/arm64' }} | ||
run: | | ||
MODULE_DIR=$(dirname "${{ matrix.files }}") | ||
|
||
# Add arm_failure tag to nf-test file | ||
python .github/scripts/add_arm_failure_tag.py "$MODULE_DIR" | ||
|
||
- name: Commit ARM failure tag | ||
if: ${{ failure() && matrix.platform == 'linux/arm64' }} | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "nf-core-bot" | ||
git add . | ||
git commit -m "Add ARM failure tag for $(dirname "${{ matrix.files }}")" || exit 0 | ||
git push | ||
|
||
# bump-versions: | ||
# needs: generate-matrix | ||
# name: bump-versions | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no docs in this repo please. this should be on the website. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also I think this is outdated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
# ARM Test Skipping | ||
|
||
This document describes the simple system for skipping ARM tests in nf-core modules. | ||
|
||
## Overview | ||
|
||
Some modules may fail to run tests on ARM64 architecture due to various reasons such as: | ||
- Dependencies not available for ARM64 | ||
- Architecture-specific compilation issues | ||
- Upstream package limitations | ||
|
||
To handle these cases gracefully, we have implemented a simple system that allows temporarily disabling ARM tests for specific modules until the issues are resolved. | ||
|
||
## How It Works | ||
|
||
### Skip Marker Files | ||
|
||
When a module consistently fails ARM tests, you can create a `.skip-arm` file in the module directory. This file: | ||
|
||
1. **Disables ARM tests** for that module in CI/CD pipelines | ||
2. **Can contain a link** to the wave build failure (optional) | ||
3. **Can be easily removed** when the issue is resolved | ||
|
||
### Workflow Integration | ||
|
||
The GitHub Actions workflow automatically: | ||
- Checks for `.skip-arm` files before running tests on ARM runners | ||
- Skips ARM tests for modules with skip markers | ||
- Continues with AMD64 tests as normal | ||
- Logs which tests are being skipped | ||
|
||
## Managing ARM Test Skipping | ||
|
||
### Simple File Management | ||
|
||
**To skip ARM tests for a module:** | ||
```bash | ||
touch modules/nf-core/problematic-module/tests/.skip-arm | ||
``` | ||
|
||
**To link to a wave build failure (optional):** | ||
```bash | ||
echo "https://wave.seqera.io/build/12345" > modules/nf-core/problematic-module/tests/.skip-arm | ||
``` | ||
|
||
**To re-enable ARM tests:** | ||
```bash | ||
rm modules/nf-core/problematic-module/tests/.skip-arm | ||
``` | ||
|
||
**To list modules with ARM tests disabled:** | ||
```bash | ||
find modules/nf-core -name ".skip-arm" | ||
``` | ||
|
||
## File Format | ||
|
||
The `.skip-arm` file can be: | ||
- **Empty**: Just presence of the file disables ARM tests | ||
- **Contain a URL**: Link to wave build failure or GitHub issue | ||
- **Contain notes**: Brief description of the issue | ||
|
||
Examples: | ||
```bash | ||
# Empty file | ||
touch modules/nf-core/fastqc/tests/.skip-arm | ||
|
||
# With wave build failure link | ||
echo "https://wave.seqera.io/build/12345" > modules/nf-core/fastqc/tests/.skip-arm | ||
|
||
# With GitHub issue link | ||
echo "https://github.com/nf-core/modules/issues/12345" > modules/nf-core/fastqc/tests/.skip-arm | ||
|
||
# With brief note | ||
echo "bioconda package unavailable for ARM64" > modules/nf-core/fastqc/tests/.skip-arm | ||
``` | ||
|
||
## Workflow Impact | ||
|
||
### Test Filtering | ||
|
||
- Modules with `.skip-arm` will have ARM tests skipped | ||
- AMD64 tests continue normally on all profiles (conda, docker, singularity) | ||
- ARM builds still happen when `environment.yml` files are changed (builds are separate from tests) | ||
|
||
### CI/CD Logs | ||
|
||
When ARM tests are skipped, you'll see logs like: | ||
|
||
``` | ||
⚠️ Skipping ARM tests for modules/nf-core/fastqc | ||
``` | ||
|
||
## Best Practices | ||
|
||
### When to Add Skip Markers | ||
|
||
- ARM tests consistently fail for legitimate architecture reasons | ||
- The failure is due to missing ARM64 packages or architecture-specific issues | ||
- The issue has been investigated and documented | ||
- An upstream issue has been reported (when applicable) | ||
|
||
### Documentation Requirements | ||
|
||
When adding a skip marker, consider including: | ||
- Link to wave build failure or GitHub issue in the file | ||
- Brief note about the reason (if not obvious from linked issue) | ||
|
||
### Regular Review | ||
|
||
Periodically review ARM test skips: | ||
- Check if upstream issues have been resolved | ||
- Test if packages have become available for ARM64 | ||
- Remove markers when issues are fixed | ||
|
||
### Re-enabling ARM Tests | ||
|
||
To re-enable ARM tests for a module: | ||
1. Remove the `.skip-arm` file: `rm modules/nf-core/module/.skip-arm` | ||
2. Test the ARM build manually if possible | ||
3. Monitor the CI for successful ARM tests | ||
|
||
## Examples | ||
|
||
### Example 1: Package Not Available | ||
|
||
```bash | ||
# Skip ARM tests due to missing bioconda package | ||
echo "https://github.com/bioconda/bioconda-recipes/issues/12345" > modules/nf-core/tool/tests/.skip-arm | ||
``` | ||
|
||
### Example 2: Wave Build Failure | ||
|
||
```bash | ||
# Skip ARM tests due to wave container build failure | ||
echo "https://wave.seqera.io/build/abc123def456" > modules/nf-core/tool/tests/.skip-arm | ||
``` | ||
|
||
### Example 3: Simple Skip | ||
|
||
```bash | ||
# Just skip without detailed tracking | ||
touch modules/nf-core/tool/tests/.skip-arm | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
### Workflow Still Running ARM Tests | ||
|
||
If ARM tests still run despite having a skip marker: | ||
1. Check the file name is exactly `.skip-arm` | ||
2. Verify the file is in the correct module tests directory: `modules/nf-core/modulename/tests/.skip-arm` | ||
3. Check the workflow logs for any errors in the filtering step | ||
|
||
### Re-enabling Tests | ||
|
||
To test if ARM tests can be re-enabled: | ||
1. Remove the skip marker file: `rm modules/nf-core/module/tests/.skip-arm` | ||
2. Create a small PR that modifies the module | ||
3. Monitor the CI workflow for successful ARM tests | ||
4. If still failing, re-add the marker with updated information | ||
|
||
### Finding All Skipped Modules | ||
|
||
```bash | ||
# List all modules with ARM tests disabled | ||
find modules/nf-core -name ".skip-arm" -exec dirname {} \; | ||
|
||
# See what's in the skip files | ||
find modules/nf-core -name ".skip-arm" -exec echo "=== {} ===" \; -exec cat {} \; | ||
``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
where is
arm_filtered_paths
defined?