Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9c5b395
first steps in implementation
Annaseli Nov 19, 2025
738149b
Merge branch 'master' into feature/async-commit-merge
Annaseli Nov 24, 2025
88e7ffa
Merge branch 'master' into feature/async-commit-merge
Annaseli Nov 24, 2025
9ab1c3f
implemented the rest backend funcs
Annaseli Nov 26, 2025
3fd36e6
Merge branch 'master' into feature/async-commit-merge
Annaseli Nov 26, 2025
f2c2799
fixed build issues
Annaseli Nov 26, 2025
69135c7
added the new asyncOperations interface as params to controller and s…
Annaseli Nov 26, 2025
c7dc897
Add async commit/merge API changes
Annaseli Nov 26, 2025
f6195f1
Merge branch 'master' into feature/async-commit-merge
Annaseli Nov 26, 2025
e0cd866
test 1
Annaseli Nov 26, 2025
48c87eb
test 2
Annaseli Nov 26, 2025
d785292
cleaned code
Annaseli Nov 27, 2025
120db87
Regenerate catalog.pb.go to fix CI validation
Annaseli Nov 27, 2025
69465d6
renamed funcs and cleaned code
Annaseli Nov 27, 2025
c904a9f
cleaned code
Annaseli Nov 27, 2025
3cab6c1
fixing pointer
Annaseli Nov 27, 2025
15b67b4
updated the error handling code to use callback
Annaseli Nov 27, 2025
0536953
addressed comments
Annaseli Nov 27, 2025
d40500d
addressed comments
Annaseli Nov 29, 2025
adbbf7a
updated int32 to int64 in proto
Annaseli Nov 29, 2025
3151b1b
chaned err msg in cb init
Annaseli Nov 29, 2025
009f716
updated the erro store in proto
Annaseli Nov 30, 2025
308f820
updated the test with a new behaviour
Annaseli Nov 30, 2025
8427c7c
addressed comments
Annaseli Nov 30, 2025
0414037
fixed linter issues
Annaseli Nov 30, 2025
e01f96f
Merge branch 'master' into feature/async-commit-merge
Annaseli Nov 30, 2025
2d2e017
test
Annaseli Nov 30, 2025
ed14cd8
test2
Annaseli Nov 30, 2025
79d4c4e
fixed errors handling
Annaseli Dec 1, 2025
6549f89
Fix generated proto comments for CommitAsyncStatus
Annaseli Dec 1, 2025
66e1bbe
addressed comments
Annaseli Dec 1, 2025
f543342
Merge branch 'master' into feature/async-commit-merge
Annaseli Dec 1, 2025
424e6ec
addressed Nir's comments
Annaseli Dec 2, 2025
5ac8c9a
addressed all comments
Annaseli Dec 2, 2025
386166f
fixed linter issues
Annaseli Dec 2, 2025
6d512d7
fixed linter issues
Annaseli Dec 2, 2025
629a5f3
fixed compilation issues
Annaseli Dec 2, 2025
523ab4d
fixed compilation issues 2
Annaseli Dec 2, 2025
c42a378
Fix lint issues
N-o-Z Dec 3, 2025
e5d3931
addressed comments
Annaseli Dec 3, 2025
30fdc4d
addressed comments
Annaseli Dec 3, 2025
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
250 changes: 247 additions & 3 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,46 @@ components:
- completed
- update_time

AsyncTaskStatus:
type: object
properties:
task_id:
type: string
description: the id of the async task
completed:
type: boolean
description: true if the task has completed (either successfully or with an error)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider - not sure what's the point of checking for completion when there's an error. Seems redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean - in order to check if we have an error we first need to see if completed=true, isn't it? Or did I misunderstand you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two are not inter-dependant.
Once you set an error (i.e. it is not nil) it is redundant to check the completed field.
When the client will implement the status loop - it will look for either completed or error. Either one will break the loop.
This is not blocking, I just don't understand this requirement

Copy link
Contributor Author

@Annaseli Annaseli Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we discussed with Barak yesterday about it

