Coder Social home page Coder Social logo

Comments (6)

j-boivie avatar j-boivie commented on June 22, 2024 1

@j-boivie I've just pushed the fix for this in release 0.4.4, can you let me know if all looks good on your side? 😁

All good here, thanks a lot for the fix! 🙇

from ecsgo.

tedsmitt avatar tedsmitt commented on June 22, 2024

Hey @j-boivie thanks for raising this! I'm currently on vacation so will look at this when I get back next week 😄 In the meantime could you provide some details to help troubleshoot such as:

  • Number of containers in the task
  • Container names
  • Container image details

Thanks again!

from ecsgo.

j-boivie avatar j-boivie commented on June 22, 2024

Hi,

Sorry for the late response, from my testing I've noticed that this happens on every task I connect to, no matter names, number of containers in the task etc. I've tested this across two different AWS accounts as well.

The only thing I can think of is that all of the ECS resources typically have hyphens in the name, and that they all run some variant of debian:-slim or python:-slim as base image.

Another thing I noticed is that the tool doesn't return a list of all services on the cluster, although I can see all tasks when selecting *. I'm only ever getting a list of 10 services, so I'm guessing that the reason is that this call here doesn't handle a paginated response from the ECS api:

ecsgo/internal/exec.go

Lines 123 to 126 in 95178ae

func (e *ExecCommand) getService() {
list, err := e.client.ListServices(&ecs.ListServicesInput{
Cluster: aws.String(e.cluster),
})

But I can raise another issue for that if needed.

from ecsgo.

tedsmitt avatar tedsmitt commented on June 22, 2024

@j-boivie No problem! Thanks for the additional info.

Based on the error message it looks like this is the offending line:

if strings.Contains(*e.task.PlatformFamily, "Windows") {

Would I be right in assuming these tasks are running on an EC2-backed ECS cluster? I suspect that the PlatformFamily value may only be available by default in Fargate tasks, and might have to manually be specified for tasks with EC2 launch type. I have just tested this and I can recreate the problem. I'm writing up a fix now.

RE: Pagination you're absolutely right, I've not implemented this yet embarrassingly, it has been on my todo for too long 😓 If you could raise a new issue for this that'd be great!

from ecsgo.

j-boivie avatar j-boivie commented on June 22, 2024

@j-boivie No problem! Thanks for the additional info.

Based on the error message it looks like this is the offending line:

if strings.Contains(*e.task.PlatformFamily, "Windows") {

Would I be right in assuming these tasks are running on an EC2-backed ECS cluster? I suspect that the PlatformFamily value may only be available by default in Fargate tasks, and might have to manually be specified for tasks with EC2 launch type. I have just tested this and I can recreate the problem. I'm writing up a fix now.

You're absolutely right, somehow I had forgotten that Fargate was a thing... 😅, but that seems reasonable.

RE: Pagination you're absolutely right, I've not implemented this yet embarrassingly, it has been on my todo for too long 😓 If you could raise a new issue for this that'd be great!

Roger that, will create a new issue 👍

from ecsgo.

tedsmitt avatar tedsmitt commented on June 22, 2024

@j-boivie I've just pushed the fix for this in release 0.4.4, can you let me know if all looks good on your side? 😁

from ecsgo.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.