fix(jobparser): support workflow_dispatch.inputs #45

Merged
earl-warren merged 1 commit from viceice/fix-inputs into main 2024-08-22 14:10:57 +00:00 AGit
Owner
Currently the jobparser fails on `workflow_dispatch.inputs` - https://codeberg.org/forgejo/forgejo/issues/4789
viceice force-pushed viceice/fix-inputs from b87e8a5a09
All checks were successful
/ cascade (pull_request) Has been skipped
checks / check and test (pull_request) Successful in 7m12s
to 6a1630ba4c
All checks were successful
/ cascade (pull_request) Has been skipped
checks / check and test (pull_request) Successful in 26s
2024-08-22 12:58:56 +00:00
Compare
viceice force-pushed viceice/fix-inputs from 6a1630ba4c
All checks were successful
/ cascade (pull_request) Has been skipped
checks / check and test (pull_request) Successful in 26s
to 03fca1736d
All checks were successful
/ cascade (pull_request) Has been skipped
checks / check and test (pull_request) Successful in 14s
2024-08-22 13:01:17 +00:00
Compare
viceice force-pushed viceice/fix-inputs from 03fca1736d
All checks were successful
/ cascade (pull_request) Has been skipped
checks / check and test (pull_request) Successful in 14s
to be182ffdfa
All checks were successful
checks / check and test (pull_request) Successful in 15s
/ cascade (pull_request) Has been skipped
2024-08-22 13:02:09 +00:00
Compare
Ghost approved these changes 2024-08-22 13:02:22 +00:00
Ghost left a comment

LGTM.

Explicitly requested review.

LGTM. *Explicitly requested review.*
Member

I think this will break actions loaded via uses, as they're also using the input context in their action.yml to refer to the inputs suppied in with. Have you tested this?

~~I think this will break actions loaded via `uses`, as they're also using the `input` context in their `action.yml` to refer to the inputs suppied in `with`. Have you tested this?~~
Author
Owner

I think this will break actions loaded via uses, as they're also using the input context in their action.yml to refer to the inputs suppied in with. Have you tested this?

No, jobparser.ParseRawOn is only called once inside Forgejo and not used inside forgejo-runner.

codeberg.org/forgejo/forgejo@8322882265/modules/actions/workflows.go (L93)

> I think this will break actions loaded via `uses`, as they're also using the `input` context in their `action.yml` to refer to the inputs suppied in `with`. Have you tested this? No, `jobparser.ParseRawOn` is only called once inside Forgejo and not used inside forgejo-runner. https://codeberg.org/forgejo/forgejo/src/commit/8322882265c249daf9d8ff950ce2ece34296da9b/modules/actions/workflows.go#L93
Contributor
@Mai-Lapyst I tested that it fixes the bug at https://code.forgejo.org/forgejo/end-to-end/pulls/252#issuecomment-12240 I will run the other tests from https://code.forgejo.org/forgejo/end-to-end/actions locally too and see if any of them break. In particular: * https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-local-action/.forgejo/workflows/test.yml * https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-cache/.forgejo/workflows/test.yml Both of which have `uses:` with input (local & remote actions).
Contributor
> * https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-local-action/.forgejo/workflows/test.yml > * https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-cache/.forgejo/workflows/test.yml > > Both of which have `uses:` with input (local & remote actions). Both pass.
Member

My bad; I just misread https://codeberg.org/forgejo/forgejo/issues/4789 and thought it was about the variable expansion not working (${{ inputs.some_input }}). Didn't ever realized that forgejo actually had an error with event detection in the workflow files since they always just popped up in the UI just fine. My comment is therefore nonesense and the PR is good.

My bad; I just misread https://codeberg.org/forgejo/forgejo/issues/4789 and thought it was about the variable expansion not working (`${{ inputs.some_input }}`). Didn't ever realized that forgejo actually had an error with event detection in the workflow files since they always just popped up in the UI just fine. My comment is therefore nonesense and the PR is good.
Contributor

For the record, all tests were run with a runner also compiled with this version of act. There is no automated way / cascade flow that would allow for a semi-automated version of the same: it had to be done manually.

For the record, all tests were run with a runner also compiled with this version of act. There is no automated way / cascade flow that would allow for a semi-automated version of the same: it had to be done manually.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
4 participants
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
forgejo/act!45
No description provided.