Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

image field in acorn app for nested acorns and services always point to image id even when they are deployed from remote images from external registry. Remote Image entries are also not created. #1774

Closed
sangee2004 opened this issue Jun 12, 2023 · 11 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@sangee2004
Copy link
Contributor

Acorn version - acorn version v0.7.0-38-gdc95c02b+dc95c02b

Steps to reproduce the problem:

  1. Deploy app using services from images hosted in external registry.
containers: {
  nginx: {
    image: "nginx"
    env: {
     "NAME": "@{secrets.mysec.my-service-secret.username}"
     "PASSWORD": "@{secrets.mysec.my-service-secret.password}"
}
}
}
services: {
     mysec: {
        image: "docker.io/sangeetha/myfirstservice:v0.0.1"
        }
}

After app deploys successfully, notice that the image in acorn app shows a imageId.

acorn apps
NAME                  IMAGE          HEALTHY   UP-TO-DATE   CREATED     ENDPOINTS   MESSAGE
mytestservice         a03c0062ae4b   1         1            9m45s ago               OK
mytestservice.mysec   2b590937796e   0         0            9m45s ago               OK

Expected Behavior:
Image should be docker.io/sangeetha/myfirstservice:v0.0.1 instead of id

  1. Deploy nested acorn using images hosted in external registry.
acorns: {
    "my-acorn2": {
        image: "docker.io/sangeetha/myfirstacorn:v0.0.2"
    }
}

After app deploys successfully, notice that the image in acorn app shows a imageId.

acorn apps
NAME                  IMAGE          HEALTHY   UP-TO-DATE   CREATED     ENDPOINTS                                                                            MESSAGE
mynested              d420be4c96df   0         0            3m27s ago                                                                                        OK
mynested.my-acorn2    a381c7951b3d   1         1            3m27s ago   http://myweb1-mynested-my-acorn2-e5efce26-88f3c3c5.local.oss-acorn.io => myweb1:80   OK

Expected Behavior:
Image should be docker.io/sangeetha/myfirstacorn:v0.0.2 instead of id

Note - In both the the above cases acorn images does not list the remote images entries.

@sangee2004 sangee2004 added this to the v0.7.1 milestone Jun 12, 2023
@cjellick cjellick modified the milestones: v0.7.1, v0.8.0 Jun 13, 2023
@cjellick
Copy link
Member

Image should be docker.io/sangeetha/myfirstservice:v0.0.1 instead of id

@ibuildthecloud said "Because at build time the nested acorn name become as hash. It's basically a UX bug that we never show the name again, but we do have that information."

That doesnt exactly mean that that field cannot be a digest.

@cjellick cjellick added the kind/bug Something isn't working label Jun 22, 2023
@cjellick
Copy link
Member

So, I think the result of our discussion is that this is intended behavior, right @g-linville @sangee2004 ?

@sangee2004
Copy link
Contributor Author

In this case , we still wanted UX to be fixed so that the image field for acorn apps returns the remote image ?

@cjellick
Copy link
Member

yes, we should fix the UX. I suppose we can use this issue to track that.

@sangee2004 sangee2004 changed the title appImage.id and appImage.name for nested acorns and services always point to image id even when they are deployed from remote images from external registry. Remote Image entries are also not created. image field in acorn app for nested acorns and services always point to image id even when they are deployed from remote images from external registry. Remote Image entries are also not created. Jun 23, 2023
@sangee2004
Copy link
Contributor Author

I have updated the title of the bug to reflect the UX part of the issue which is what it actually described in the bug report as well.

@g-linville
Copy link
Contributor

Fixed, moving to QA.

@sangee2004
Copy link
Contributor Author

sangee2004 commented Jul 17, 2023

Tested with acorn version v0.8.0-alpha7-98-gbb130866+bb130866 with apps deployed in staging server.

I still see image field in acorn app show image id instead of the remote image from external registry.

@g-linville
Copy link
Contributor

This is fixed on Dev now.

@sangee2004
Copy link
Contributor Author

Tested on local clusters using acorn version - acorn version v0.8.0-alpha7-131-g4bf05b4d+4bf05b4d

Deployed nested acorn app with following Acornfile:

acorns: {
    "my-acorn1": {
        image: "ghcr.io/acorn-io/library/hello-world:latest"
    }
    "my-acorn2": {
        image: "docker.io/sangeetha/myfirstacorn:v#.#.#"
        autoUpgrade: true
        autoUpgradeInterval: "15s"
    }
   "my-acorn3": {
       image: "docker.io/sangeetha/myfirstacorn:v0.0.1"
   }
}

image field shows the images from external registry as expected for my-acorn1 and my-acorn3.
For my-acorn2 which is deployed with autoupgrade format , image shows the image with autoupgrade format instead of showing the actual image with which the app was deployed.

acorn apps                                                                 
NAME                      IMAGE                                            DIGEST         HEALTHY   UP-TO-DATE   CREATED     ENDPOINTS                                                                                                MESSAGE
mynestedacorn             5e25f036e64f                                     5e25f036e64f   0         0            4m25s ago                                                                                                            OK
mynestedacorn.my-acorn1   ghcr.io/acorn-io/library/hello-world:latest      693234be0d3d   1         1            4m25s ago   http://webapp-mynestedacorn-my-acorn1-7f8f0c42-0231e1fe.local.oss-acorn.io => webapp:80                  OK
mynestedacorn.my-acorn2   docker.io/sangeetha/myfirstacorn:v#.#.#          a79413cf182f   1         1            4m25s ago   http://myweb1-mynestedacorn-my-acorn2-453e996f-d3456055.local.oss-acorn.io => myweb1:80                  OK
mynestedacorn.my-acorn3   docker.io/sangeetha/myfirstacorn:v0.0.1          f4ddb1bac222   2         2            4m25s ago   http://myweb1-mynestedacorn-my-acorn3-ff33c584-90b00b56.local.oss-acorn.io => myweb1:80                  OK

Reopening to get this issue addressed.

@g-linville
Copy link
Contributor

Fix merged to main.

@sangee2004
Copy link
Contributor Author

acorn version - v0.8.0-alpha7-133-ge68fb042+e68fb042

Image field shows the exact image tag with which the app was deployed when deploying nested acorn apps in autoupgrade format.

When app is deployed with Acornfile mentioned in #1774 (comment)

mytestnew.my-acorn2   index.docker.io/sangeetha/myfirstacorn:v37.0.0   a79413cf182f   1         1            9s ago    http://myweb1-mytestnew-my-acorn2-777aa612-f54f17b7.local.oss-acorn.io => myweb1:80   OK

cloudnautique pushed a commit to cloudnautique/runtime that referenced this issue Sep 28, 2023
cloudnautique pushed a commit to cloudnautique/runtime that referenced this issue Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants