Repository navigation
feat(copy): copy and move artifacts between hosted repositories - #530
Merged
Merged
Conversation
- POST /api/v1/repositories/{source}/copy and /move, built on the promote engine
- copies carry properties and emit artifact.uploaded webhooks; created_at is the copy time; a move trashes the source
- oa cp / oa mv and a "Copy to…/Move to…" dialog with a dry-run preview
- migration 032 adds the artifact.copied audit action
- docs and OpenAPI updated
Coverage
Go by area
Web by area (lines)
|
The bundle/copy authz mock loads token scope targets by ID (#528 made the evaluator read them).
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Copy or move artifacts between two hosted repositories of the same format.
POST /api/v1/repositories/{source}/copyand/move(items bypackage+version, orsha256+path;dry_run, admin-onlyforce), built on the promote engine.oa cp/oa mv, and "Copy to…" / "Move to…" on the artifact page with a dry-run preview.docs/repositories/copy-and-move.md, CLI and API reference regenerated.Decisions
artifact.uploaded, which drives scan-on-upload and policies.created_atof a copy is the copy time.force.transfer.artifact.copied/artifact.moved(the DB constraint and the repo convention use past tense, notartifact.copy). Migration 032 extendschk_audit_action; the integrator must merge it with other audit-constraint changes.BundlesStoregainedGetOrCreateStorageQuota(shared quota accounting).Out of scope (per the issue)
Adopting proxy-cache artifacts, cross-format copies, copying a whole repository or a path prefix.
Known gaps
tagonly narrows between manifests.Checks
golangci-linton promote, api, middleware, oacli, audit, cmd/server: 0 issues;make deadcode,make docs-checkok.go test -shorton the same packages; integration on promote, audit, database;bun test(2513 pass),bun run i18n:check.mvn deploy->oa cp/oa mv->mvn dependency:getfrom the target (jar byte-identical);npm publish->oa cp->npm install; restore from trash after a move; non-admin token matrix (copy ok, move 403 without delete, force 403, invisible repo 404).bun run typecheckreports onlysrc/telemetry/otel.ts(105,28), unrelated to this change.Closes #511