Skip to content

Commit d156e34

Browse files
committed
chore: migrate MaxConcurrency to ContainerScalingOption.ConcurrentRequestsThreshold
1 parent 6f6860e commit d156e34

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ linters:
8282
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false]
8383
- dupl # Tool for code clone detection [fast: true, auto-fix: false]
8484
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. [fast: false, auto-fix: false]
85-
- execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds [fast: false, auto-fix: false]
8685
- exhaustive # check exhaustiveness of enum switch statements [fast: false, auto-fix: false]
8786
- forcetypeassert # finds forced type assertions [fast: true, auto-fix: false]
8887
- funlen # Tool for detection of long functions [fast: true, auto-fix: false]
@@ -92,7 +91,6 @@ linters:
9291
- godot # Check if comments end in a period [fast: true, auto-fix: true]
9392
- godox # Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false]
9493
- err113 # Golang linter to check the errors handling expressions [fast: false, auto-fix: false]
95-
- gomnd # An analyzer to detect magic numbers. [fast: true, auto-fix: false]
9694
- lll # Reports long lines [fast: true, auto-fix: false]
9795
- maintidx # maintidx measures the maintainability index of each function. [fast: true, auto-fix: false]
9896
- nestif # Reports deeply nested if statements [fast: true, auto-fix: false]

internal/services/container/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func ResourceContainerUpdate(ctx context.Context, d *schema.ResourceData, m inte
352352
}
353353

354354
if d.HasChanges("max_concurrency") {
355-
req.MaxConcurrency = scw.Uint32Ptr(uint32(d.Get("max_concurrency").(int)))
355+
req.ScalingOption.ConcurrentRequestsThreshold = scw.Uint32Ptr(uint32(d.Get("max_concurrency").(int)))
356356
}
357357

358358
if d.HasChanges("protocol") {

internal/services/container/helpers_container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func setCreateContainerRequest(d *schema.ResourceData, region scw.Region) (*cont
108108
}
109109

110110
if maxConcurrency, ok := d.GetOk("max_concurrency"); ok {
111-
req.MaxConcurrency = scw.Uint32Ptr(uint32(maxConcurrency.(int)))
111+
req.ScalingOption.ConcurrentRequestsThreshold = scw.Uint32Ptr(uint32(maxConcurrency.(int)))
112112
}
113113

114114
if sandbox, ok := d.GetOk("sandbox"); ok {

0 commit comments

Comments
 (0)