Skip to content

Conversation

@samloop
Copy link
Contributor

@samloop samloop commented Mar 21, 2025

This clarifies some error messages, and provides the stack trace when taskrunner fails on execution.

@samloop samloop force-pushed the samloop/improve-runner-logging branch 7 times, most recently from b065b75 to 36f78c9 Compare April 1, 2025 15:03
@coveralls
Copy link

coveralls commented Apr 1, 2025

Pull Request Test Coverage Report for Build 14782896141

Details

  • 7 of 12 (58.33%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.7%) to 54.181%

Changes Missing Coverage Covered Lines Changed/Added Lines %
executor.go 5 6 83.33%
runner.go 1 5 20.0%
Totals Coverage Status
Change from base Build 14139588666: 2.7%
Covered Lines: 771
Relevant Lines: 1423

💛 - Coveralls

@samloop samloop force-pushed the samloop/improve-runner-logging branch 3 times, most recently from b1368ed to 0f7c283 Compare April 1, 2025 15:32
Copy link

@ran-arigur ran-arigur left a comment

Choose a reason for hiding this comment

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

Thanks, Sam!

e.runPass()
if err != nil && ctx.Err() != context.Canceled {
return err
return oops.Wrapf(err, "Executor failed to run task")

Choose a reason for hiding this comment

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

Can we try this out, and see what it looks like now when a task fails — preferably both in TUI mode and in non-TUI mode — just in case it turns out to be weird/bad/confusing in some way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tested this - this error will only show up in the non UI version of Taskrunner

github.com/samsarahq/taskrunner.(*Executor).runPass.(*Executor).runPass.func1.func2: Executor failed to run task "tr-error-test"
        github.com/taskrunner/executor.go:648
golang.org/x/sync/errgroup.(*Group).Go.func1
        /home/ubuntu/co/backend/go/pkg/mod/golang.org/x/sync@v0.0.0-20200317015054-43a5402ce75a/errgroup/errgroup.go:57

github.com/samsarahq/taskrunner.Run.func4: running executor

This clarifies some error messages, and provides the stack trace when taskrunner fails on execution.
@samloop samloop force-pushed the samloop/improve-runner-logging branch from 0f7c283 to 4754024 Compare May 1, 2025 20:25
@samloop samloop requested a review from ran-arigur May 8, 2025 18:15
Copy link

@ran-arigur ran-arigur 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 to me! 🍋

@samloop samloop merged commit 0b2ebd3 into master May 9, 2025
3 checks passed
@samloop samloop deleted the samloop/improve-runner-logging branch May 9, 2025 18:00
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.

4 participants