{"record":{"id":"70eb5ca3e3a62906","repo":"GoogleContainerTools/skaffold","slug":"unable-to-monitor-resource-unknown-type-s","errorCode":null,"errorMessage":"unable to monitor resource. Unknown type %s","messagePattern":"unable to monitor resource\\. Unknown type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/cloudrun/status.go","lineNumber":89,"sourceCode":"func (s *Monitor) Check(ctx context.Context, out io.Writer) error {\n\t_, err, _ := s.singleRun.Do(s.labeller.GetRunID(), func() (interface{}, error) {\n\t\treturn struct{}{}, s.check(ctx, out)\n\t})\n\treturn err\n}\nfunc (s *Monitor) check(ctx context.Context, out io.Writer) error {\n\tresources := make([]*runResource, len(s.Resources))\n\tfor i, resource := range s.Resources {\n\t\tvar sub runSubresource\n\t\tswitch resource.Type() {\n\t\tcase typeService:\n\t\t\tsub = &runServiceResource{path: resource.String()}\n\t\tcase typeJob:\n\t\t\tsub = &runJobResource{path: resource.String()}\n\t\tcase typeWorkerPool:\n\t\t\tsub = &runWorkerPoolResource{path: resource.String()}\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unable to monitor resource. Unknown type %s\", resource.Type())\n\t\t}\n\t\tresources[i] = &runResource{resource: resource, sub: sub}\n\t}\n\tc := newCounter(len(resources))\n\tcctx, cancel := context.WithCancel(ctx)\n\tdefer cancel()\n\tvar wg sync.WaitGroup\n\tvar exitStatusOnce sync.Once\n\texitStatus := proto.StatusCode_STATUSCHECK_SUCCESS\n\tfor _, resource := range resources {\n\t\twg.Add(1)\n\t\tgo func(resource *runResource) {\n\t\t\tdefer wg.Done()\n\t\t\tresource.pollResourceStatus(cctx, s.statusCheckDeadline, s.pollPeriod, s.clientOptions, true, s.tolerateFailures)\n\t\t\tc.markComplete()\n\t\t\tres := resource.status\n\t\t\tif res.ae.ErrCode != proto.StatusCode_STATUSCHECK_SUCCESS {\n\t\t\t\texitStatusOnce.Do(func() { exitStatus = res.ae.ErrCode })","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/cloudrun/status.go#L71-L107","documentation":"When checking Cloud Run resource status, skaffold inspects each monitored resource's type (service, job, worker pool) and constructs the corresponding status-checker sub-resource. If the resource's type string matches none of the known types, `check` returns this error because it cannot determine how to monitor the resource.","triggerScenarios":"A resource definition under deploy.cloudrun (or the resource parsed from `gcloud` output / config) has a Type() other than \"service\", \"job\", or \"workerPool\" — e.g. a typo in the manifest kind or an unsupported Cloud Run resource type passed to the status monitor.","commonSituations":"Typo in skaffold.yaml cloudrun resource type; newer Cloud Run resource kind not supported by the installed skaffold version; programmatically constructed runResource with an unexpected type string.","solutions":["Fix the resource type in skaffold.yaml (valid values: service, job, workerPool)","Upgrade skaffold to the latest version, which may support newer Cloud Run resource types","If defining resources programmatically/via API, ensure Type() returns one of the supported constants"],"exampleFix":"// before\ndeploy:\n  cloudrun:\n    resources:\n      - type: servcie\n\n// after\ndeploy:\n  cloudrun:\n    resources:\n      - type: service","handlingStrategy":"validation","validationCode":"allowed := map[string]bool{\"service\": true, \"job\": true, \"workerPool\": true}\nfor _, r := range cfg.Deploy.CloudRun.Resources {\n    if !allowed[r.Type] {\n        return fmt.Errorf(\"unsupported cloudrun resource type %q\", r.Type)\n    }\n}\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate cloudrun resource types in skaffold.yaml against the schema before deploying","Keep skaffold updated for new Cloud Run resource kinds","Use skaffold diagnose/config linting to catch typos early"],"tags":["cloudrun","statuscheck","config"],"backgroundTag":"unsupported-resource-type","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}