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

miss makezero in slice init #3600

Open
1 of 2 tasks
alingse opened this issue May 27, 2024 · 0 comments
Open
1 of 2 tasks

miss makezero in slice init #3600

alingse opened this issue May 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alingse
Copy link

alingse commented May 27, 2024

Checklist:

  • I've included steps to reproduce the bug.
  • I've included the version of argo rollouts.

Describe the bug

I was running github actions to run linter makezero for top github golang repos.

see issues alingse/go-linter-runner#1

and the github actions output https://github.com/alingse/go-linter-runner/actions/runs/9242996808/job/25426547885

====================================================================================================
append to slice `oneOf` with non-zero initialized length at https://github.com/argoproj/argo-rollouts/blob/master/pkg/apis/rollouts/validation/validation.go#L486:10
append to slice `oneOf` with non-zero initialized length at https://github.com/argoproj/argo-rollouts/blob/master/pkg/apis/rollouts/validation/validation.go#L487:10
append to slice `oneOf` with non-zero initialized length at https://github.com/argoproj/argo-rollouts/blob/master/pkg/apis/rollouts/validation/validation.go#L488:10
append to slice `oneOf` with non-zero initialized length at https://github.com/argoproj/argo-rollouts/blob/master/pkg/apis/rollouts/validation/validation.go#L48[9](https://github.com/alingse/go-linter-runner/actions/runs/9242996808/job/25426547885#step:4:10):10
====================================================================================================
	oneOf := make([]bool, 3)
	oneOf = append(oneOf, s.SetWeight != nil)
	oneOf = append(oneOf, s.Pause != nil)
	oneOf = append(oneOf, s.Experiment != nil)
	oneOf = append(oneOf, s.Analysis != nil)

shoud be

	oneOf := make([]bool, 0, 4)
	oneOf = append(oneOf, s.SetWeight != nil)
	oneOf = append(oneOf, s.Pause != nil)
	oneOf = append(oneOf, s.Experiment != nil)
	oneOf = append(oneOf, s.Analysis != nil)

To Reproduce

Expected behavior

Screenshots

Version

Logs

# Paste the logs from the rollout controller

# Logs for the entire controller:
kubectl logs -n argo-rollouts deployment/argo-rollouts

# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant