Skip to content

Implement HO golang client API ExtractArtifact(filename string) #1323

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0405ysj
Copy link
Collaborator

@0405ysj 0405ysj commented Jun 25, 2025

No description provided.

Comment on lines +601 to +602
path := "/v1/userartifacts/" + checksum + "_extracted"
res := &hoapi.StatArtifactResponse{}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently I'm starting implementation about HO golang client API for extracting user artifact, but I think it's better to have more support on StatArtifactResponse so that retriving an answer whether artifact is extracted or not.

type StatArtifactResponse struct{
  Extracted boolean `json:"extracted"`
}

@jemoreira @ser-io To get agreement before implementation, is it good to proceed implementation without additional review regarding this issue on our previous design doc? Thanks!

Copy link
Member

@ser-io ser-io Jun 25, 2025

Choose a reason for hiding this comment

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

You can receive Extracted: false and then receive 409 in the following POST /:extract request, as the server state could change in between those calls.

You rather need to handle 409 response on POST /:extract and don't return error to the function caller when the server returns 409. By doing so, there's no need to have the new field Extracted boolean json:"extracted"`` just rely on the server response on POST /:extract request.

@0405ysj 0405ysj requested review from ser-io, jemoreira and ikicha and removed request for ser-io June 25, 2025 07:15
Copy link
Member

@ser-io ser-io left a comment

Choose a reason for hiding this comment

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

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.

2 participants