tedsmitt / ecsgo

Provides an interactive prompt to connect to ECS Containers using the ECS ExecuteCommand API.
Apache License 2.0
81 stars 13 forks source link

List services operation not paginated #23

Closed j-boivie closed 1 year ago

j-boivie commented 1 year ago

👋

As mentioned in #21 I noticed that the output when fetching all services on a cluster isn't paginated here: https://github.com/tedsmitt/ecsgo/blob/95178ae50b5d102c5ffea4eb3f5723c6fad40353/internal/exec.go#L124-L125 This causes missing services in the output if you run more than 10 services on a single cluster.

I also looked a bit further in the code and noticed that the same seems to be true when fetching tasks, although if I read the documentation right the ListTasks call seems to return 100 tasks in a single page, so that might not be as much of an issue.

I'd be willing to submit a patch for this, but I can't really say when I'll have the time to do it right now 🙈

tedsmitt commented 1 year ago

Hey @j-boivie I've added this in https://github.com/tedsmitt/ecsgo/releases/tag/v0.4.5-beta.2 - can you check it out and feedback? Cheers

j-boivie-rs commented 1 year ago

@tedsmitt Hey sorry for not responding to this. I just tested it and it works as expected!