security-profiles-operator
security-profiles-operator copied to clipboard
BUG 2082099: Fix finalizer string too long
Shorten the finalizer string if it is over the limit
/kind bug
This PR shortens the node name in the finalizer string if it is too long.
Fixes: BZ 2082099
Hi @Vincent056. Thanks for your PR.
I'm waiting for a kubernetes-sigs 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.
/ok-to-test
Thank you for the fix @Vincent056!
An e2e test would also be nice.
internal/pkg/nodestatus/nodestatus_test.go:23: File is not `gci`-ed with --skip-generated -s standard,default,prefix(sigs.k8s.io/security-profiles-operator) (gci)
"github.com/stretchr/testify/require"
So far I've had the best results with fixing the gci issues by running gci manually, something like:
go install github.com/daixiang0/gci@latest
gci write path/to/file
There is also the -l
option that allows you to specify "local" imports that should be sorted last, but I could never get the flag combination to work, so I sort them manually. Normally the SPO expects the imports to be sorted:
- stdlib, alphabetically
- third party, alphabetically
- local, alphabetically
internal/pkg/nodestatus/nodestatus_test.go:60: File is not `gofumpt`-ed (gofumpt)
/build/golangci-lint run --fix --build-tags no_bpf
should do the trick
Don't forget to remove and reinstall golangci-lint if you have an old version locally.
@jhrozek It seems like t.Parallel called after t.Setenv; cannot set environment variables in parallel tests [recovered]
, and not setting parallel is causing verify to fail
@jhrozek It seems like
t.Parallel called after t.Setenv; cannot set environment variables in parallel tests [recovered]
, and not setting parallel is causing verify to fail
Can you try adding //nolint:paralleltest
with the explanation you used to suppress the warning? There are some other uses of this stanza in SPO, you can git grep for its usage to see exactly where and how it's used.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jhrozek, Vincent056
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [jhrozek]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment