-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Airflow documentation updates for Windows WSL2 installation #57027
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
base: main
Are you sure you want to change the base?
Conversation
Airflow Installation documentation updates for Windows using WSL2
Fixed typo in WSL
Formatting changes for Airflows Windows WSL2 installation
|
Some static checks failing |
Update start.rst to add line after ..code-block:: bash
Srabasti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added line after ..code-block:: bash
|
The CI still fails @Srabasti: |
|
Yes saw it failed again, sigh!! Is there a way to see the line at which the error is happening? The above description is not helpful enough to figure out the Root Cause of the failure. Can the static checks be enhanced to be more descriptive to include details of any errors @amoghrajesh @potiuk ? |
|
@Srabasti the static check for trailing whitespaces are offloaded from the widely accepted and standard precommit checks defined in https://github.com/pre-commit/pre-commit-hooks, the errors will be clear to you if you run those hooks locally. The CI is meant to be an indicator that something is failing and it will be easily reproducible when you run it locally as well as auto fixed too. The hook also says that it modifies the files: The static checks are fairly simple to install and use: https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#using-prek and making edits from the UI for simple cases is easier but cases which have some changes like yours, would benefit better from using an IDE |
|
There can be different ways to do the same results, however the errors from the static should still be shown in ideal scenario, so one can make out at a glance instead of troubleshooting. As recommended, I followed the link shared above and after installing prek, was not able to use and getting error as below.
As a workaround am using precommit to fix and push the changed files to Github as follows. It shows different errors now, at different points - that I have not changed at all. The original issue is fixed as not seeing that error anymore in logs above. Possibly it is due to changes in code by other developers? |
Srabasti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed changes again after running locally using "pre-commit run trailing-whitespace --files airflow-core/docs/start.rst"
Running "pipx ensurepath" already added the prek to the PATH, as shared above, along with the static checks passed success message. I had tried using a new terminal and relogging in however both had not worked out prior to posting message. Today after running below, the checks got triggered again. All checks have passed I see now. Hoping the rest goes through. Surprisingly the local checks showed more failures though here it shows all good so far!! In this scenario, prek did not work however atleast precommit did, thankfully! |
airflow-core/docs/start.rst
Outdated
|
|
||
| Successful installation requires a Python 3 environment. Starting with Airflow 3.1.0, Airflow supports Python 3.10, 3.11, 3.12, 3.13. | ||
|
|
||
| Officially supported installation methods is with``pip`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Officially supported installation methods is with ``pip`` or ``uv``. |
airflow-core/docs/start.rst
Outdated
|
|
||
| Officially supported installation methods is with``pip`. | ||
|
|
||
| Run ``pip install apache-airflow[EXTRAS]==AIRFLOW_VERSION --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints-PYTHON_VERSION.txt"``, for example ``pip install "apache-airflow[celery]==3.0.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.0/constraints-3.10.txt"`` to install Airflow in a reproducible way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Run ``pip install apache-airflow[EXTRAS]==AIRFLOW_VERSION --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints-PYTHON_VERSION.txt"``, for example ``pip install "apache-airflow[celery]==3.0.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.0/constraints-3.10.txt"`` to install Airflow in a reproducible way. You can also use - much faster - ``uv`` - by just adding ``uv`` before the command. |
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs shuffling around and shortening the content.
|
Sorry for back-forth @Srabasti , but I looked more closely and I think it's worth spending time to make things clearer that WSL2 installation is a general prerequisite if you are on Windows, but once you get it up and running - you follow a single flow - no matter if you are using Windows, Linux or Mac OS. This will also make the document shorter which will undoubtedly make @amoghrajesh happy. |
|
This is one of our most important documents for first-time contributors - this is the FIRST thing they encounter, and one that makes or breaks their "staying with the community" - so we should make sure it is as smooth and well rounded and short as possible. |
|
Thanks Jarek, good call. |
Co-authored-by: Jarek Potiuk <[email protected]>
Co-authored-by: Jarek Potiuk <[email protected]>
Co-authored-by: Jarek Potiuk <[email protected]>
|
Thanks for your helpful review @potiuk @amoghrajesh! Lesser shuffling around for sure. Incorporated suggested changes. |
|
Still some static code changes. I think also would be good to mention both |
|
Also there are still some suggestions to apply for the |
|
File attached has all above changes incorporated for reshuffling content, adding uv and reverting numbering changes. airflow-forkairflowcoredocsstart.rst.txt After making the changes and running as below, no more errors are seen - log below. XXXX@XXXXX:
Changes to be committed: XXXX@XXXXX: nothing to commit, working tree clean |
airflow-core/docs/start.rst
Outdated
| smooth setup experience. | ||
|
|
||
| If you are on Windows, you have to use WSL2 (Linux environment for Windows). | ||
| .. code-block bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now formatted as comment in .rst (it will not be visible in the rendered page).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your inputs! Incorporated changes below.
airflow-core/docs/start.rst
Outdated
| mkdir -p ~airflow | ||
| cd ~airflow | ||
| # Create virtual environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed before -> the creation of the environment is the same in WSL2 and outside - so we should rather update point 2. belowInstall airflow using uv to be Install airflow in a virtual environment - and rather add explanation that uv is a faster alternative to pip and creates the venv automatically for you - but both options - with uv and withoug (just with venv + pip) should be explained there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your inputs! Incorporated changes below.
|
Carried out below rebase step with recommended changes. -> Performed rebase by using below: Please advise if anything else. Thanks! |


This PR adds documentation for Airflow installation on Windows using WSL2.
Addresses closed PR: #[56566]
Airflow installation errors for grpcio #56566