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

Remove use of pipefail, switch to use CustomExecution, add decoration for unset settings #85

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

SanjulaGanepola
Copy link
Owner

@SanjulaGanepola SanjulaGanepola commented Nov 26, 2024

Changes

  • "Cannot bind parameter 'Option'" When running workflow #78
    • Tested on Windows
  • Switch to use CustomExecution for VS Code task to avoid use of pipefail but still be able to retrieve execution output
  • Add decoration for settings which are not assigned a value but are selected. Supporting interactive user input for secrets and variables were causing issues where the child process was being terminated on input request. This PR removes support for interactive input in favour of using the UI (this can be reverted if the issue is addressed)

image

src/act.ts Outdated
command,
{
cwd: commandArgs.path,
shell: true,
Copy link
Owner Author

Choose a reason for hiding this comment

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

Note: This was added due to nodejs/node#7367 (comment)

@ChristopherHX
Copy link
Contributor

Hmm...

This error is new for me, the change with only removed images worked somehow

Got a try on macOS today, seems there is a new bug included here.

 *  Executing task: GitHub Local Actions: Help/test #6 

/Users/USER/Downloads/act_Darwin_arm64/act --workflows ".github/workflows/main.yml" --job "test" --secret-file "" --var-file "" --input-file "" --platform self-hosted=-self-hosted --eventpath ""

time="2024-11-26T20:25:04+01:00" level=fatal msg="$HOME is not defined"

Task exited with exit code 1.

 *  The terminal process failed to launch (exit code: 1). 

branching via process.env == 'win32' is the safest in short term

@ChristopherHX
Copy link
Contributor

I wonder if this stuff can be tested on CI?

the -P macos-latest=-self-hosted -P windows-latest=-self-hosted toggle don't require docker

Myself didn't go so far to test my vscode extensions, but something very useful.

src/act.ts Outdated
{
cwd: commandArgs.path,
shell: true,
env: settings.secrets
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe env: [...process.env, ...settings.secrets(the rest)]

So HOME is never undefined

Signed-off-by: Sanjula Ganepola <[email protected]>
Signed-off-by: Sanjula Ganepola <[email protected]>
@SanjulaGanepola
Copy link
Owner Author

I wonder if this stuff can be tested on CI?

the -P macos-latest=-self-hosted -P windows-latest=-self-hosted toggle don't require docker

Myself didn't go so far to test my vscode extensions, but something very useful.

Interesting idea. I have some ideas for vscode testing which I have done previously. We can have a look at setting up a test framework once these bugs are resolved.

@ChristopherHX Could you have another try with this PR? I have pushed some more updates and confirmed it worked on Windows and Linux. I am unable to test on MacOS.

@SanjulaGanepola SanjulaGanepola linked an issue Nov 27, 2024 that may be closed by this pull request
@SanjulaGanepola
Copy link
Owner Author

@ChristopherHX PR #70 in fact actually builds on top of this one to address some other issues as well so it might be easier to just test with that branch.

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

pr #70 works fine so far

@SanjulaGanepola SanjulaGanepola merged commit 1c1925d into main Nov 27, 2024
1 check passed
@SanjulaGanepola SanjulaGanepola deleted the fix/build-output-retrieval branch November 27, 2024 23:14
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.

"Cannot bind parameter 'Option'" When running workflow
2 participants