Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Amitk003
Copy link

Problem:
Users configuring Argo Workflows to archive logs to Azure Blob Storage using Workload Identity (useSDKCreds: true) report
that logs are successfully written but cannot be read via the UI (the server returns size=0). Interestingly, switching to
shared key authentication (accountKeySecret) resolves the issue, suggesting a potential discrepancy in how the SDK handles
authentication during read/stream operations in specific environments.

Solution
This PR addresses the issue through a combination of dependency upgrades and enhanced observability:

  1. Dependency Upgrade: Upgraded github.com/Azure/azure-sdk-for-go/sdk/storage/azblob and
    github.com/Azure/azure-sdk-for-go/sdk/azidentity to the latest stable versions. This ensures compatibility with the
    latest Azure Workload Identity features and includes potential fixes for stream handling in the SDK.
  2. Enhanced Debug Logging: Added detailed debug logs to workflow/artifacts/azure/azure.go:
  • Logs the constructed containerURL during client initialization.
  • Logs the ContentLength returned by Azure's DownloadStream in the OpenStream function.
  • Logs when the driver falls back to an IsDirectory check.

These logs will allow users and maintainers to see exactly what the Azure SDK is returning when the UI reports an empty
file, helping to narrow down if the issue is at the SDK, credential, or server logic level.

Verification Results

  • Build: Code compiles successfully.
  • Security: Ran a vulnerability scan; no new vulnerabilities were introduced by the dependency upgrades.
  • Style: Adhered to existing project logging conventions using logging.RequireLoggerFromContext.

Upgrades Azure Blob Storage and Identity SDKs to latest versions. Adds debug logging to OpenStream to investigate zero-length content issues with Workload Identity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant