Add proof of concept server ls comand #2
Closed
knoflook
wants to merge 2 commits from
knoflook/abra:main into main
pull from: knoflook/abra:main
merge into: :main
:main
:renovate/golang-1.27
:renovate/github.com-charmbracelet-bubbletea-2.x
:fix/492
:local-integration-testing
:renovate/github.com-charmbracelet-lipgloss-2.x
:renovate/otel-weaver-0.x
:renovate/codespell-2.x
:renovate/tonistiigi-xx-1.x
:renovate/alpine-3.x
:renovate/github.com-charmbracelet-log-2.x
:chore-deps
:fix/deps
:fix/613
No Reviewers
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#2
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi knoflook, thanks for the pull request. Thanks for looking into this at such an early stage and for what would be a good patch if it wasn't for these requirements that aren't clear atm since the package is vnew. <3
Sadly before this can be merged, I have a few issues with it. The main one is we will be using the docker sdk to run docker commands vs running commands via bash. This means I would have to edit most of the code you have introduced. You couldn't have know we are doing that so that's just unfortunate really.
The second is that we will also be using the colours lib already in the go.mod file for colours and terminal codes vs just printing the bare codes so that the code is easier to maintain.
Heyy, thanks for your reply :) i knew we don't have an agreement on what we'll be using. I just wanted to write anything to play with go and feel what it's like to develop in it hahah I'm happy to edit this PR, but I'm not sure if I'll be able to in the upcoming 2 weeks bc I'm going on vacation. If somebody picks it up it's cool too :) I was looking into Docker go SDK(https://pkg.go.dev/github.com/docker/docker/client) but I haven't found any mention of
docker context. Could you point me to the function that I should use, or better yet: tell me how to find it? I don't understand those docs XD When I know that I can fix this and make future PR's properly!Oh god this led down to a 3 hour search I have actuallly had to record me retelling to another comrade of Autonomic. Basically you don't. The API only has the focus of the Docker daemon's sock file. The CLI itself sorta hacks on this to allow for context. I now have the way of mixing the CLI's "hack" and the Golang clent and will add it to abra in a bit.
How Abra will deal with this external to running docker commands I don't know. The two main ones is we use the CLI now being a lib to steal some functions from that will allow us to access the already defined Docker contexts and how the CLI deals with it. Or we just do something ourselves.
If you are going on holiday for the next 2 weeks then I will probably have this function done before you get back haha. I don't know what to do about this PR just yet though.
https://git.autonomic.zone/coop-cloud/go-abra/commit/5e1b076bf97f9f5ba89dd857b495a8bb5e1e2169
So, the scaffolding is up now and the TODO list is out for what can be taken on now over in https://git.autonomic.zone/coop-cloud/go-abra/src/branch/main/TODO.md. The
server lscommand got written in https://git.autonomic.zone/coop-cloud/go-abra/src/commit/c9ba7aef208218f4293ac44e0638ab7766ec6340/cli/server.go#L12 using the approach @roxxers was aiming to wire up. Will close this off then? Thanks for taking a run at this @knoflook and see you somewhere in the TODO.md 🙏Pull request closed