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

Add support for ECS Clusters #28

Merged
merged 8 commits into from Nov 27, 2023
Merged

Add support for ECS Clusters #28

merged 8 commits into from Nov 27, 2023

Conversation

flavioelawi
Copy link
Contributor

@flavioelawi flavioelawi commented Oct 28, 2023

This PR introduces basic support for listing ECS Clusters

#22

@flavioelawi
Copy link
Contributor Author

This PR lacks unit tests

@RamanaReddy0M RamanaReddy0M linked an issue Nov 3, 2023 that may be closed by this pull request
@RamanaReddy0M RamanaReddy0M added the enhancement New feature or request label Nov 3, 2023
Add ecs-service screen
@flavioelawi
Copy link
Contributor Author

thanks for the help on this PR!
anything you need from me for this iteration?

@RamanaReddy0M
Copy link
Collaborator

@flavioelawi can you test the flow(clusters -> services -> tasks -> containers) and confirm it as working expected?

@flavioelawi
Copy link
Contributor Author

I can get to the task view, pressing Enter causes an exception

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x1057d7fa0]

@RamanaReddy0M
Copy link
Collaborator

RamanaReddy0M commented Nov 23, 2023

@flavioelawi can you include full logs?

@flavioelawi
Copy link
Contributor Author

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x1010e7fa0]

goroutine 1 [running]:
github.com/derailed/tview.(*Application).Run.func1()
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/application.go:243 +0x4c
panic({0x101daf5a0?, 0x102adef50?})
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/panic.go:914 +0x218
github.com/one2nc/cloudlens/internal/render.EcsContainers.Render({}, {0x101f428c0?, 0x140009a68c0?}, {0x0?, 0x30a8?}, 0x140006a6100)
        /Users/flavioelawi/workspaces/cloudlens/internal/render/ecs_container.go:41 +0x240
github.com/one2nc/cloudlens/internal/model.hydrate({0x0, 0x0}, {0x14000e66a50?, 0x3, 0x14000e921c0?}, {0x140006a6100, 0x3, 0x10060fc8c?}, {0x101f9b430, 0x102b51b40})
        /Users/flavioelawi/workspaces/cloudlens/internal/model/table.go:218 +0xb8
github.com/one2nc/cloudlens/internal/model.(*Table).reconcile(0x14000dddc20, {0x101fa6d28, 0x14000691dd0})
        /Users/flavioelawi/workspaces/cloudlens/internal/model/table.go:163 +0x104
github.com/one2nc/cloudlens/internal/model.(*Table).refresh(0x14000e83578?, {0x101fa6d28?, 0x14000691dd0?})
        /Users/flavioelawi/workspaces/cloudlens/internal/model/table.go:137 +0x28
github.com/one2nc/cloudlens/internal/model.(*Table).Refresh(0x14000691da0?, {0x101fa6d28?, 0x14000691dd0?})
        /Users/flavioelawi/workspaces/cloudlens/internal/model/table.go:99 +0x24
github.com/one2nc/cloudlens/internal/view.(*Browser).Start(0x14000691da0)
        /Users/flavioelawi/workspaces/cloudlens/internal/view/browser.go:60 +0x68
github.com/one2nc/cloudlens/internal/view.(*PageStack).StackPushed(0x14000a82da0, {0x12be81b80, 0x140007ce0e0})
        /Users/flavioelawi/workspaces/cloudlens/internal/view/page_stack.go:36 +0x30
github.com/one2nc/cloudlens/internal/model.(*Stack).notify(0x14000a865f0, 0x1, {0x12be81b80, 0x140007ce0e0})
        /Users/flavioelawi/workspaces/cloudlens/internal/model/stack.go:173 +0x104
github.com/one2nc/cloudlens/internal/model.(*Stack).Push(0x14000a865f0, {0x12be81b80?, 0x140007ce0e0})
        /Users/flavioelawi/workspaces/cloudlens/internal/model/stack.go:99 +0x14c
github.com/one2nc/cloudlens/internal/view.(*App).inject(0x14000a89860, {0x12be81b80, 0x140007ce0e0})
        /Users/flavioelawi/workspaces/cloudlens/internal/view/app.go:456 +0x104
github.com/one2nc/cloudlens/internal/view.(*EcsTask).enterCmd(0x140007ceb40, 0x14000e83896?)
        /Users/flavioelawi/workspaces/cloudlens/internal/view/ecs_task.go:49 +0x1bc
github.com/one2nc/cloudlens/internal/view.(*Table).keyboard(0x18?, 0x140007ce0c0)
        /Users/flavioelawi/workspaces/cloudlens/internal/view/table.go:81 +0xb4
github.com/one2nc/cloudlens/internal/view.(*Browser).InputHandler.(*Table).InputHandler.(*Box).WrapInputHandler.func2(0x14000e83928?, 0x101181f90?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/box.go:179 +0x3c
github.com/one2nc/cloudlens/internal/view.(*PageStack).InputHandler.(*Pages).InputHandler.func1(0x129d29118?, 0x140006910b0?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/pages.go:332 +0xa8
github.com/one2nc/cloudlens/internal/view.(*PageStack).InputHandler.(*Pages).InputHandler.(*Box).WrapInputHandler.func2(0x14000e839a8?, 0x100b58c60?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/derailed/tview.(*Flex).InputHandler.func1(0x14000e83a38?, 0x4?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/flex.go:261 +0xd0
github.com/derailed/tview.(*Flex).InputHandler.(*Box).WrapInputHandler.func2(0x140006911d0?, 0x544c?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/one2nc/cloudlens/internal/ui.(*Pages).InputHandler.(*Pages).InputHandler.func1(0x10?, 0x101e19720?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/pages.go:332 +0xa8
github.com/one2nc/cloudlens/internal/ui.(*Pages).InputHandler.(*Pages).InputHandler.(*Box).WrapInputHandler.func2(0x14000e83ba0?, 0x14000e83ae0?)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/box.go:182 +0x54
github.com/derailed/tview.(*Application).Run(0x140003660e0)
        /Users/flavioelawi/go/pkg/mod/github.com/derailed/tview@v0.7.2/application.go:334 +0x470
github.com/one2nc/cloudlens/internal/view.(*App).Run(0x14000a89860)
        /Users/flavioelawi/workspaces/cloudlens/internal/view/app.go:281 +0x7c
github.com/one2nc/cloudlens/cmd.initView()
        /Users/flavioelawi/workspaces/cloudlens/cmd/root.go:57 +0x98
github.com/one2nc/cloudlens/cmd.selectAWS()
        /Users/flavioelawi/workspaces/cloudlens/cmd/aws.go:38 +0x134
github.com/one2nc/cloudlens/cmd.awsCommand.func1(0x14000202400?, {0x1016b768b?, 0x4?, 0x1016b768f?})
        /Users/flavioelawi/workspaces/cloudlens/cmd/aws.go:17 +0x1c
github.com/spf13/cobra.(*Command).execute(0x14000ab8c00, {0x14000a80f80, 0x4, 0x4})
        /Users/flavioelawi/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x640
github.com/spf13/cobra.(*Command).ExecuteC(0x102af47a0)
        /Users/flavioelawi/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/flavioelawi/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/one2nc/cloudlens/cmd.Execute()
        /Users/flavioelawi/workspaces/cloudlens/cmd/root.go:44 +0x54
main.main()
        /Users/flavioelawi/workspaces/cloudlens/main.go:8 +0x1c

@RamanaReddy0M
Copy link
Collaborator

@flavioelawi can you please pull and try now?

@flavioelawi
Copy link
Contributor Author

Cool, it works, I get to the containers and at the end to the Describe response

Copy link
Collaborator

@RamanaReddy0M RamanaReddy0M left a comment

Choose a reason for hiding this comment

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

lgtm!

@RamanaReddy0M RamanaReddy0M changed the base branch from main to dev November 27, 2023 05:54
@RamanaReddy0M RamanaReddy0M merged commit 63660b4 into one2nc:dev Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project status and ECS Support
3 participants