Skip to content

HTTP API : Creation of a conversion tasks returns a task_id - #367

Open
ecdatadog wants to merge 3 commits into
goharbor:mainfrom
ecdatadog:add_task_id
Open

HTTP API : Creation of a conversion tasks returns a task_id#367
ecdatadog wants to merge 3 commits into
goharbor:mainfrom
ecdatadog:add_task_id

Conversation

@ecdatadog

@ecdatadog ecdatadog commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #368

Context

When requesting a task async (sync=false) :

  • The POST /api/v1/conversions doesn't returns any body (outside of a ok) so it is impossible to get an identifer of the task
  • THE GET /api/v1/conversions is a list of all the tasks

so it is impossible to get a reliable way of knowing the status of the task (only heuristics)

Content of the feature

This PR adds :

  • a body response for the POST
  • adds a GET /api/v1/conversions/{task_id} to easily get a specific task

Breaking changes

  • HTTP API : Currently, the POST returns "OK" with a "Content-type: application/json" header . Do we accept this breaking change or should the answer be under some "Accept" header or a specific query parameter ?
  • Go API :
    • Adapter.Dispatch signature changes . I looked on github and it doesn't seems to be used referenced in public repo outside of goharbor/acceleration-service
    • Handler.Converter signature changes . I looked on github and it doesn't seems to be used referenced in public repo outside of goharbor/acceleration-service

@ecdatadog ecdatadog changed the title Add task_id in the conversion logic HTTP API : Creation of a conversion tasks returns a task_id Jul 9, 2026
When requesting a task async (sync=false) :
* The POST /api/v1/conversions doesn't returns any body (outside of a ok) so it is impossible to get an identifer of the task
* THE GET /api/v1/conversions is a list of all the tasks

so it is impossible to get a reliable way of knowing the status of the task (only heuristics)

This PR adds :
* a body response for the POST
* adds a GET /api/v1/conversions/{task_id} to easily get a specific task

Signed-off-by: Etienne Carriere <etienne.carriere@datadoghq.com>
@ecdatadog
ecdatadog marked this pull request as draft July 9, 2026 14:00
@ecdatadog
ecdatadog marked this pull request as ready for review July 9, 2026 14:56

@imeoer imeoer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

others LGTM!

Comment thread pkg/client/convert.go Outdated
Comment thread pkg/router/task_list.go Outdated
Comment thread pkg/client/convert.go Outdated
Signed-off-by: Etienne Carriere <etienne.carriere@datadoghq.com>
Signed-off-by: Etienne Carriere <etienne.carriere@datadoghq.com>
@ecdatadog

ecdatadog commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I took in account your comment. Could you please re-review this PR ?

What is the release policy and would it be possible to get a release of the service ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better handling of async conversion tasks

2 participants