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

Set user-friendly BuildRun status when Pod gets evicted #858

Merged

Conversation

MayukhSobo
Copy link
Contributor

@MayukhSobo MayukhSobo commented Aug 27, 2021

Changes

When a BuildRun Pod gets evicted, then the status of the BuildRun is:

  status:
    buildSpec: [...]
    conditions:
    - lastTransitionTime: "2021-08-11T09:54:37Z"
      message: 'buildrun failed due to an unexpected error in pod disk-full-run-p5psw-kmx9f-pod-x7ng9:
        for detailed information: kubectl --namespace 9sj9w1nrbzt logs disk-full-run-p5psw-kmx9f-pod-x7ng9
        --all-containers'
      reason: Failed
      status: "False"
      type: Succeeded
    failedAt:
      pod: disk-full-run-p5psw-kmx9f-pod-x7ng9

This is mis-leading because an evicted pod has no logs that one can look at. The PR changes the BuildRun status to:

  status:
    buildSpec: [...]
    conditions:
    - lastTransitionTime: "2021-08-11T09:54:37Z"
      message: 'Container step-build-and-push exceeded its local ephemeral storage limit "1460M".'
      reason: PodEvicted
      status: "False"
      type: Succeeded
    failedAt:
      pod: disk-full-run-p5psw-kmx9f-pod-x7ng9

The message is coming from the Pod's status.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

Release Notes

The BuildRun status is improved when a BuildRun Pod gets evicted.

@openshift-ci openshift-ci bot added the release-note Label for when a PR has specified a release note label Aug 27, 2021
@MayukhSobo
Copy link
Contributor Author

/assign @SaschaSchwarze0

@qu1queee
Copy link
Contributor

@MayukhSobo some sanity checks are failing in this PR, also can you add pls the proper PR template, e.g. (release notes if needed, etc)

@SaschaSchwarze0 SaschaSchwarze0 changed the title Mayukh/pod eviction message Set user-friendly BuildRun status when Pod gets evicted Aug 30, 2021
@SaschaSchwarze0 SaschaSchwarze0 added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 30, 2021
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

@gabemontero
Copy link
Member

/approve

thanks!

aside from the verify failure (got a double import being flagged by make staticcheck) will defer lgtm to @SaschaSchwarze0 once he is happy with the doc update

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 30, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabemontero

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 30, 2021
docs/buildrun.md Outdated Show resolved Hide resolved
Opting for a better description.

Co-authored-by: Sascha Schwarze <schwarzs@de.ibm.com>
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2021
@openshift-merge-robot openshift-merge-robot merged commit a9916c9 into shipwright-io:main Sep 2, 2021
@adambkaplan adambkaplan added this to the release-v0.6.0 milestone Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants