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

Remove list secret in controller ClusterRole #3449

Merged

Conversation

lekaf974
Copy link
Contributor

Fix issue #3446

Hi I saw this opened issue and tried to fix it with following PR

@volcano-sh-bot
Copy link
Contributor

Welcome @lekaf974!

It looks like this is your first PR to volcano-sh/volcano.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 30, 2024
@lekaf974
Copy link
Contributor Author

/assign @kevin-wangzefeng

@lekaf974 lekaf974 force-pushed the remove-list-secrets-to-controller branch from 2d035e3 to 6920f5c Compare May 7, 2024 00:13
@lekaf974 lekaf974 requested a review from Monokaix May 7, 2024 00:14
@Monokaix
Copy link
Member

Monokaix commented May 7, 2024

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2024
@Monokaix
Copy link
Member

Monokaix commented May 7, 2024

Hi, please execute make verify-generated-yaml and then execute command according the output instruction to make ci happy.

@lekaf974
Copy link
Contributor Author

lekaf974 commented May 8, 2024

Hi, please execute make verify-generated-yaml and then execute command according the output instruction to make ci happy.

Taking a look

@lekaf974
Copy link
Contributor Author

lekaf974 commented May 8, 2024

@Monokaix got this issue when I am trying to run the command provided

$ make TAG=latest generate-yaml
mkdir -p _output/bin
mkdir -p _output/release
#go mod vendor
# volcano crd base
/home/matthieu/go/bin/controller-gen "crd:crdVersions=v1,generateEmbeddedObjectMeta=true" paths="./vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1;./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/bus/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" output:crd:artifacts:config=config/crd/volcano/bases
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=0x9ed52f]

goroutine 55 [running]:
go/types.(*Checker).handleBailout(0xc000242400, 0xc0015c1d40)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:367 +0x88
panic({0xb9a3a0?, 0x1266ad0?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd85068, 0x126f300})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd85068?, 0x126f300?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xd8b4c0, 0x123b460}, 0xc000242400, 0x126f300, 0xc0015c14b0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc000242400, 0xc0015cc6c0, 0x126f300)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380}, {0xc64127, 0x14})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc000242400, 0xc0018c08a0, 0xc0015cc6c0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:126 +0x2c5
go/types.(*Checker).constDecl(0xc000242400, 0xc0018c08a0, {0xd87d70, 0xc000c06160}, {0xd87d70, 0xc000c06180}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:490 +0x311
go/types.(*Checker).objDecl(0xc000242400, {0xd90b40, 0xc0018c08a0}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000242400)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000242400, {0xc0005d9e90, 0x5, 0x5})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000232f30, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc00062cd50, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x64?)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:257 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 16
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:255 +0x1c5
make: *** [Makefile:107: manifests] Error 2

@Monokaix
Copy link
Member

Monokaix commented May 8, 2024

@Monokaix got this issue when I am trying to run the command provided

$ make TAG=latest generate-yaml
mkdir -p _output/bin
mkdir -p _output/release
#go mod vendor
# volcano crd base
/home/matthieu/go/bin/controller-gen "crd:crdVersions=v1,generateEmbeddedObjectMeta=true" paths="./vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1;./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/bus/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" output:crd:artifacts:config=config/crd/volcano/bases
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=0x9ed52f]

goroutine 55 [running]:
go/types.(*Checker).handleBailout(0xc000242400, 0xc0015c1d40)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:367 +0x88
panic({0xb9a3a0?, 0x1266ad0?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd85068, 0x126f300})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd85068?, 0x126f300?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xd8b4c0, 0x123b460}, 0xc000242400, 0x126f300, 0xc0015c14b0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc000242400, 0xc0015cc6c0, 0x126f300)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380}, {0xc64127, 0x14})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc000242400, 0xc0018c08a0, 0xc0015cc6c0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:126 +0x2c5
go/types.(*Checker).constDecl(0xc000242400, 0xc0018c08a0, {0xd87d70, 0xc000c06160}, {0xd87d70, 0xc000c06180}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:490 +0x311
go/types.(*Checker).objDecl(0xc000242400, {0xd90b40, 0xc0018c08a0}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000242400)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000242400, {0xc0005d9e90, 0x5, 0x5})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000232f30, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc00062cd50, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x64?)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:257 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 16
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:255 +0x1c5
make: *** [Makefile:107: manifests] Error 2

Please use go 1.20: )

@volcano-sh-bot volcano-sh-bot removed the lgtm Indicates that a PR is ready to be merged. label May 8, 2024
@lekaf974 lekaf974 force-pushed the remove-list-secrets-to-controller branch from 98969f0 to 437f3a6 Compare May 8, 2024 02:57
@lekaf974
Copy link
Contributor Author

lekaf974 commented May 8, 2024

@Monokaix it works, changes pushed

Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

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

/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label May 8, 2024
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

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

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 8, 2024
@volcano-sh-bot volcano-sh-bot merged commit 55963f7 into volcano-sh:master May 8, 2024
13 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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants