Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long running dump and restore capability #6975

Merged
merged 19 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 166 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,53 @@ components:
ref:
type: string

TaskInfo:
type: object
required:
- id
properties:
id:
type: string
description: ID of the task

RepositoryDumpStatus:
type: object
required:
- id
- done
- update_time
properties:
id:
type: string
description: ID of the task
done:
type: boolean
update_time:
type: string
format: date-time
error:
type: string
refs:
$ref: "#/components/schemas/RefsDump"

RepositoryRestoreStatus:
type: object
required:
- id
- done
- update_time
properties:
id:
type: string
description: ID of the task
done:
type: boolean
update_time:
type: string
format: date-time
error:
type: string

RefsDump:
type: object
required:
Expand Down Expand Up @@ -2686,6 +2733,125 @@ paths:
default:
$ref: "#/components/responses/ServerError"


/repositories/{repository}/dump:
parameters:
- in: path
name: repository
required: true
schema:
type: string
post:
tags:
- repositories
operationId: dumpSubmit
summary: Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
responses:
202:
description: dump task information
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInfo"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"
get:
tags:
- repositories
operationId: dumpStatus
summary: Status of a repository dump task
parameters:
- in: query
name: task_id
required: true
schema:
type: string
responses:
200:
description: dump task status
content:
application/json:
schema:
$ref: "#/components/schemas/RepositoryDumpStatus"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
420:
description: too many requests
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/restore:
parameters:
- in: path
name: repository
required: true
schema:
type: string
post:
tags:
- repositories
operationId: restoreSubmit
summary: Restore repository from a dump in the object store
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RefsDump"
responses:
202:
description: restore task created
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInfo"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"
get:
tags:
- repositories
operationId: restoreStatus
summary: Status of a restore request
parameters:
- in: query
name: task_id
required: true
schema:
type: string
responses:
200:
description: restore task status
content:
application/json:
schema:
$ref: "#/components/schemas/RepositoryRestoreStatus"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
420:
description: too many requests
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/tags:
parameters:
- in: path
Expand Down
9 changes: 9 additions & 0 deletions clients/java-legacy/.openapi-generator/FILES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions clients/java-legacy/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading