Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completer improvements #5849

Closed
wants to merge 1 commit into from
Closed

Conversation

erankor
Copy link

@erankor erankor commented Dec 29, 2020

Issue #, if available:
#2402

Description of changes:
add support for s3 and local path completion in s3 commands.
the s3 path completion includes both bucket names and prefixes.
in case --profile/--region are passed on the command line, they are used
when performing the s3 queries.
the creation of the 'help command' was moved away from the constructor
since it takes a considerable amount of time, and is not required for path
completion.
also, support completion of --profile p (partial profile name)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@erankor erankor force-pushed the completer-improvements branch from cccb1d7 to 3ebb2ea Compare December 30, 2020 16:03
add support for s3 and local path completion in s3 commands.
the s3 path completion includes both bucket names and prefixes.
in case --profile/--region are passed on the command line, they are used
when performing the s3 queries.
the creation of the 'help command' was moved away from the constructor
since it takes a considerable amount of time, and is not required for path
completion.
also, support completion of --profile p<TAB> (partial profile name)
@erankor erankor force-pushed the completer-improvements branch from 3ebb2ea to e9b8e00 Compare December 30, 2020 20:43
@codecov-io
Copy link

codecov-io commented Dec 30, 2020

Codecov Report

Merging #5849 (e9b8e00) into develop (4c71115) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5849      +/-   ##
===========================================
+ Coverage    92.62%   92.68%   +0.05%     
===========================================
  Files          203      203              
  Lines        16098    16179      +81     
===========================================
+ Hits         14911    14995      +84     
+ Misses        1187     1184       -3     
Impacted Files Coverage Δ
awscli/clidriver.py 95.94% <100.00%> (ø)
awscli/completer.py 92.17% <100.00%> (+9.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c71115...e9b8e00. Read the comment docs.

@erankor
Copy link
Author

erankor commented Jan 7, 2021

Ping

1 similar comment
@erankor
Copy link
Author

erankor commented Jan 14, 2021

Ping

@erankor
Copy link
Author

erankor commented Jan 26, 2021

@garnaat / @JordonPhillips I see you are the authors of this file, can one of you help?

@kdaily kdaily self-assigned this Feb 15, 2021
@catskul
Copy link

catskul commented Apr 23, 2021

@kdaily any chance you have time to review this? If no do you know another who can review this?

@flaviut
Copy link

flaviut commented Aug 25, 2021

I'm not familiar with this codebase, but this PR looks concise, reasonably written, and well-tested.

@kdaily
Copy link
Member

kdaily commented Oct 6, 2021

I reviewed this PR with the team. Unfortunately, it can't be merged, mainly for the following: it is opened against the develop branch and hence for the AWS CLI v1 only. For us to accept this feature, it would need to be done against the v2 branch and would be a v2-only feature.

The implementation for the v2 branch will be more straightforward and less invasive as a customization instead of being integrated directly into the completer class. You can see examples of this kind of thing as a customization here that other services are using:

https://github.com/aws/aws-cli/tree/v2/awscli/autocomplete/serverside/custom_completers

I understand that this doesn't help the work that has already been done and the delay to get this reviewed, and I apologize for that. We are working on reviewing backlog items and improving the user contribution process, including documentation of the process and contributor expectations. As part of that, we need to get more information on a GitHub issue for a feature on what the scope of change, use cases, proposed implementation, and alternatives considered are, and ideally this should occur before an implementation is submitted for review. One of the big things with this specific feature request is the addition of API calls that would be necessary to perform the server-side completion, and users of this feature would need to be made aware of how this would work.

@kdaily kdaily closed this Oct 6, 2021
@scottedwards2000
Copy link

I reviewed this PR with the team. Unfortunately, it can't be merged, mainly for the following: it is opened against the develop branch and hence for the AWS CLI v1 only. For us to accept this feature, it would need to be done against the v2 branch and would be a v2-only feature.

The implementation for the v2 branch will be more straightforward and less invasive as a customization instead of being integrated directly into the completer class. You can see examples of this kind of thing as a customization here that other services are using:

https://github.com/aws/aws-cli/tree/v2/awscli/autocomplete/serverside/custom_completers

I understand that this doesn't help the work that has already been done and the delay to get this reviewed, and I apologize for that. We are working on reviewing backlog items and improving the user contribution process, including documentation of the process and contributor expectations. As part of that, we need to get more information on a GitHub issue for a feature on what the scope of change, use cases, proposed implementation, and alternatives considered are, and ideally this should occur before an implementation is submitted for review. One of the big things with this specific feature request is the addition of API calls that would be necessary to perform the server-side completion, and users of this feature would need to be made aware of how this would work.

Are these custom completers something we could add easily to our own CLI, or do they need to be integrated by you guys after a pull request into the whole codebase? thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants