Skip to content

[Feature]: Handle syntax etc. errors in compose #134

@jakub-bochenski

Description

@jakub-bochenski

Summary

Handle syntax etc. errors in compose

Problem statement

In edit compose there is a check if stack is running

		running=$("$AGB_LIBDIR/run-compose" ps --status running --quiet 2>/dev/null) || true

running will also be empty if there are syntax etc. errors in compose files.
The problems are printed to stderr.

So if you edit the file and make a mistake you will see

16:04:31 [INFO] Compose file was modified.

even if the stack is actually running at that point.

Proposed change

It would be nice if the code detected the errors and warned about them.

I'm not sure how reliably this can be done though (does stderr output always mean a syntax etc. error? probbably not).

Maybe just run docker compose config after edits - if it fails I'd assume there are errors in the compose files

Alternatives considered

No response

Scope

Small targeted improvement

Roadmap alignment

This is a simple QoL improvement

Willingness to implement

I can't commit as much time as I'd like to this project ATM :(

Checklist

  • I searched existing issues and planning docs before filing this request.
  • I reviewed README.md, docs/roadmap.md, and docs/plan/project.md.
  • I understand that accepted features may still require a planning document before code review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions