test-infra icon indicating copy to clipboard operation
test-infra copied to clipboard

Support reporting information from jobs to GitHub comments and annotations

Open howardjohn opened this issue 4 years ago • 42 comments

What would you like to be added:

I would like a job to be able to trigger comments to the associated PR. I would imagine this would be similar to the lenses, where we would output some github-comments.md file and it would trigger the comments when the job completes.

Why is this needed:

The main case is warning/information messages about a job. For example, we currently have an optional job that just fails immediately and logs something like "WARNING: this will push to production in postsubmit". However, making a job fail is not great, especially if its a less severe warning. For example, we could report the difference in coverage, difference in benchmark times, whether the external API changed or not, etc.

cc @clarketm

howardjohn avatar Apr 01 '20 15:04 howardjohn

@Katharine

Could you provide an estimate of how much effort this would take? And if lenses are the preferred way to implement this?

clarketm avatar Apr 01 '20 17:04 clarketm

Forgot to mention, an alternative would be to have the job itself add the comment, but then the job becomes fairly complicated and requires priviledges

howardjohn avatar Apr 01 '20 17:04 howardjohn

we have jobs that comment with wholly-unprivileged secondary account(s) (@fejta-bot)

BenTheElder avatar May 21 '20 22:05 BenTheElder

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Aug 19 '20 22:08 fejta-bot

This feature would be awesome to have.

brian-avery avatar Sep 01 '20 16:09 brian-avery

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot avatar Oct 01 '20 16:10 fejta-bot

/remove-lifecycle rotten

brian-avery avatar Oct 01 '20 17:10 brian-avery

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Dec 30 '20 17:12 fejta-bot

/remove-lifecycle stale

brian-avery avatar Jan 04 '21 15:01 brian-avery

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot avatar Apr 04 '21 16:04 fejta-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten

fejta-bot avatar May 04 '21 17:05 fejta-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community. /close

fejta-bot avatar Jun 03 '21 18:06 fejta-bot

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jun 03 '21 18:06 k8s-ci-robot

/reopen

brian-avery avatar Jun 03 '21 18:06 brian-avery

@brian-avery: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jun 03 '21 18:06 k8s-ci-robot

/sig testing /remove-lifecycle rotten /reopen

This feature would be awesome to have.

Agreed, but we lack contributor bandwidth to do so. Are you interested in working on this @brian-avery?

spiffxp avatar Aug 11 '21 16:08 spiffxp

@spiffxp: Reopened this issue.

In response to this:

/sig testing /remove-lifecycle rotten /reopen

This feature would be awesome to have.

Agreed, but we lack contributor bandwidth to do so. Are you interested in working on this @brian-avery?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Aug 11 '21 16:08 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Nov 09 '21 16:11 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Dec 09 '21 17:12 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Jan 08 '22 17:01 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jan 08 '22 17:01 k8s-ci-robot

/reopen

pohly avatar May 17 '22 13:05 pohly

@pohly: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 17 '22 13:05 k8s-ci-robot

A related problem is publishing annotations. golangci-lint can produce output files in "github-actions" format:

running golangci-lint for /home/prow/go/src/k8s.io/kubernetes/hack/tools
::error file=hack/tools/e2echeck/plugin/plugin.go,line=35,col=5::`AnalyzerPlugin` is unused (deadcode)
running golangci-lint for /home/prow/go/src/k8s.io/kubernetes/staging/src/k8s.io/api
...

The special :: lines are annotations for code in the PR.

pohly avatar May 17 '22 13:05 pohly

/cc @rajaskakodkar

pohly avatar May 19 '22 08:05 pohly

@rajaskakodkar : did you have a chance to look into implementing this?

To recap the discussion that you, @aojea and I had at KubeCon: the best approach seems to be to let Prow jobs produce artifact files with a certain naming scheme. Then the code that reports back to GitHub needs to check the gcp bucket of a finished job for such files, load them, and publish comments and annotations.

pohly avatar Jun 14 '22 16:06 pohly

@pohly I haven't gotten time to implement this but this is on my todo list and I should be able to get to this by next week. I'll post my updates here or raise a PR.

rajaskakodkar avatar Jun 15 '22 04:06 rajaskakodkar

Apologies for late response. I have not made a lot of progress on this in these days but I am hoping to move faster on this and I am also open to work with anyone else who is also interested in this.

rajaskakodkar avatar Jul 08 '22 11:07 rajaskakodkar

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Aug 07 '22 12:08 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Aug 07 '22 12:08 k8s-ci-robot