Ensure compose.**.yml files are validated #254
Closed
opened 2021-11-21 14:22:18 +00:00 by decentral1se
·
3 comments
Labels
Clear labels
abra
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
design
documentation
duplicate
enhancement
fedi
fedi-infra
finance
funding
good first issue
help wanted
installer
legal
performance
proposal
question
security
test
wontfix
Everything to do with abra
Ping/pong on comms
Something is not working
Go build related issues
Getting the robots into the mix
Opening this thing up
Contributors stuff
Our main website
Design thinking required
Let's write things together
This issue or pull request already exists
New feature
Democratic decision making
Money things
Anything related to grant funding
Easy start with development
Need some help
Installation related issues
Performance related
Large change which requires feedback & decisin making
More information is needed
Securing our shit
Unit or integration test suite
This won't be fixed
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/organising#254
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.
Describe the current behavior
Upstream validation isn't great. Broken compose files get deployed. Some things get handled, some things not. E.g. no
image: ...doesn't get caught but a missingversion: ...does?This also has a confusing error message (I simply removed
version: ...from the gitea recipe compose config...). That could be improved also.Steps to reproduce
coop-cloud/organising#243 (comment)
Describe the expected behavior
abrabails out if anything is broken in the compose config.Any idea how this might be fixed?
Idk because we're just running https://github.com/docker/cli/blob/9bc104eff0798097954f5d9bc25ca93f892e63f5/cli/compose/schema/schema.go#L63-L83 and that loads https://github.com/docker/cli/blob/master/cli/compose/schema/data/config_schema_v3.8.json which then is perhaps wrong or they had a good reason to avoid setting required properties like
image: ...? It looks right tho?We could override
fdf4fc6737/pkg/upstream/stack/loader.go (L29-L36)and give a better error message anyway.We could just re-use the logic from
abra recipe lintto do our own validation 🤔Love it. Maybe we'd want to have
recipe lintknow the difference between a critical error like missingimage:and a warning like use oflatesttag?a84a5bc3208735a8f0ea