{"record":{"id":"2bb8a7ae1c862232","repo":"argoproj/argo-workflows","slug":"w","errorCode":null,"errorMessage":"%w","messagePattern":"%w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argoexec/commands/artifact_plugin_init.go","lineNumber":49,"sourceCode":"\n\t\t\tgo func() {\n\t\t\t\tcommand, closer, err := startCommand(ctx, name, args, &wfv1.Template{}, containerName, includeScriptOutput)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogger.WithError(err).Error(ctx, \"failed to start command\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tdefer closer()\n\t\t\t\t// setup signal handlers\n\t\t\t\tsignals := make(chan os.Signal, 1)\n\t\t\t\tdefer close(signals)\n\t\t\t\tsignal.Notify(signals)\n\t\t\t\tdefer signal.Reset()\n\n\t\t\t\tforwardSignals(ctx, signals, command.Process.Pid, false)\n\t\t\t}()\n\t\t\terr := loadArtifactPlugin(ctx, wfv1.ArtifactPluginName(artifactPlugin))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t}\n\tcommand.Flags().StringVar(&artifactPlugin, \"plugin-name\", \"\", \"Artifact plugin name\")\n\treturn &command\n}\n\nfunc loadArtifactPlugin(ctx context.Context, pluginName wfv1.ArtifactPluginName) error {\n\tif err := os.MkdirAll(pluginName.SocketDir(), 0755); err != nil {\n\t\treturn err\n\t}\n\twfExecutor := executor.Init(ctx, clientConfig, varRunArgo)\n\terrHandler := wfExecutor.HandleError(ctx)\n\tdefer errHandler()\n\tdefer stats.LogStats()\n\n\terr := wfExecutor.LoadArtifactsFromPlugin(ctx, pluginName)","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argoexec/commands/artifact_plugin_init.go#L31-L67","documentation":"The `argoexec artifact-plugin load` command loads an artifact plugin by name; if loadArtifactPlugin returns an error (plugin not found, failed to start/exec, bad configuration), the RunE re-wraps it verbatim with `%w`. The wrapper adds no information — the underlying error from the plugin loader is the real signal.","triggerScenarios":"Plugin name given via --plugin-name does not match any plugin in the configured plugin directory; plugin binary missing, not executable, or fails at startup; plugin directory/env var (artifact plugin location) misconfigured in the workflow pod.","commonSituations":"Typo in the artifact plugin name in the workflow spec; plugin image lacking the plugin binary or wrong permissions; plugin crashed during initialization (bad config file, missing dependencies).","solutions":["Read the wrapped cause — it names whether the plugin was not found or failed to start.","Verify the plugin name matches the installed artifact plugin (check the plugin dir / executor logs).","Ensure the plugin binary is present, executable, and its configuration is valid in the pod image.","Check argoexec logs (and plugin stdout/stderr) for the plugin's own startup error."],"exampleFix":"// before\nloadArtifactPlugin(ctx, \"my-plugin\")  // fails silently on name mismatch\n// after\n// confirm: ls /var/run/argo/artifact-plugins  (or configured plugin dir)\nloadArtifactPlugin(ctx, wfv1.ArtifactPluginName(\"my-plugin\"))","handlingStrategy":"try-catch","validationCode":"plugins, _ := os.ReadDir(pluginDir)\nfor _, p := range plugins { if p.Name() == pluginName { found = true } }\nif !found { return fmt.Errorf(\"artifact plugin %q not found in %s\", pluginName, pluginDir) }","typeGuard":null,"tryCatchPattern":"if err := loadArtifactPlugin(ctx, pluginName); err != nil {\n    logger.Error(ctx, \"artifact plugin load failed\", \"plugin\", pluginName, \"err\", err)\n    return fmt.Errorf(\"artifact plugin %q failed to load: %w\", pluginName, err)\n}","preventionTips":["Verify the plugin binary exists and is executable in the workflow pod image","Match --plugin-name exactly to the installed plugin name","Check argoexec and plugin logs for startup errors","Keep plugin config files valid and present in the image"],"tags":["argoexec","artifact-plugin","plugin-load","wrapping"],"backgroundTag":"plugin-initialization-failed","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}