{"record":{"id":"3bdea63300bd9282","repo":"goharbor/harbor","slug":"the-adapter-doesn-t-implement-the-artifactregistry","errorCode":null,"errorMessage":"the adapter doesn't implement the ArtifactRegistry interface","messagePattern":"the adapter doesn't implement the ArtifactRegistry interface","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/controller/replication/flow/stage.go","lineNumber":62,"sourceCode":"\t// create the destination registry adapter\n\tdstFactory, err := adp.GetFactory(policy.DestRegistry.Type)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to get adapter factory for registry type %s: %v\", policy.DestRegistry.Type, err)\n\t}\n\tdstAdapter, err = dstFactory.Create(policy.DestRegistry)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to create adapter for destination registry %s: %v\", policy.DestRegistry.URL, err)\n\t}\n\tlog.Debug(\"replication flow initialization completed\")\n\treturn srcAdapter, dstAdapter, nil\n}\n\n// fetch resources from the source registry\nfunc fetchResources(adapter adp.Adapter, policy *repctlmodel.Policy) ([]*model.Resource, error) {\n\tvar resources []*model.Resource\n\treg, ok := adapter.(adp.ArtifactRegistry)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"the adapter doesn't implement the ArtifactRegistry interface\")\n\t}\n\tres, err := reg.FetchArtifacts(policy.Filters)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to fetch artifacts: %v\", err)\n\t}\n\tresources = append(resources, res...)\n\n\tlog.Debug(\"fetch resources from the source registry completed\")\n\treturn resources, nil\n}\n\n// assemble the source resources by filling the registry information\nfunc assembleSourceResources(resources []*model.Resource,\n\tpolicy *repctlmodel.Policy) []*model.Resource {\n\tfor _, resource := range resources {\n\t\tresource.Registry = policy.SrcRegistry\n\t}\n\tlog.Debug(\"assemble the source resources completed\")","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/replication/flow/stage.go#L44-L80","documentation":"Error \"the adapter doesn't implement the ArtifactRegistry interface\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/replication/flow/stage.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}