{"record":{"id":"5f5a8a652f864bd5","repo":"argoproj/argo-workflows","slug":"this-is-impossible-if-you-are-not-using-the-argo-s","errorCode":null,"errorMessage":"this is impossible if you are not using the Argo Server, see %s","messagePattern":"this is impossible if you are not using the Argo Server, see (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apiclient/argo-kube-client.go","lineNumber":38,"sourceCode":"\tworkflowarchivepkg \"github.com/argoproj/argo-workflows/v4/pkg/apiclient/workflowarchive\"\n\t\"github.com/argoproj/argo-workflows/v4/pkg/apiclient/workflowtemplate\"\n\tworkflow \"github.com/argoproj/argo-workflows/v4/pkg/client/clientset/versioned\"\n\t\"github.com/argoproj/argo-workflows/v4/server/auth\"\n\tclusterworkflowtmplserver \"github.com/argoproj/argo-workflows/v4/server/clusterworkflowtemplate\"\n\tcronworkflowserver \"github.com/argoproj/argo-workflows/v4/server/cronworkflow\"\n\tsyncserver \"github.com/argoproj/argo-workflows/v4/server/sync\"\n\t\"github.com/argoproj/argo-workflows/v4/server/types\"\n\tworkflowserver \"github.com/argoproj/argo-workflows/v4/server/workflow\"\n\t\"github.com/argoproj/argo-workflows/v4/server/workflow/store\"\n\tworkflowtemplateserver \"github.com/argoproj/argo-workflows/v4/server/workflowtemplate\"\n\t\"github.com/argoproj/argo-workflows/v4/util/help\"\n\t\"github.com/argoproj/argo-workflows/v4/util/instanceid\"\n\trbacutil \"github.com/argoproj/argo-workflows/v4/util/rbac\"\n)\n\nvar (\n\targoKubeOffloadNodeStatusRepo = sqldb.ExplosiveOffloadNodeStatusRepo\n\tErrNoArgoServer               = fmt.Errorf(\"this is impossible if you are not using the Argo Server, see %s\", help.CLI())\n)\n\ntype ArgoKubeOpts struct {\n\t// Closing caching channel will stop caching informers\n\tCachingCloseCh chan struct{}\n\n\t// Whether to cache Workflows\n\t// This improves performance of reading Workflows, but it increases memory usage and startup time\n\t//\n\t// Workflow caching uses in-memory SQLite DB and it provides full capabilities\n\tCacheWorkflows bool\n\n\t// Whether to cache WorkflowTemplates\n\t// This improves performance of reading WorkflowTemplates, but it increases memory usage and startup time\n\t// It is especially visible during validating templates with many references,\n\t//\n\t// Note that templates caching currently uses informers, so not all template\n\t// get/list can use it, since informer has limited capabilities (such as filtering)","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/pkg/apiclient/argo-kube-client.go#L20-L56","documentation":"ErrNoArgoServer is the sentinel error returned by argoKubeClient for services that only exist on the argo-server: ArchivedWorkflowService, InfoService, and SyncService. The direct-kube (argoKube) client implements workflow/template services in-process against Kubernetes, but has no backing implementation for archive/info/sync, so it returns this declared error explaining that these RPCs are impossible without an Argo Server.","triggerScenarios":"Creating a client with the direct-kube transport (apiclient.NewClientFromOptsWithContext with a kube ClientConfig and no ArgoServerOpts.URL — e.g. `argo archive list` running with KUBECONFIG access but no --argo-server) and then calling NewArchivedWorkflowServiceClient(), NewInfoServiceClient(), or NewSyncServiceClient().","commonSituations":"Running `argo archive get/list` or `argo server info` commands with direct-kube access (ARGO_SERVER unset); scripts assuming the archive API works everywhere; offline/off-cluster tools using the kube client.","solutions":["Point the client at an Argo Server (set ARGO_SERVER / pass --argo-server) so these services are reachable","If you only need workflow/template CRUD, keep direct-kube access and use NewWorkflowServiceClient","Start the argo server (`argo server`) locally if you need archive access without a remote server"],"exampleFix":"// before\nclient, _ := apiclient.NewAPIClient(ctx, apiclient.Opts{ClientConfigSupplier: kubeConf})\narch, err := client.NewArchivedWorkflowServiceClient() // ErrNoArgoServer\n// after\nclient, _ := apiclient.NewAPIClient(ctx, apiclient.Opts{ArgoServerOpts: apiclient.ArgoServerOpts{URL: serverURL}, AuthSupplier: auth})\narch, err := client.NewArchivedWorkflowServiceClient()","handlingStrategy":"fallback","validationCode":"// detect direct-kube mode before using server-only services\nusingArgoServer := os.Getenv(\"ARGO_SERVER\") != \"\"\nif !usingArgoServer && needsArchiveOrInfo {\n    return errors.New(\"archive/info/sync services require an Argo Server: set ARGO_SERVER or pass --argo-server\")\n}","typeGuard":null,"tryCatchPattern":"client, err := apiclient.NewAPIClient(ctx, opts)\nif err != nil { return err }\narch, err := client.NewArchivedWorkflowServiceClient()\nif errors.Is(err, apiclient.ErrNoArgoServer) {\n    return fmt.Errorf(\"direct-kube mode has no archive API; connect to an Argo Server: %w\", err)\n}","preventionTips":["Feature-detect: check errors.Is(err, apiclient.ErrNoArgoServer) and degrade gracefully","Document which commands require an Argo Server (archive, info, sync)","Default to server transport when your tooling needs archive queries"],"tags":["grpc","client","architecture","archive"],"backgroundTag":"service-unavailable-in-direct-kube-mode","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"}