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

Fix nil pointer access in AfterEach of failed e2e test cases #1720

Merged

Conversation

SaschaSchwarze0
Copy link
Member

Changes

Fixing the following panic in e2e AfterEach:

  [PANICKED] Test Panicked
  In [AfterEach] at: /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:261 @ 11/04/24 10:12:22.241

  runtime error: invalid memory address or nil pointer dereference

  Full Stack Trace
    github.com/shipwright-io/build/test/e2e/v1alpha1_test.GetBuildObject({0x23570d8?, 0xc000598410?}, {0x2367360?, 0xc0001573b0?}, 0xe31de5d?, 0xedeba9506?)
    	/home/runner/work/build/build/test/e2e/v1alpha1/common_test.go:258 +0x41
    github.com/shipwright-io/build/test/e2e/v1alpha1_test.retrieveBuildAndBuildRun(0xc00027e3f0, {0xc00005c1bf?, 0x0?}, {0xc000940960, 0xf})
    	/home/runner/work/build/build/test/e2e/v1alpha1/common_test.go:150 +0x11a
    github.com/shipwright-io/build/test/e2e/v1alpha1_test.printTestFailureDebugInfo(0xc00027e3f0, {0xc00005c1bf, 0x7}, {0xc000940960, 0xf})
    	/home/runner/work/build/build/test/e2e/v1alpha1/common_test.go:162 +0x8a
    github.com/shipwright-io/build/test/e2e/v1alpha1_test.init.func2.4()
    	/home/runner/work/build/build/test/e2e/v1alpha1/e2e_image_mutate_test.go:53 +0xd2

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

NONE

@SaschaSchwarze0 SaschaSchwarze0 added the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label Nov 4, 2024
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.14.0 milestone Nov 4, 2024
@openshift-ci openshift-ci bot added the release-note-none Label for when a PR does not need a release note label Nov 4, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 4, 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.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2024
Copy link
Contributor

openshift-ci bot commented Nov 4, 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 Nov 4, 2024
@SaschaSchwarze0
Copy link
Member Author

And the next one. I'll try to fix that one as well:

  [PANICKED] Test Panicked
  In [AfterEach] at: /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:261 @ 11/04/24 11:06:51.005

  runtime error: invalid memory address or nil pointer dereference

  Full Stack Trace
    github.com/shipwright-io/build/test/e2e/v1alpha1_test.printTestFailureDebugInfo(0xc00019e690, {0xc00005c1bf, 0x7}, {0xc000602a10, 0xf})
    	/home/runner/work/build/build/test/e2e/v1alpha1/common_test.go:168 +0x14b
    github.com/shipwright-io/build/test/e2e/v1alpha1_test.init.func2.4()
    	/home/runner/work/build/build/test/e2e/v1alpha1/e2e_image_mutate_test.go:53 +0xd2

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@pull-request-size pull-request-size bot removed the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 4, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 4, 2024
@SaschaSchwarze0 SaschaSchwarze0 changed the title Fix a nil pointer access Fix nil pointer access in AfterEach of failed e2e test cases Nov 4, 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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit ee4dca8 into shipwright-io:main Nov 4, 2024
19 checks passed
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/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants