acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.14k stars 101 forks source link

`acorn edit` on parent does not expose any info about child acorns that will allow for editing child acorns. #2414

Closed sangee2004 closed 6 months ago

sangee2004 commented 6 months ago

acorn version - v0.10.0-rc2-9-g43dbcbf4+43dbcbf4

Steps to reproduce the problem: 1.Deploy app that has service and a consuming app like

services: db: {
    image: "ghcr.io/acorn-io/mariadb:v10.#.#-#"
}

containers: {
    app: {
        build: context: "."
        consumes: [ "db"]
        ports: publish: "8000/http"
        env: {
                DB_HOST: "@{service.db.address}"
                DB_PORT: "@{service.db.port.3306}"
                DB_NAME: "@{service.db.data.dbName}"
                DB_USER: "@{service.db.secrets.admin.username}"
                DB_PASS: "@{service.db.secrets.admin.password}"
        }
        memory: 1gi
        if args.dev {
                dirs: "/app":     "./"
                env: FLASK_DEBUG: "1"
        }
    }
testmariadb.db       ghcr.io/acorn-io/mariadb:v10.11.5-2*   b2c531c58968   4m32s ago                                                            OK
testmariadb          3de2bf28fdfa                                          4m38s ago   https://testmariadb-02c00909.j6sj6f.on-acorn.io          OK
  1. Once the app is deployed tried to update the app to upgrade the service image by attempting to acorn edit testmariadb, this provide an editor with just the local image which is of no practical use .

    image: "3de2bf28fdfa654b7c42aa28540a0239eed500499ef2f5165eb63051fb16c70f"
  2. acorn edit on the service acorn , shows the image details as follow - acorn edit testmaria.db that can be edited and saved.

    region: "acorn-sb-us-east-2"
    image:  "ghcr.io/acorn-io/mariadb:v10.#.#-#"
    stop:   false

    But we donot allow for editing child acorns and so providing details at the child acorn level is not helpful.

Expected Behavior: We should be able to provide the details of the service acorn in the acorn edit of the parent app that will allow for editing service acorns.

sangee2004 commented 6 months ago

Closing this issue. The things you can change with acorn edit are the same things you can set via the CLI when running acorn run