fix: error out if there is no active service#5336
Merged
mergify[bot] merged 2 commits intoaws:mainlinefrom Sep 27, 2023
Merged
Conversation
KollaAdithya
approved these changes
Sep 27, 2023
|
🍕 Here are the new binary sizes!
|
1 similar comment
|
🍕 Here are the new binary sizes!
|
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## mainline #5336 +/- ##
=========================================
Coverage 69.80% 69.80%
=========================================
Files 296 296
Lines 44758 44761 +3
Branches 287 287
=========================================
+ Hits 31244 31247 +3
Misses 11996 11996
Partials 1518 1518
☔ View full report in Codecov by Sentry. |
huanjani
approved these changes
Sep 27, 2023
KollaAdithya
pushed a commit
to KollaAdithya/copilot-cli
that referenced
this pull request
Oct 18, 2023
Otherwise panic when accessing `activeSvc[0]`.
I think erroring out makes sense here, because this is basically the same scenario as when "resourceGroupAPI" returns nothing given the tags:
```go
services, err := c.rgGetter.GetResourcesByTags(serviceResourceType, tags)
if err != nil {
return nil, fmt.Errorf("get ECS service with tags %s: %w", tags.String(), err)
}
if len(services) == 0 {
return nil, fmt.Errorf("no ECS service found with tags %s", tags.String())
}
```
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Otherwise panic when accessing
activeSvc[0].I think erroring out makes sense here, because this is basically the same scenario as when "resourceGroupAPI" returns nothing given the tags:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.