-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Breeze2 autocomplete requires click-complete
to be installed
#21164
Comments
@potiuk please assign it to me, I am installing Linux Mint on Virtual Box |
@potiuk I have one doubt in this. When we are using Breeze2 command, we will have the |
thank you for this question @Bowrna, I will add it in setup.cfg and I will see what will happen. It should be available |
Not exactly. The tricky point is that you should be able to run Breeze WITHOUT activating the virtual environment. In fact this also happen when you use
This is what I get: |
Basically the problem is that the user does not have the |
Got it now 👍 |
@potiuk I see that when we execute Lines 1 to 83 in 2f4a3d4
|
@potiuk I replicated this issue again and again, in a container, local machine, and in a Google Cloud Machine, once ./Breeze2 is installed the error will appear for the first time, then is not possible to replicate, even deleting the So to avoid this issue I suggest adding ad a pre-requirement:
Then Note: Even I installed click-completion as a part of the requirement, I CAN'T make a completion for Breeze2 work. (I am not sure if this could work or not, but in all the tests I did It didn't), I tested breeze setup completion and it works perfectly, but NOT BREEZE2. To test setup-autocomplete, I run it with sudo (this is other but which Bowrna is working): In conclusion: Let me know if fixing the documentation to add these requirements could close this issue? or should I ask for help from other containers? |
Yeah . I think we have too many "variables" so for now indeed fixing it in docs will be enough. One more thing we could do is - instead of "doing" stuff in the "setup-autocomplete", we could simply ask the user to make sure that "click-complete" is installed as system package. Writing this as |
@potiuk could you share your view on this? |
@potiuk what are you suggesting here, it is to avoid touching Breeze2, and instead, add in airflow/docs something like apache-airflow-breeze2 and write some warning in yellow about the installation of click-complete as a system package. |
Yep. If it is not installed when you run Breeze2. BTW. I might actually take a stab on it myself BTW. I had a discussion with Bowrna that made me think that maybe there is another problem. So do not bother about this one for a while. This one might be a little "tricky" :) |
@potiuk I see, please if you need a test let me know, I can test it faster too, I have free credits on Google Cloud it could help. |
Breeze2 autocomplete did not work because we were using some old way of adding it (via click-complete). Since then click has native (and very well working) autocomplete support without any external dependencies needed. It cannnot automatically generate the completions but it is not needed either, because we can store generated completion scripts in our repo. We also move some imports to local and catch rich_click import error to minimize dependencies needed to get autocomplete working. Setup-autocomplete install (and upgrade if needed click in case it needs to be used by autocomplete script. Fixes: apache#21164
Breeze2 autocomplete did not work because we were using some old way of adding it (via click-complete). Since then click has native (and very well working) autocomplete support without any external dependencies needed. It cannnot automatically generate the completions but it is not needed either, because we can store generated completion scripts in our repo. We also move some imports to local and catch rich_click import error to minimize dependencies needed to get autocomplete working. Setup-autocomplete install (and upgrade if needed click in case it needs to be used by autocomplete script. Fixes: #21164
Apache Airflow version
main (development)
What happened
When I setup autocomplete for Breeze2 on a "bare" system when I have no packages installed, It fails autocomplete with this error:
It seems that "autocomplete" feature of Breeze2 requires
click-completion
to be installed first. This is a small issue an small prerequisite but I think it is not handled by the currrentsetup-autocomplete
The same happens if you install Breeze2 with
pipx
.What you expected to happen
I expect that
click-completion
package is automatically installled in when./Breeze2 setup-autocomplete
is executed.Also it should be described in the documentation as prerequisite
How to reproduce
pip list | xargs pip uninstall -y
)Operating System
Linux Mint 20.1.3
Versions of Apache Airflow Providers
Not relevant
Deployment
Other
Deployment details
No airflow deployment
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: