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

Remove -A from all commands except acorn ps #1897

Closed
g-linville opened this issue Jul 7, 2023 · 5 comments
Closed

Remove -A from all commands except acorn ps #1897

g-linville opened this issue Jul 7, 2023 · 5 comments
Assignees
Milestone

Comments

@g-linville
Copy link
Contributor

In this issue we want to accomplish a few things:

  1. Remove the -A flag from all commands except for acorn ps
    • Might want to rename it to something else, like maybe --all-projects
  2. Switch from acorn apps to acorn ps as the main command name; leave acorn apps as a valid alias
  3. Make -A (or whatever it is renamed to) only show apps in all projects in the user's "current server" for acorn ps
    • For example, if I am logged into hub.stg.acornlabs.com, I should only see the projects in that instance of Manager, and not in any others or in my current k8s context
    • There are a couple ways to accomplish this: we can determine which server to use based on the user's default project (acorn project use), or we could have some argument to acorn ps to specify the server. Try things out and see what works the best.
@g-linville g-linville added this to the v0.8.0 milestone Jul 7, 2023
@g-linville g-linville self-assigned this Jul 7, 2023
g-linville added a commit that referenced this issue Jul 14, 2023
Signed-off-by: Grant Linville <grant@acorn.io>
@sangee2004
Copy link
Contributor

Tested with acorn version - v0.8.0-alpha7-98-gbb130866+bb130866

  1. -A option is removed from all commands expect ps
  2. acorn help lists ps. Able to use app and ps to list all apps.
  3. -A option is supported for ps
  4. acorn apps -A list apps from all projects from the current server.
 acorn project
NAME                                        DEFAULT   REGIONS
acorn                                       *         local
hub.dev.acornlabs.com/sangee2004/mytest1              acorn-us-east-2
hub.stg.acornlabs.com/sangee2004/test1                acorn-us-east-2
hub.stg.acornlabs.com/sangee2004/testnew1             acorn-us-east-2
test1                                                 local
  1. When in the context of hub.stg.acornlabs.com/sangee2004/test1 or hub.stg.acornlabs.com/sangee2004/testnew1 , using acorn apps -A lists all apps from both hub.stg.acornlabs.com/sangee2004/test1 and hub.stg.acornlabs.com/sangee2004/testnew1
  2. When in the context of hub.dev.acornlabs.com/sangee2004/mytest1 , using acorn apps -A lists all apps from only hub.dev.acornlabs.com/sangee2004/mytest1
  3. When in the context of acorn or test1 , using acorn apps -A lists all apps from both acorn and test1

All the above scenarios work as expected.

@sangee2004
Copy link
Contributor

sangee2004 commented Jul 17, 2023

There is an issue with -j not working as expected when used with "-A" option.

In this case -j option is ignored.

acorn projects
NAME                                        DEFAULT   REGIONS
acorn                                       *         local
hub.dev.acornlabs.com/sangee2004/mytest1              acorn-us-east-2
hub.stg.acornlabs.com/sangee2004/test1                acorn-us-east-2
hub.stg.acornlabs.com/sangee2004/testnew1             acorn-us-east-2
test1                                                 local
sangeethahariharan@Sangeethas-MacBook-Pro example1 % acorn -j hub.dev.acornlabs.com/sangee2004/mytest1 apps -A
NAME                   IMAGE          DIGEST         HEALTHY   UP-TO-DATE   CREATED     ENDPOINTS                                                               MESSAGE
acorn/mylocal2         1380da14c056   1380da14c056   1         1            17m ago     http://myweb1-mylocal2-138cf25b.local.oss-acorn.io => myweb1:80         OK
acorn/mylocal1         1380da14c056   1380da14c056   1         1            17m ago     http://myweb1-mylocal1-d50f22f2.local.oss-acorn.io => myweb1:80         OK
test1/mylocaltest123   1380da14c056   1380da14c056   1         1            2m45s ago   http://myweb1-mylocaltest123-43903bab.local.oss-acorn.io => myweb1:80   OK
sangeethahariharan@Sangeethas-MacBook-Pro example1 % 

Reopening this issue to get this addressed.

@g-linville
Copy link
Contributor Author

Good find, I did not think about the interaction between these. I'll get it fixed.

@g-linville
Copy link
Contributor Author

Fixed.

@sangee2004
Copy link
Contributor

Tested with acorn version v0.8.0-alpha7-131-g4bf05b4d+4bf05b4d

acorn ps -j <project-namne> -A now respects -j parameter.

cloudnautique pushed a commit to cloudnautique/runtime that referenced this issue Sep 28, 2023
Signed-off-by: Grant Linville <grant@acorn.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants