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 Build to empty object because GetBuildObject will fill but not initialize it #1709

Merged

Conversation

SaschaSchwarze0
Copy link
Member

Changes

This fixes the following panic we see in AfterEach hooks of the e2e tests that actually prevent us to identify the root cause.

[PANICKED] Test Panicked
  In [AfterEach] at: /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:261 @ 10/30/24 14:53:26.63

  runtime error: invalid memory address or nil pointer dereference

  Full Stack Trace
    github.com/shipwright-io/build/pkg/reconciler/buildrun/resources.GetBuildObject({0x2358398?, 0xc00076aaa0?}, {0x2368620?, 0xc00076d5f0?}, 0xedeb43f66?, 0x0?)
    	/home/runner/work/build/build/pkg/reconciler/buildrun/resources/build.go:39 +0x28b
    github.com/shipwright-io/build/test/e2e/v1beta1_test.retrieveBuildAndBuildRun(0xc000102b60, {0xc00005c1d7?, 0x0?}, {0xc000429e75, 0xb})
    	/home/runner/work/build/build/test/e2e/v1beta1/common_test.go:147 +0x105

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

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

NONE

…itialize it

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@SaschaSchwarze0 SaschaSchwarze0 added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Oct 30, 2024
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.14.0 milestone Oct 30, 2024
@openshift-ci openshift-ci bot added the release-note-none Label for when a PR does not need a release note label Oct 30, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 30, 2024
@openshift-ci openshift-ci bot requested a review from qu1queee October 30, 2024 16:49
Copy link
Contributor

@qu1queee qu1queee 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 Oct 31, 2024
Copy link
Contributor

@HeavyWombat HeavyWombat left a comment

Choose a reason for hiding this comment

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

/approve

Copy link
Contributor

openshift-ci bot commented Oct 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HeavyWombat

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 Oct 31, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 868ee59 into shipwright-io:main Oct 31, 2024
20 checks passed
@SaschaSchwarze0 SaschaSchwarze0 deleted the sascha-fix-npe branch October 31, 2024 18:19
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Label for when a PR does not need a release note size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants