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

change from fixed to to append new line to slice #4239

Merged
merged 1 commit into from
Dec 16, 2022
Merged

change from fixed to to append new line to slice #4239

merged 1 commit into from
Dec 16, 2022

Conversation

bhpratt
Copy link
Contributor

@bhpratt bhpratt commented Dec 14, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Fixes issue with older worker pools that do not have os label applied and were hitting out of bounds error (because there were no host labels on the worker pool): panic: runtime error: makeslice: len out of range

Since we cannot know the number of labels, change is to start with a slice of size 0 and increase slice length as number of labels increases.

Output from acceptance testing:

make testacc TEST=./ibm/service/satellite TESTARGS='-run=TestAccSatelliteCluster_Basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/satellite -v -run=TestAccSatelliteCluster_Basic -timeout 700m
--- PASS: TestAccSatelliteCluster_Basic (4573.43s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/satellite       4574.894s

make testacc TEST=./ibm/service/satellite TESTARGS='-run=TestAccSatelliteClusterWorkerPool_Basic'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/satellite -v -run=TestAccSatelliteClusterWorkerPool_Basic -timeout 700m
--- PASS: TestAccSatelliteClusterWorkerPool_Basic (4886.39s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/satellite       4887.689s

I also tested this locally and hit no issues - though I do not have a worker pool w/no host labels to truly replicate the error scenario.

@bhpratt bhpratt marked this pull request as ready for review December 15, 2022 16:50
@hkantare hkantare merged commit 765c431 into IBM-Cloud:master Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants