goharbor/harbor · error

failed to do the prepare work for pushing/uploading resource

Error message

failed to do the prepare work for pushing/uploading resources: %v

What it means

Error "failed to do the prepare work for pushing/uploading resources: %v" thrown in goharbor/harbor.

Source

Thrown at src/controller/replication/flow/stage.go:119

		}
		res.Metadata = &model.ResourceMetadata{
			Repository: &model.Repository{
				Name:     name,
				Metadata: resource.Metadata.Repository.Metadata,
			},
			Vtags:     resource.Metadata.Vtags,
			Artifacts: resource.Metadata.Artifacts,
		}
		result = append(result, res)
	}
	log.Debug("assemble the destination resources completed")
	return result, nil
}

// do the prepare work for pushing/uploading the resources: create the namespace or repository
func prepareForPush(adapter adp.Adapter, resources []*model.Resource) error {
	if err := adapter.PrepareForPush(resources); err != nil {
		return fmt.Errorf("failed to do the prepare work for pushing/uploading resources: %v", err)
	}
	log.Debug("the prepare work for pushing/uploading resources completed")
	return nil
}

// return the name with format "res_name" or "res_name:[vtag1,vtag2,vtag3]"
// if the resource has vtags
func getResourceName(res *model.Resource) string {
	if res == nil {
		return ""
	}
	meta := res.Metadata
	if meta == nil {
		return ""
	}
	n := 0
	if len(meta.Artifacts) > 0 {
		for _, artifact := range meta.Artifacts {

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/controller/replication/flow/stage.go:119 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/b35a2f928837fd72. Report an issue: GitHub.