{"record":{"id":"58b8f5f3a3102667","repo":"netbirdio/netbird","slug":"job-not-implemented","errorCode":null,"errorMessage":"job not implemented","messagePattern":"job not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"client/jobexec/executor.go","lineNumber":21,"sourceCode":"import (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\tlog \"github.com/sirupsen/logrus\"\n\n\t\"github.com/netbirdio/netbird/client/internal/debug\"\n\t\"github.com/netbirdio/netbird/upload-server/types\"\n)\n\nconst (\n\tMaxBundleWaitTime = 60 * time.Minute // maximum wait time for bundle generation (1 hour)\n)\n\nvar (\n\tErrJobNotImplemented = errors.New(\"job not implemented\")\n)\n\ntype Executor struct {\n}\n\nfunc NewExecutor() *Executor {\n\treturn &Executor{}\n}\n\nfunc (e *Executor) BundleJob(ctx context.Context, debugBundleDependencies debug.GeneratorDependencies, params debug.BundleConfig, waitForDuration time.Duration, mgmURL string) (string, error) {\n\tif waitForDuration > MaxBundleWaitTime {\n\t\tlog.Warnf(\"bundle wait time %v exceeds maximum %v, capping to maximum\", waitForDuration, MaxBundleWaitTime)\n\t\twaitForDuration = MaxBundleWaitTime\n\t}\n\n\tif waitForDuration > 0 {\n\t\tif err := waitFor(ctx, waitForDuration); err != nil {\n\t\t\treturn \"\", err","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/jobexec/executor.go#L3-L39","documentation":"Sentinel ErrJobNotImplemented (client/jobexec/executor.go:21). The agent receives management-initiated jobs on a stream (Engine.receiveJobEvents in client/internal/engine.go); only the Bundle job workload type is handled, and any other WorkloadParameters hits the default case, which answers the job with status failed and this message as the Reason. It marks a job type the agent build does not support, typically a management server newer than the agent.","triggerScenarios":"Management dispatches a JobRequest whose WorkloadParameters is not *mgmProto.JobRequest_Bundle (e.g. a new job kind introduced in a newer management release) to an older agent; test harnesses sending synthetic job types.","commonSituations":"Management upgraded before the agents: new job kinds fail on fleet agents still on older versions, showing 'job not implemented' as the failure reason in management. The job stream keeps running; only that job is rejected.","solutions":["Update the agent to a release that supports the job type management is dispatching.","On the management side, restrict dispatch of new job kinds to peers whose agent version supports them.","Treat the failed-job reason as informational: the connection itself is unaffected."],"exampleFix":"// before: management dispatches an unsupported workload to any peer\njob := &mgmProto.JobRequest{WorkloadParameters: &mgmProto.JobRequest_Metrics{}}\n\n// after: gate new job kinds on agent capability/version\nif !peerSupportsJob(peer, mgmProto.JobRequest_METRICS) {\n    return fmt.Errorf(\"peer %s cannot run this job (job not implemented)\", peer.ID)\n}","handlingStrategy":"validation","validationCode":"// Management-side: only dispatch job kinds the peer's agent supports.\nif !agentSupportsWorkload(peer.AgentVersion, requestedWorkload) {\n    return fmt.Errorf(\"skip job: peer agent does not implement workload %T\", requestedWorkload)\n}","typeGuard":"func isJobNotImplemented(reason string) bool {\n    return strings.Contains(reason, jobexec.ErrJobNotImplemented.Error())\n}","tryCatchPattern":"// Job reasons arrive as strings in the JobResponse; inspect Reason on failed jobs.\nif resp.GetStatus() == mgmProto.JobStatus_failed && isJobNotImplemented(string(resp.GetReason())) {\n    // agent too old for this job kind: upgrade the agent or stop dispatching it\n}","preventionTips":["Roll out agent updates before enabling new job kinds on management.","Track failed-job reasons per peer version to spot fleet version skew early."],"tags":["go","netbird","agent","management","jobs","version-skew"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}