Skip to content

Fix nf-azure plugin tier-1 bugs#6831

Open
adamrtalbot wants to merge 1 commit intomasterfrom
fix/nf-azure-tier1-bugs
Open

Fix nf-azure plugin tier-1 bugs#6831
adamrtalbot wants to merge 1 commit intomasterfrom
fix/nf-azure-tier1-bugs

Conversation

@adamrtalbot
Copy link
Collaborator

Summary

Fixes 5 correctness bugs in the nf-azure plugin identified during a technical debt audit. All existing tests pass.

Bug Fixes

🔴 Critical

  1. AzFileSystem.listContainers0() returned empty list — The forEach iterated over blob containers but discarded the result of provider.getPath() instead of adding it to the containers list. Any code path relying on container listing at the filesystem level silently received nothing.

  2. NPE in AzBatchTaskHandler failure handlinginfo.failureInfo.message was accessed without null-checking failureInfo. When Azure returns a failed task without failure detail, this throws an NPE. Fixed with safe navigation (?.).

  3. SAS token permissions silently wrong in AzHelper.setPermissions(BLOB_PERMS).setPermissions(CONTAINER_PERMS) caused the second call to overwrite the first, making BLOB_PERMS dead code. Since this generates a container-level user delegation SAS, only CONTAINER_PERMS is needed. Removed the dead call.

🟡 Moderate

  1. ADLS Gen2 hdi_isfolder truthy string bug in AzFileAttributesdirectory = meta.get("hdi_isfolder") assigned a String to a boolean field. In Groovy, the string "false" is truthy (non-null, non-empty), so ADLS Gen2 paths with hdi_isfolder=false metadata were incorrectly treated as directories. Fixed to use "true".equalsIgnoreCase(...).

  2. AzManagedIdentityOpts ignored documented env var fallbacks — The @Description annotations document AZURE_MANAGED_IDENTITY_USER and AZURE_MANAGED_IDENTITY_SYSTEM env var fallbacks, but the constructor never read them. Wired up the env var fallbacks to match documented behavior.

Files Changed

  • plugins/nf-azure/src/main/nextflow/cloud/azure/nio/AzFileSystem.groovy
  • plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchTaskHandler.groovy
  • plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzHelper.groovy
  • plugins/nf-azure/src/main/nextflow/cloud/azure/nio/AzFileAttributes.groovy
  • plugins/nf-azure/src/main/nextflow/cloud/azure/config/AzManagedIdentityOpts.groovy

Testing

  • ./gradlew :plugins:nf-azure:test — all tests pass
  • NXF_SMOKE=1 ./gradlew :plugins:nf-azure:test — all smoke tests pass
  • Minimal, targeted fixes — no refactoring or behavioral changes beyond the bug fixes

- Fix listContainers0() discarding results (returned empty list)
- Fix NPE when Azure task failureInfo is null
- Remove dead setPermissions(BLOB_PERMS) overwritten by CONTAINER_PERMS
- Fix hdi_isfolder truthy string check for ADLS Gen2 paths
- Wire up env var fallbacks in AzManagedIdentityOpts per documentation

Generated by Claude Code

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Feb 13, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 372974f
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/698f45afc8a68a00085fd487

@adamrtalbot
Copy link
Collaborator Author

Sorry, I know this isn't a focused PR but these seemed like a grab bag of miscellaneous bugs I could fix quickly!

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