Skip to content
This repository has been archived by the owner on Dec 17, 2019. It is now read-only.

Added application list to the cli interface #5

Merged
merged 4 commits into from
Nov 4, 2019

Conversation

ziccardi
Copy link
Member

@ziccardi ziccardi commented Oct 31, 2019

Motivation

Added :

  • ag version: returns the version of the ag-cli
  • ag app list: returns the list of applications currently installed on the cluster

Example:

Screenshot 2019-11-04 at 11 51 25

@Boomatang
Copy link
Collaborator

I have tried to run it as shown in your example. All worked as expected.

There is two questions I would like to ask.

  1. What is the reason for having the "REMOTE/LOCAL" column? It seem it should be listing the local apps to but is would that not be near impossible to find all the local apps.
  2. Should we have some custom error handling when the user is not logged into a cluster? When I was tried list the apps with out logging in the error I got was An error has occurred: Failed to get /openapi/v2 and /swagger.json: connect EHOSTUNREACH <IP ADDRESS> which I feel is not very helpfully.

@ziccardi
Copy link
Member Author

ziccardi commented Nov 1, 2019

@Boomatang

What is the reason for having the "REMOTE/LOCAL" column?

A local app is an app that is into the .ag workspace, while a remote app is an app that is installed into the cluster.
So an app can be:

  • L : it has been created locally but has never been pushed to the cluster
  • R : it has been created on the cluster, but has not been pulled into the local workspace (.ag folder)
  • LR : it is both in the local workspace (.ag folder) and in the cluster (either because it has been pulled or pushed)

Should we have some custom error handling when the user is not logged into a cluster?

The error you got is an 'host unreachable' error, not a 'not authenticated' error.

The error you get when you are not authenticated is maybe more cryptic for an unexperienced user:
An error has occurred: mobileclients.mdc.aerogear.org is forbidden: User "system:anonymous" cannot list mobileclients.mdc.aerogear.org in the namespace "mobile-developer-console": no RBAC policy matched

Maybe it would be a good idea to add in the future a specific error handler for this case.

@Boomatang
Copy link
Collaborator

@ziccardi

To be clear then, The 'REMOTE/LOCAL' only shows L if the current project has a .ag folder. This would not show all the projects that have a .ag folder on the local system.
Just one note that came to mind, would it be better to have the table view flipped, So it would read from left to right | APP NANE | NAMESPACE | REMOTE/LOCAL |. I feel a user would be looking for the app name more than then if its on the local machine.

I do think it would be a good idea to have more specific error handing.

@ziccardi
Copy link
Member Author

ziccardi commented Nov 4, 2019

@Boomatang Removed the 'remote/local' column to avoid confusion, switched the columns as suggested,

@ziccardi ziccardi merged commit 6a565a3 into aerogear:master Nov 4, 2019
@ziccardi ziccardi deleted the AEROGEAR-10044 branch November 4, 2019 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants