-
Notifications
You must be signed in to change notification settings - Fork 122
Force timeout during connection #135
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,10 @@ inputs: | |
| description: 'Optional state directory to use (if unset, memory state is used)' | ||
| required: false | ||
| default: '' | ||
| timeout: | ||
| description: 'Timeout for `tailscale up`' | ||
| required: false | ||
| default: '2m' | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
|
|
@@ -115,9 +119,10 @@ runs: | |
| - name: Connect to Tailscale | ||
| shell: bash | ||
| env: | ||
| TAILSCALE_AUTHKEY: ${{ inputs.authkey }} | ||
| ADDITIONAL_ARGS: ${{ inputs.args }} | ||
| HOSTNAME: ${{ inputs.hostname }} | ||
| TAILSCALE_AUTHKEY: ${{ inputs.authkey }} | ||
| TIMEOUT: ${{ inputs.timeout }} | ||
| TS_EXPERIMENT_OAUTH_AUTHKEY: true | ||
| run: | | ||
| if [ -z "${HOSTNAME}" ]; then | ||
|
|
@@ -127,4 +132,4 @@ runs: | |
| TAILSCALE_AUTHKEY="${{ inputs['oauth-secret'] }}?preauthorized=true&ephemeral=true" | ||
| TAGS_ARG="--advertise-tags=${{ inputs.tags }}" | ||
| fi | ||
| timeout 5m sudo -E tailscale up ${TAGS_ARG} --authkey=${TAILSCALE_AUTHKEY} --hostname=${HOSTNAME} --accept-routes ${ADDITIONAL_ARGS} | ||
| timeout --verbose --kill-after=1s ${TIMEOUT} sudo -E tailscale up ${TAGS_ARG} --authkey=${TAILSCALE_AUTHKEY} --hostname=${HOSTNAME} --accept-routes ${ADDITIONAL_ARGS} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ooh, nice. I hadn't used
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, the timeout isnt working at all. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not expand the API surface of the action if we really don't need to. Users can already set the timeout on either the entire job or the step, so I'm not sure that having a configurable timeout is necessary here also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I just noticed that the original issue this was fixing was specifically to add a configurable timeout. I'm still curious if the step timeout does not also accomplish the same thing?