Missing task outputs in actions protocol #4

Closed
opened 2022-12-08 11:27:57 +00:00 by ChristopherHX · 2 comments

A task (I think this means job in GitHub Actions) can send outputs back, however based on the TaskState Message this protocol can only store the success, failure etc. as result.

message TaskState {

I see that the populated needs context can be send to the runner via

optional google.protobuf.Struct context = 3; // See https://docs.github.com/en/actions/learn-github-actions/contexts#github-context .
, but there seem to be no way for send outputs back to gitea.

Official GitHub Documentation for job outputs:

nektos/act, currently evaluates job outputs inplace in

Outputs map[string]string `yaml:"outputs"`
. This is probably a place, which needs refactoring to not update the job model object.

This is only relevant for an internal runner protocol for gitea. External CI would maintain this information on it's own, because task outputs are not visible in the UI.

A task (I think this means job in GitHub Actions) can send outputs back, however based on the TaskState Message this protocol can only store the success, failure etc. as result. https://gitea.com/gitea/actions-proto-def/src/commit/9faf5cf8790917ef06b1cb62560212f3fd663793/proto/runner/v1/messages.proto#L82 I see that the populated needs context can be send to the runner via https://gitea.com/gitea/actions-proto-def/src/commit/9faf5cf8790917ef06b1cb62560212f3fd663793/proto/runner/v1/messages.proto#L76, but there seem to be no way for send outputs back to gitea. Official GitHub Documentation for job outputs: - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs nektos/act, currently evaluates job outputs inplace in https://gitea.com/gitea/act/src/commit/7920109e895138b6db7825f80241bc17192e07ad/pkg/model/workflow.go#L116. This is probably a place, which needs refactoring to not update the job model object. _This is only relevant for an internal runner protocol for gitea. External CI would maintain this information on it's own, because task outputs are not visible in the UI._
Owner

Yes, you're right, we overlooked that part.

I think it's necessary to add support for outputs, but you know, the current PR is too large, I plan to start a new PR to do it later, what do you think?

And I believe you're an expert at GitHub actions, could you please don't reject if I have some questions to ask you in the future? ?

Yes, you're right, we overlooked that part. I think it's necessary to add support for `outputs`, but you know, the current PR is too large, I plan to start a new PR to do it later, what do you think? And I believe you're an expert at GitHub actions, could you please don't reject if I have some questions to ask you in the future? ?
wolfogre added the
enhancement
label 2022-12-09 03:55:17 +00:00
Author

Yes splitting the server side PR is a good idea. This issue is actually only for the protocol, the server and runner side is more complex.

Feel free to ask me.

Yes splitting the server side PR is a good idea. This issue is actually only for the protocol, the server and runner side is more complex. Feel free to ask me.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/actions-proto-def#4
No description provided.