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

add exec --command-timeout #275

Merged
merged 6 commits into from
Sep 25, 2023
Merged

add exec --command-timeout #275

merged 6 commits into from
Sep 25, 2023

Conversation

tobert
Copy link
Collaborator

@tobert tobert commented Sep 22, 2023

Adds otel-cli exec --comand-timeout 1s sleep 2 functionality so that the command timeout is separate from the global/OTel timeout.

Addresses #55

Code seems to work now. Needs tests before merging.

Also includes a go mod tidy that was necessary after renovate PRs that seem to always leave some goop.

Amy Tobey added 6 commits September 22, 2023 13:44
global exec help was outdated from before we moved away from 'sh -c'

--command-timeout still had copypasta from --timeout that was wrong
This commit will fail because the span deadline fails because it's based
on otel-cli's start time. Will fix in next commit.
Removes config.StartupTime, which used to be used to compute all the
deadlines. With this change, that variable goes away and sites use
time.Now() instead. Also, the last remaining automatic deadline is in
the retry() function. This should get removed eventually but a stub is
in place to keep things working for now.
I switched these in some recent PR and that was the wrong decision since
test methods aren't allowed in goroutines.
@tobert tobert merged commit a0f460f into main Sep 25, 2023
1 check passed
@tobert tobert deleted the exec-timeout-errors branch September 25, 2023 16:59
@zerok
Copy link

zerok commented Oct 24, 2023

Thank you for this! 😄 Sorry, only now got around trying it.

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.

2 participants