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 local build for operator #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

subh007
Copy link
Contributor

@subh007 subh007 commented Mar 1, 2024

Fix local build by avoiding step for header generation.

Fix local build by avoiding step for header generation.

Signed-off-by: subhash kumar singh <subh.singh@samsung.com>
Copy link
Contributor

nephio-prow bot commented Mar 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign s3wong for approval by writing /assign @s3wong in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

nephio-prow bot commented Mar 1, 2024

Hi @subh007. Thanks for your PR.

I'm waiting for a nephio-project member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@subh007
Copy link
Contributor Author

subh007 commented Mar 8, 2024

/assign @s3wong

@tliron
Copy link
Contributor

tliron commented Mar 11, 2024

  1. Why are we removing this action?
  2. Commenting out the action seems incorrect to me. Perhaps other dependencies on this make action should be removed, and then if people want to run it manually they still can (make generate).

@subh007
Copy link
Contributor Author

subh007 commented Mar 11, 2024

current build is failing with:

$ make build
...
...
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa096de]

goroutine 138 [running]:
go/types.(*Checker).handleBailout(0xc000bdb800, 0xc000a97d40)
        /usr/local/go/src/go/types/check.go:367 +0x88
panic({0xbc4180?, 0x12acc20?})
        /usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xdbcfd8, 0x12b5380})
        /usr/local/go/src/go/types/sizes.go:228 +0x31e
go/types.(*Config).sizeof(...)
        /usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xdbcfd8?, 0x12b5380?})
        /usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdc3350, 0x12814e8}, 0xc000bdb800, 0x12b5380, 0xc000a974b0)
        /usr/local/go/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc000bdb800, 0xc001b57f00, 0x12b5380)
        /usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc000bdb800, 0xc001b57f00, {0xdbd000, 0xc0000defc0})
        /usr/local/go/src/go/types/expr.go:375 +0x30d
go/types.(*Checker).assignment(0xc000bdb800, 0xc001b57f00, {0xdbd000, 0xc0000defc0}, {0xc91417, 0x14})
        /usr/local/go/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc000bdb800, 0xc001e93da0, 0xc001b57f00)
        /usr/local/go/src/go/types/assignments.go:126 +0x336
go/types.(*Checker).constDecl(0xc000bdb800, 0xc001e93da0, {0xdbfc48, 0xc001db3a40}, {0xdc1178, 0xc001d2f4d0}, 0x0)
        /usr/local/go/src/go/types/decl.go:490 +0x348
go/types.(*Checker).objDecl(0xc000bdb800, {0xdc8a38, 0xc001e93da0}, 0x0)
        /usr/local/go/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000bdb800)
        /usr/local/go/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000bdb800, {0xc0014f83a0, 0x1, 0x1})
        /usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
        /usr/local/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc0003590b0, 0xc0001dda40)
        /home/subh/go/pkg/mod/sigs.k8s.io/controller-tools@v0.11.4/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0001dda40)
        /home/subh/go/pkg/mod/sigs.k8s.io/controller-tools@v0.11.4/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc000273e60, 0xc0001dda40)
        /home/subh/go/pkg/mod/sigs.k8s.io/controller-tools@v0.11.4/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x0?)
        /home/subh/go/pkg/mod/sigs.k8s.io/controller-tools@v0.11.4/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 77
        /home/subh/go/pkg/mod/sigs.k8s.io/controller-tools@v0.11.4/pkg/loader/refs.go:260 +0x1c5
make: *** [Makefile:80: generate] Error 2

please feel free to suggest fix for it.

@s3wong
Copy link
Collaborator

s3wong commented Mar 11, 2024

@subh007 I have seen this problem before --- usually it happens when controller-runtime and a particular golang version does not agree... have you tried the latest versions?

We really can't just remove that make generate part --- it is used to generate all the Copy related methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants