Closed padilo closed 6 years ago
@padilo Thanks for the work and idea.
This implementation introduce real network calls to the AWS APIs to retrieve completion information. Before, thanks to the local
always present, the fetching operated locally on the data graph. This is one of the strong point of awless to be able to use with no cost this local graph for a lot of things.
My concern is that since a lot of our users have huge resources graph regardless of their profile (and so far awless has helped them a lot managing that), fetching this amount of data just for completion could be a bit problematic in term of lagging and responsiveness - although I understand well that putting the flag -p
is a way of saying "go and fetch my data remotely".
So here are a few questions:
And yes a release is scheduled in this week. The delay is due to our major design of our AWS modelling so we get more flexibility and scalability in the future.
Completely agree on the problem about network calls, the problem is that currently the autocomplete is broken when using --aws-profile
, because it tries to do the completion with a invalid list of instances.
That's why on this PR the --local
will be still used when user doesn't specify the profile using awless flags.
This will fix this problem when using profiles, but it will introduce some problems in terms of performance if user has many resources on AWS account.
So... Probably the good way to solve this is to have the data graph by aws profiles, in case there is one, and by now just disable the autocomplete if user sets a profile, because the autocompletion is wrong. I don't check enough how the data graph is done, and If what I'm saying has sense at all, sorry about that.
Could you describe shortly the devops use case you are trying to cover (i.e. the daily struggle your are trying to solve)?
In my case I jump across 12 AWS accounts, and it helps me a lot to have completion to just connect to the instance I need using awless ssh command
Would there be a way of clarifying better (i.e. notifying the CLI user) when the completion is being resolved by fetching remote data?
I can check that, not sure. But I think using the local data maybe is the only good way to solve this.
@padilo Indeed, the fact that multi-account is not supported yet causes issues. This has been on our roadmap for some time and should be completed in the next few months. That is paramount for a smooth usage of awless for people with multi-account
I have personally already tried a implementation to store the profile/account info as part of the local data file tree (under ~/.awless/aws/rdf/...). It did not work and scale well. We will give that another go and come up with some other solutions. For instance, we might introduce a awless switch
command, etc. If you have any ideas, solutions to solve multi-account let us know.
Anyway, we will close this PR and create an issue (referencing you) about that. For the completion, as for now, you can have your local bash follow the work you did on your PR.
Closing this PR. Now issue referenced in #166
Now completion takes care of the aws profile
After this PR gets merged, if so, a release will be highly appreciated ;)