Skip to content

Conversation

@chantra
Copy link
Contributor

@chantra chantra commented Sep 30, 2022

The quotes added in 08608da cause ephemeral to evaluate as false when DISABLE_AUTO_UPDATE was not set.

This is explained in details in #249. This diff changes the logic to use an array where extra parameters are being added.
When calling config.sh, the array is expanded.

Testing:
../self_hosted_runner.env contains

EPHEMERAL=true

Before: https://gist.github.com/chantra/443dfaa60d964d938bcb1c020781ca00 we can see multiple jobs got scheduled on the runner

After: https://gist.github.com/chantra/061dc471c63964c01a2e3733a53bd3ec we can see that when the job finished, the container shutdown.

After with DISABLE_AUTO_UPDATE set: https://gist.github.com/chantra/df0102c7340b8f6bfd458ec56d9fa29c

Also adding set -x before the call to config.sh revealed the arguments were correctly added.

Fixes #249

The quotes added in 08608da cause
`ephemeral` to evaluate as false when `DISABLE_AUTO_UPDATE` was not set.

This is explained in details in myoung34#249. This diff changes the logic to use
an array where extra parameters are being added.
When calling config.sh, the array is expanded.

Testing:
../self_hosted_runner.env contains
```
EPHEMERAL=true
```

Before: https://gist.github.com/chantra/443dfaa60d964d938bcb1c020781ca00
we can see multiple jobs got scheduled on the runner

After: https://gist.github.com/chantra/061dc471c63964c01a2e3733a53bd3ec
we can see that when the job finished, the container shutdown.

After with DISABLE_AUTO_UPDATE set: https://gist.github.com/chantra/df0102c7340b8f6bfd458ec56d9fa29c

Also adding `set -x` before the call to `config.sh` revealed the
arguments were correctly added.

Fixes myoung34#249
@myoung34 myoung34 merged commit 0f2883e into myoung34:master Oct 2, 2022
@myoung34
Copy link
Owner

myoung34 commented Oct 2, 2022

Thanks for the fix!

@chantra chantra deleted the fix_ephemeral branch October 2, 2022 14:20
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.

Ephemeral mode not working since 08608da938e5f565c4a9f38a793a2d29ad5db1bd

2 participants