update_time:
type: string
format: date-time
description: last time the task status was updated
error:
$ref: "#/components/schemas/Error"
status_code:
type: integer
format: int32
description: an http status code that correlates with the underlying error if exists
required:
- task_id
- completed
- update_time

MergeAsyncStatus:
allOf:
- $ref: "#/components/schemas/AsyncTaskStatus"
- type: object
properties:
result:
$ref: "#/components/schemas/MergeResult"

CommitAsyncStatus:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except result everything here seems to be duplicate of the merge status. Consider consolidating these in a single schema and sharing it among the two

allOf:
- $ref: "#/components/schemas/AsyncTaskStatus"
- type: object
properties:
result:
$ref: "#/components/schemas/Commit"

PrepareGCUncommittedRequest:
type: object
properties:
Expand Down Expand Up @@ -4237,13 +4277,110 @@ paths:
409:
$ref: "#/components/responses/Conflict"
412:
description: Precondition Failed (e.g. a pre-commit hook returned a failure)
$ref: "#/components/responses/PreconditionFailed"
429:
description: too many requests
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/branches/{branch}/commits/async:
parameters:
- in: path
name: repository
required: true
schema:
type: string
- in: path
name: branch
required: true
schema:
type: string
post:
parameters:
- in: query
name: source_metarange
required: false
description: The source metarange to commit. Branch must not have uncommitted changes.
schema:
type: string
tags:
- experimental
operationId: commitAsync
summary: create commit asynchronously
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CommitCreation"
responses:
202:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the reason for 202 but we need to align our spec to return 202 for all async operations this is currently not the case

description: commit task started
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
$ref: "#/components/schemas/TaskCreation"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
429:
description: too many requests
501:
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/branches/{branch}/commits/async/{id}/status:
parameters:
- in: path
name: repository
required: true
schema:
type: string
- in: path
name: branch
required: true
schema:
type: string
- in: path
name: id
required: true
description: Unique identifier of the commit async task
schema:
type: string
get:
tags:
- experimental
operationId: commitAsyncStatus
summary: get status of async commit operation
responses:
200:
description: commit task status
content:
application/json:
schema:
$ref: "#/components/schemas/CommitAsyncStatus"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
409:
$ref: "#/components/responses/Conflict"
412:
$ref: "#/components/responses/PreconditionFailed"
429:
description: too many requests
501:
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

Expand Down Expand Up @@ -4596,6 +4733,113 @@ paths:
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}/async:
parameters:
- in: path
name: repository
required: true
schema:
type: string
- in: path
name: sourceRef
required: true
schema:
type: string
description: source ref
- in: path
name: destinationBranch
required: true
schema:
type: string
description: destination branch name
post:
tags:
- experimental
operationId: mergeIntoBranchAsync
summary: merge references asynchronously
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Merge"
responses:
202:
description: merge task started
content:
application/json:
schema:
$ref: "#/components/schemas/TaskCreation"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
429:
description: too many requests
501:
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}/async/{id}/status:
parameters:
- in: path
name: repository
required: true
schema:
type: string
- in: path
name: sourceRef
required: true
schema:
type: string
description: source ref
- in: path
name: destinationBranch
required: true
schema:
type: string
description: destination branch name
- in: path
name: id
required: true
description: Unique identifier of the merge async task
schema:
type: string
get:
tags:
- experimental
operationId: mergeIntoBranchAsyncStatus
summary: get status of async merge operation
responses:
200:
description: merge task status
content:
application/json:
schema:
$ref: "#/components/schemas/MergeAsyncStatus"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
409:
$ref: "#/components/responses/Conflict"
412:
$ref: "#/components/responses/PreconditionFailed"
429:
description: too many requests
501:
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/branches/{branch}/diff:
parameters:
- $ref: "#/components/parameters/PaginationAfter"
Expand Down Expand Up @@ -6701,7 +6945,7 @@ paths:
schema:
$ref: "#/components/schemas/MergeResult"
412:
description: precondition failed (e.g. a pre-merge hook returned a failure)
description: precondition failed
content:
application/json:
schema:
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.

Loading
Loading