-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat(venona): report task status to te platform #522
feat(venona): report task status to te platform #522
Conversation
0e0dfd5
to
bf2cab0
Compare
bf2cab0
to
01b3b1f
Compare
…-25384-runner-report-status-of-task-execution-to-cf-api
venona/pkg/task/task.go
Outdated
// Task Id | ||
Id string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure this is needed.
the type and status have their type definitions because they behave like enums, and have a predefined set of values.
the id is just any random string, i imagine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this makes sense. Will fix it now
return fmt.Errorf("failed marshalling when reporting task status: %w", err) | ||
} | ||
|
||
_, err = c.doRequest(ctx, "POST", bytes.NewBuffer(s), nil, "api", "agent", c.agentID, "tasks", string(id), "statuses") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is bytes.NewBuffer(s)
needed, when s
is already []byte
?
maybe it is, i am not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It requires io.Reader
interface, so it seems that it's needed
9a4aee3
to
85add13
Compare
…-25384-runner-report-status-of-task-execution-to-cf-api
What
This adds support for reporting agent tasks statuses back to the platform.
Also, this exposes Runtime chart version to the
venona
andengine
.