Skip to content
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

Merged

Conversation

masontikhonov
Copy link
Contributor

@masontikhonov masontikhonov commented Nov 13, 2024

What

This adds support for reporting agent tasks statuses back to the platform.

Also, this exposes Runtime chart version to the venona and engine.

@masontikhonov masontikhonov self-assigned this Nov 13, 2024
@masontikhonov masontikhonov force-pushed the CR-25384-runner-report-status-of-task-execution-to-cf-api branch 3 times, most recently from 0e0dfd5 to bf2cab0 Compare November 13, 2024 15:46
@masontikhonov masontikhonov force-pushed the CR-25384-runner-report-status-of-task-execution-to-cf-api branch from bf2cab0 to 01b3b1f Compare November 13, 2024 16:01
Comment on lines 46 to 47
// Task Id
Id string
Copy link
Contributor

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.

Copy link
Contributor Author

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")
Copy link
Contributor

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.

Copy link
Contributor Author

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

@masontikhonov masontikhonov force-pushed the CR-25384-runner-report-status-of-task-execution-to-cf-api branch from 9a4aee3 to 85add13 Compare December 2, 2024 16:48
@masontikhonov masontikhonov marked this pull request as ready for review December 2, 2024 19:45
@masontikhonov masontikhonov requested a review from a team as a code owner December 2, 2024 19:45
@masontikhonov masontikhonov merged commit 56f3db4 into main Dec 2, 2024
2 checks passed
@masontikhonov masontikhonov deleted the CR-25384-runner-report-status-of-task-execution-to-cf-api branch December 2, 2024 19:50
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