Skip to content

Add a timeout option to the export command #1611

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

Merged
merged 2 commits into from
May 3, 2021

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Apr 29, 2021

📔 Description

When running automated VAST exports, we rarely want an infinite timeout. This adds vast export --timeout=<duration> and vast export --error-on-timeout options that allow for setting a timeout to the export command. If error-on-timeout is enabled, cancelled Cancelled exports due to a hit timeout result in a non-zero exit code.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

File-by-file. Test locally.

@dominiklohmann dominiklohmann added the feature New functionality label Apr 29, 2021
@dominiklohmann dominiklohmann requested a review from a team April 29, 2021 18:29
@dominiklohmann dominiklohmann force-pushed the story/ch24992/export-timeout branch from c64dcef to 26e6df8 Compare April 29, 2021 18:31
When running automated VAST exports, we rarely want an infinite timeout.
This adds `vast export --timeout=<duration>` and `vast export
--error-on-timeout` options that allow for setting a timeout to the
export command. If `error-on-timeout` is enabled, cancelled exports due
to a hit timeout result in a non-zero exit code.
@dominiklohmann dominiklohmann force-pushed the story/ch24992/export-timeout branch from 26e6df8 to fddf592 Compare April 29, 2021 18:41
Comment on lines 1 to 4
The new options `vast export --timeout=<duration>` and `vast export
--error-on-timeout` allow for setting a timeout for VAST queries. If
`error-on-timeout` is enabled, cancelled exports result in a non-zero
exit code.
Copy link
Member

Choose a reason for hiding this comment

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

If the timeout gets hit then the exit code should ALWAYS be non-zero. The option error-on-timeout makes no sense to me.

Otherwise the functionality seems to work and the code looks ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed it accordingly, and also fixed the symlink to vast.yaml.example from vast/integration/vast.yaml.example, which we seemed to have accidentally converted into a hard copy instead.

@dominiklohmann dominiklohmann requested a review from tobim May 3, 2021 10:43
@dominiklohmann dominiklohmann force-pushed the story/ch24992/export-timeout branch from 4659ee2 to b733b7d Compare May 3, 2021 11:43
Copy link
Member

@tobim tobim left a comment

Choose a reason for hiding this comment

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

Good feature!

@dominiklohmann dominiklohmann merged commit f371075 into master May 3, 2021
@dominiklohmann dominiklohmann deleted the story/ch24992/export-timeout branch May 3, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants