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

use a CQL query to narrow down the EC2 instances returned by listContainerInstances when searching by instance ID #146

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

bpholt
Copy link
Member

@bpholt bpholt commented Dec 6, 2023

This should dramatically reduce the number of ListContainerInstances, DescribeContainerInstances, ListTasks, and DescribeTasks calls made by the Draining lambda.

…ainerInstances when searching by instance ID

this should dramatically reduce the number of ListContainerInstances,
DescribeContainerInstances, ListTasks, and DescribeTasks calls made by
the Draining lambda.
@bpholt bpholt self-assigned this Dec 6, 2023
@bpholt bpholt requested a review from a team as a code owner December 6, 2023 20:49
@@ -27,6 +27,9 @@ object TaskCount extends NewtypeWrapped[Long] {
given Order[TaskCount] = Order[Long].contramap(_.value)
}

type CQLQuery = CQLQuery.Type
object CQLQuery extends NewtypeWrapped[String]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we had more query types to support, it might be worth writing a simple parser or some other more elaborate representation, but I think this is good enough for now.

@bpholt bpholt merged commit 2523c49 into main Dec 6, 2023
4 checks passed
@bpholt bpholt deleted the cql branch December 6, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants