Skip to content

Conversation

@samloop
Copy link
Contributor

@samloop samloop commented May 28, 2025

Now that we have added optional owners to Taskrunner tasks, in the event a task fails in a Buildkite workflow, this will include the owner in the resulting annotation.

Example:
Above task has an owner, task below does not
Screenshot 2025-05-28 at 12 19 01 PM

Update to put owner below summary:
Uploading Screenshot 2025-05-28 at 2.03.51 PM.png…


for _, task := range failedTasks {
if task.Owner != "" {
fmt.Fprintf(&buf, "Owner: %s\n", task.Owner)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great. It would be so nice if we could include a link to the Slack ask channel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed - unsure if we want to keep adding attributes to these tasks with say, a link to reach the owner, or if we want to encourage teams to include their communication details in the owner string? hard to say since I think it's a bit unknown how others pulling in Taskrunner use it.

Copy link
Contributor

@dansamsara dansamsara left a comment

Choose a reason for hiding this comment

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

👍

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.

Makes sense — one comment below.

Comment on lines 184 to 188
if task.Owner != "" {
fmt.Fprintf(&buf, "Owner: %s\n", task.Owner)
}
fmt.Fprintf(&buf, "<details><summary><code>%s</code></summary>\n<pre>", task.Name)

Choose a reason for hiding this comment

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

minor: In the interest of hopefully making it a bit clearer what the "owner" actually owns, I'd suggest something like:

ownerMsg := ""
if task.Owner != "" {
  ownerMsg = " (task owner: " + task.Owner + ")"
}

fmt.Fprintf(&buf, "<details><summary><code>%s</code>%s</summary>\n<pre>", task.Name, ownerMsg)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Task owner makes sense! I'll update. Do you prefer the owner message below the code summary then?

Choose a reason for hiding this comment

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

I had thought to put it inside the summary, but come to think of it, maybe it does make more sense to put it below the summary, so that you see it when you expand? (Not sure.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I like it out of the summary just so it's easy to discern amongst the actual log output - but below makes sense, you should be able to see it both when the summary is expanded and not expanded. Will update!

@samloop samloop force-pushed the samloop/add-taskrunner-owners-to-annotations branch from 2d93fc2 to 0c4f703 Compare May 28, 2025 20:31
@coveralls
Copy link

coveralls commented May 28, 2025

Pull Request Test Coverage Report for Build 15310622079

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 54.181%

Totals Coverage Status
Change from base Build 14934857019: 0.0%
Covered Lines: 771
Relevant Lines: 1423

💛 - Coveralls

@samloop samloop force-pushed the samloop/add-taskrunner-owners-to-annotations branch from 0c4f703 to ba1bf47 Compare May 28, 2025 20:45
Now that we have added optional owners to Taskrunner tasks, in the event a task fails in a Buildkite workflow, this will include the owner in the resulting annotation.
@samloop samloop force-pushed the samloop/add-taskrunner-owners-to-annotations branch from ba1bf47 to a761df5 Compare May 28, 2025 21:07
@samloop samloop merged commit cef65c9 into master May 28, 2025
3 checks passed
@samloop samloop deleted the samloop/add-taskrunner-owners-to-annotations branch May 28, 2025 21:10
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.

5 participants