argoproj/argo-workflows · error
%w
Error message
%w
What it means
The `argoexec data` command processes data templates (data sourcing/transformation in DAG steps). If execData fails, RunE re-wraps the error with `%w`, adding no context — the inner error from the data processing pipeline (artifact loading, transformation, source failure) is the actual cause.
Source
Thrown at cmd/argoexec/commands/data.go:22
"context"
"fmt"
"github.com/spf13/cobra"
"go.opentelemetry.io/otel/trace"
"github.com/argoproj/argo-workflows/v4/cmd/argoexec/executor"
"github.com/argoproj/argo-workflows/v4/util/logging"
"github.com/argoproj/argo-workflows/v4/workflow/executor/tracing"
)
func NewDataCommand() *cobra.Command {
command := cobra.Command{
Use: "data",
Short: "Process data",
RunE: func(cmd *cobra.Command, args []string) error {
err := execData(cmd.Context())
if err != nil {
return fmt.Errorf("%w", err)
}
return nil
},
}
return &command
}
//nolint:contextcheck
func execData(ctx context.Context) error {
ctx = tracing.InjectTraceContext(ctx)
wfExecutor := executor.Init(ctx, clientConfig, varRunArgo)
defer func() {
if err := wfExecutor.Tracing.Shutdown(context.WithoutCancel(ctx)); err != nil {
logging.RequireLoggerFromContext(ctx).WithError(err).Error(ctx, "Failed to shutdown tracing")
}
}()
span := trace.SpanFromContext(ctx)
View on GitHub (pinned to 35bff19146)
Solutions
- Read the wrapped cause — it identifies the failing source, transform, or artifact operation.
- Validate the data template spec: source paths/URIs and the transform expression against the actual data.
- Check that the workflow pod's service account has access to the data source (S3/GCS/etc.).
- Inspect argoexec logs for the detailed stack before the re-wrap.
Defensive patterns
Strategy: try-catch
Try / catch
if err := execData(ctx); err != nil {
logger.Error(ctx, "data processing failed", "err", err)
return fmt.Errorf("data processing failed: %w", err)
} Prevention
- Validate data template sources and transform expressions against real data before production
- Ensure the pod's service account has credentials for the data source (S3/GCS/HTTP)
- Inspect the unwrapped error in argoexec logs to find the failing stage
When it happens
Trigger: `argoexec data` run inside a data-template step where the data source (e.g. artifact listing, S3/GCS/HTTP source) fails; transformation (e.g. JSON filtering) produces invalid output; executor cannot access the data source credentials.
Common situations: Misconfigured data source paths or URIs in a Workflow's data template; missing cloud credentials (IAM/SA) in the workflow pod; transformation expression matching zero records or producing malformed parameters.
Related errors
- %w
- not supported
- failed to create ctr directory: %w
- failed to create dependency dir: %w
- dependency %q exited with non-zero code: %d
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/f5a4f4512404b538.
Report an issue: GitHub.