WIP: feat: use compose-go #816
Draft
decentral1se
wants to merge 25 commits from
fix/492 into main
pull from: fix/492
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#816
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.
An absolutely diabolical rabbit hole that I wouldn't wish on my worst enemy.
Docker never implemented it and so we were stuck using their custom solution for loading compose config files. This led to #492.
compose-gohas a better API which supports our various use-cases (loading the compose files via a loaded app, loaded recipe or just directly from the FS) and actually implements the compose spec, so it's a big win!ToDo
bail if recipe lint errors and no --chaosdoes not crash when docker image has no tagdetect no volumes to removeremove volumeslist volumesremove no volumesremove single volumeremove single volume doesn't delete similar namerecipe lintrelease patch bumprelease new recipe: development releasepush during release failsrelease, fail, release: worksupgrade patchupgrade minorupgrade and commitNotes
version: ...linting rule is going away because it's deprecatedWIP: feat: use compose-go for compose parsingto WIP: feat: use compose-go7bd9d667a0tof2e813e2e3f2e813e2e3to5eea459bde5eea459bdeto5cf42a81045cf42a8104to94624bb16d@decentral1se I think the integration tests are fixed.
What does "WTF API surface for parsing compose configs: in app context, recipe context, no context" mean xD
@devydave amazing, well done!
It means to try to unify somehow these "we need to parse compose configs" interface.
We have 3 contexts with data in memory when loading compose configs: 1) we have an app (e.g.
appPkg.GetAppComposeConfig(composeFiles, app.Env)) 2) we have a recipe (e.g.recipe.GetComposeConfig()) 3) we have neither and we just need to read the file (e.g.loader.LoadCompose(loader.LoadConf{ComposeFiles: composeFiles})).This is relevant because some completion happens of env vars, or some merging of config files, etc. etc. Can this API surface be made more understandable for our future selves?
This could be a good internal refactor to carry out now while the issue is burning because it is exactly what made this migration so hilariously difficult. I could understand if you want to skip it however. It's up to you. Most of abra was cobbled together moving super fast, so even if this doesn't get done now, it's nice to mark an issue for a future refactor. It will most likely matter for future maintainers.
I agree with that, while fixing the remaining tests it was quite confusing having multiple places where compose files are parsed.
I will take a look, if I can add unify the parsing, that can be simply adjusted by the caller.
After looking into it, the loading pattern of compose file is messy overall, I think it is the best to move it to a separate issue.
Great, go ahead and feel free to merge stuff, take the lead, open issues, etc. You don't need to ask.
For releaseing abra when you feel like things are stable, there are these docs:
Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.