ssh-agent icon indicating copy to clipboard operation
ssh-agent copied to clipboard

fix: Add Cmd Default/Input support to cleanup

Open tkalus opened this issue 2 years ago • 13 comments

Bring post action step into consistency with main for changes introduced in #154.

Without this change, sshAgentCmd is undefined when passed to execFileSync() during cleanup and post is never successful.

Post job cleanup consistently showing:

Stopping SSH agent
The "file" argument must be of type string. Received undefined
Error stopping the SSH agent, proceeding anyway

Also add entries to the CHANGELOG, detailing v0.8.0 and v0.9.0 releases.

Fixes: #208 Fixes: #211

tkalus avatar May 23 '23 06:05 tkalus

Makes sense!

Could you please update dist/cleanup.js as well by running npm run build?

Thanks for the gentle reminder @mpdude.

Updated via docker using:

$ docker run \
  --interactive \
  --rm \
  --tty \
  --volume ${PWD}:/var/task \
  --workdir /var/task \
  node:16-buster \
  sh -c 'yarn install && npm run build'

Please advise if the update looks incorrect or if you'd like me to use a different version of node or run a modified command.

tkalus avatar May 23 '23 18:05 tkalus

@mpdude Is there anything else blocking this?

tkalus avatar Jun 01 '23 14:06 tkalus

I'd love to see this PR released. I've got self-hosted runners with tons of ssh-agent processes hanging around.

This fixes it nicely.

sdt avatar Aug 16 '23 05:08 sdt

Gentle bump on this PR being merged. This would really help with the cleanup of the ssh-agent processes running in the context of non-containerised environments!

thazhemadam avatar Feb 15 '24 06:02 thazhemadam

@mpdude, I've rebased my branch from upstream and re-run/updated the dist/ folder.

$ docker run \
    --interactive \
    --rm \
    --tty \
    --volume ${PWD}:/var/task \
    --workdir /var/task \
    node:20-buster \
    sh -c 'npm install -g [email protected] && yarn install && NODE_OPTIONS=--openssl-legacy-provider npm run build'

Like others above, I'd love to get this into a release.

tkalus avatar Mar 04 '24 19:03 tkalus

Also would love to see this one in for our self hosted runners.

sambanks avatar Mar 18 '24 00:03 sambanks

Hi guys, I would love to see this one merged also :pray: :pray:

edelanghe-ledger avatar May 15 '24 09:05 edelanghe-ledger

pls merge this pr @mpdude

bvnp43 avatar May 21 '24 12:05 bvnp43

Have this warning in Post Loads private SSH key as well on Github hosted runners. If this PR fixes it, would love to see it merged

Stopping SSH agent
The "file" argument must be of type string. Received undefined
Error stopping the SSH agent, proceeding anyway

jeromecoupe avatar Jun 14 '24 09:06 jeromecoupe

y u no merge dis? 😄

bobanj avatar Jul 10 '24 16:07 bobanj

🙏 please merge this PR

bpedman avatar Aug 02 '24 17:08 bpedman