Skip to content

Commit

Permalink
Find expired and active commits (#2069)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyaug authored Jun 21, 2021
1 parent 4670b2f commit af759c6
Show file tree
Hide file tree
Showing 64 changed files with 4,905 additions and 102 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ clean:
pkg/ddl/statik.go \
pkg/graveler/sstable/mock \
pkg/webui \
pkg/graveler/committed/mock
pkg/graveler/committed/mock \
pkg/graveler/mock

check-licenses: check-licenses-go-mod check-licenses-npm

Expand Down Expand Up @@ -137,6 +138,7 @@ gen-api: go-install ## Run the swagger code generator
gen-mockgen: go-install ## Run the generator for inline commands
$(GOGENERATE) ./pkg/graveler/sstable
$(GOGENERATE) ./pkg/graveler/committed
$(GOGENERATE) ./pkg/graveler
$(GOGENERATE) ./pkg/pyramid
$(GOGENERATE) ./pkg/onboard
$(GOGENERATE) ./pkg/actions
Expand Down
115 changes: 115 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,48 @@ components:
- checksum
- size_bytes

GarbageCollectionPrepareRequest:
type: object
properties:
previous_run_id:
type: string
description: run id of a previous successful GC job
example: 64eaa103-d726-4a33-bcb8-7c0b4abfe09e

GarbageCollectionPrepareResponse:
type: object
properties:
run_id:
type: string
description: a unique identifier generated for this GC job
example: 64eaa103-d726-4a33-bcb8-7c0b4abfe09e
required:
- run_id

GarbageCollectionRule:
type: object
properties:
branch_id:
type: string
retention_days:
type: integer
required:
- branch_id
- retention_days

GarbageCollectionRules:
type: object
properties:
default_retention_days:
type: integer
branches:
type: array
items:
$ref: '#/components/schemas/GarbageCollectionRule'
required:
- default_retention_days
- branches

paths:
/setup_lakefs:
post:
Expand Down Expand Up @@ -2829,7 +2871,80 @@ paths:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"
/repositories/{repository}/gc/rules:
parameters:
- in: path
name: repository
required: true
schema:
type: string
get:
tags:
- retention
operationId: getGarbageCollectionRules
responses:
200:
description: gc rule list
content:
application/json:
schema:
$ref: "#/components/schemas/GarbageCollectionRules"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"
post:
tags:
- retention
operationId: set garbage collection rules
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/GarbageCollectionRules"
responses:
204:
description: set garbage collection rules successfully
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/gc/prepare_commits:
parameters:
- in: path
name: repository
required: true
schema:
type: string
post:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/GarbageCollectionPrepareRequest"
tags:
- retention
operationId: prepareGarbageCollectionCommits
summary: save lists of active and expired commits for garbage collection
responses:
201:
description: paths to commit dataset
content:
application/json:
schema:
$ref: "#/components/schemas/GarbageCollectionPrepareResponse"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"
/healthcheck:
get:
operationId: healthCheck
Expand Down
7 changes: 7 additions & 0 deletions clients/java/README.md

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

178 changes: 178 additions & 0 deletions clients/java/api/openapi.yaml

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

13 changes: 13 additions & 0 deletions clients/java/docs/GarbageCollectionCommits.md

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

13 changes: 13 additions & 0 deletions clients/java/docs/GarbageCollectionPrepareRequest.md

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

Loading

0 comments on commit af759c6

Please sign in to comment.