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.
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
ecs_service_info lists all services in all clusters when no cluster attribute is given #2058
base: main
Are you sure you want to change the base?
ecs_service_info lists all services in all clusters when no cluster attribute is given #2058
Changes from 9 commits
4de8ebd
eb16fcf
d381118
c1028cf
0d1ebee
253a097
eed692d
f63e625
049e728
456012c
2dc19a3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service name per cluster are unique. What will happen when more than one cluster contains the same service name?
Will the last service name overwrite the first service name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is an issue when the details flag is not added or set to false. This would return just the list of services with no attributes. Considering the scenario of 2 clusters, with the same HelloWorld service.
..would get you a list of 2 service ARNs
..would get you a single ARN
But giving service names (not service ARNs) with details: false in the current ecs_service_info returns you just the existing services. So in this scenario:
..would in the current module fail, or force you to add a cluster and return just [HelloWorld]. But what should be the response if you have the given HelloWorld scenario? [HelloWorld] is ambiguous right? But adding cluster info or returning a cluster:service dict would be a change that changes the module response compared to the current version.
I am not an experienced contributer. Do you have a suggestion how to proceed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah maybe I also misinterpreted the return value
cluster_services[cluster] = ...
So it's already grouped by cluster.
I think this is the only solution. That would also mean that it is a breaking change and the changes will release with 8.0.0 and not in 7.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I need some guidance in what would be good form for the output.
So (with details: false) the current output:
If I were to slide in the clusters I could add them as an extra level below services:
Or should this be more explicit (and renaming the root item) in the lines of:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any opinions @tremble @alinabuzachis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, current return value for
details: false
isusing
details: true
results inI guess we should keep this structure.
And once
cluster
name isomit
,details
should be automatically set totrue
This won't break any backwards compatiblity and won't return any ambiguous results in case a service name exist in more than one cluster.
What do you think @b0tting