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

baur run: exit gracefully on errors, finish started task-runs, upload and db recording operations #335

Closed
wants to merge 7 commits into from

Conversation

fho
Copy link
Collaborator

@fho fho commented Jun 28, 2021

      run: exit gracefully when an error happens

        When an error happened during "baur run" execution, the command terminated
        immediately.
        It did not wait for successful executed task to finish uploading their artifacts
        and recording the result in the database.
        This means results are lost and tasks have to be rerun unnecessarily in these
        cases.

        The command is changed to skip all queued task executions and wait for all
        uploads and db record operations to finish when an error happens instead.
        Task executions that are already running when an error happens finish and are
        not canceled

        When a task run is skipped because another operation failed, it is printed with
        a "skipped" status to the console.

-------------------------------------------------------------------------------
        command: move utility functions to print errors to streams package

        Move the implementation to print errors from the command/helpers.go file to the
        streams package.
        It fits perfectly there.

Move the implementation to print errors from the command/helpers.go file to the
streams package.
It fits perfectly there.
@fho fho linked an issue Jun 28, 2021 that may be closed by this pull request
@fho fho self-assigned this Jun 28, 2021
@fho fho added the enhancement New feature or request label Jun 28, 2021
When an error happened during "baur run" execution, the command terminated
immediately.
It did not wait for successful executed task to finish uploading their artifacts
and recording the result in the database.
This means results are lost and tasks have to be rerun unnecessarily in these
cases.

The command is changed to skip all queued task executions and wait for all
uploads and db record operations to finish when an error happens instead.
Task executions that are already running when an error happens finish and are
not canceled

When a task run is skipped because another operation failed, it is printed with
a "skipped" status to the console.
@fho fho marked this pull request as ready for review June 28, 2021 10:04
@fho fho requested a review from FranciscoKurpiel June 28, 2021 10:04
Copy link

@FranciscoKurpiel FranciscoKurpiel left a comment

Choose a reason for hiding this comment

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

Looks good. I have mostly suggestions, except by one apparently missing return statement.

internal/command/run.go Outdated Show resolved Hide resolved
internal/command/run.go Outdated Show resolved Hide resolved
internal/command/run.go Show resolved Hide resolved
internal/command/run.go Outdated Show resolved Hide resolved
fho added 3 commits June 28, 2021 17:11
The previous function name sounded like it would return false if no ouputs were
defined and no outputs existed after the task run.
This is not the case.

The new name should it make it more clear that the function returns false if the
outputs do not exist as declared in the configuration of the task.
@fho
Copy link
Collaborator Author

fho commented Jun 29, 2021

merged manually

@fho fho closed this Jun 29, 2021
@fho fho deleted the pr310 branch June 29, 2021 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

run: exit gracefully on errors
2 participants