You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "aritra24 (via GitHub)" <gi...@apache.org> on 2026/01/31 14:03:31 UTC

[PR] Draft: Setup interactive mode for airflow standalone [airflow]

aritra24 opened a new pull request, #61288:
URL: https://github.com/apache/airflow/pull/61288

   Resolves: #60971
   
   Adds support for an interactive flag, if the flag is set it tries to 
   download mprocs and generates config file for it. After which
   it starts airflow under mprocs.
   
   <!--
   Thank you for contributing!
   
   Please provide above a brief description of the changes made in this pull request.
   Write a good git commit message following this guide: http://chris.beams.io/posts/git-commit/
   
   Please make sure that your code changes are covered with tests.
   And in case of new features or big changes remember to adjust the documentation.
   
   Feel free to ping (in general) for the review if you do not see reaction for a few days
   (72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
   
   In case of an existing issue, reference it using one of the following:
   
   * closes: #ISSUE
   * related: #ISSUE
   -->
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, please
   change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
   -->
   
   - [ ] Yes (please specify the tool below)
   
   <!--
   Generated-by: [Tool Name] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   -->
   
   ---
   
   * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #61288:
URL: https://github.com/apache/airflow/pull/61288#discussion_r2758743547


##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   I would say, it might be better if we simply put mprocs binary somewhere where we control it ("airflow.apache.org" ? similarly as we do with Helm chart). 
   
   We would need to have some semi-automation to copy and push the latest binaries when it gets updated (we can also add it as part of `breeze ci upgrade`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "aritra24 (via GitHub)" <gi...@apache.org>.
aritra24 commented on code in PR #61288:
URL: https://github.com/apache/airflow/pull/61288#discussion_r2759165663


##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #61288: Draft: Setup interactive mode for airflow standalone
URL: https://github.com/apache/airflow/pull/61288


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "aritra24 (via GitHub)" <gi...@apache.org>.
aritra24 commented on code in PR #61288:
URL: https://github.com/apache/airflow/pull/61288#discussion_r2759165799


##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



##########
airflow-core/src/airflow/utils/download_utils.py:
##########
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+import platform
+from pathlib import Path
+
+import requests
+
+log = logging.getLogger(__name__)
+
+
+def download_file_from_github(
+    version: str, output_file: Path, github_token: str | None = None, timeout: int = 60
+) -> bool:
+    """
+    Download a file from the GitHub repository of Mprocs using the GitHub API.
+
+    In case of any error different from 404, it will exit the process with error code 1.
+
+    :param version: version to download
+    :param output_file: Path where the file should be downloaded
+    :param github_token: GitHub token to use for authentication
+    :param timeout: timeout in seconds for the download request, default is 60 seconds
+    :return: whether the file was successfully downloaded (False if the file is missing)
+    """
+    import requests
+
+    url = get_url_from_version(version=version)
+    if not url:

Review Comment:
   Ack, that makes sense. Let me do that! 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "aritra24 (via GitHub)" <gi...@apache.org>.
aritra24 commented on code in PR #61288:
URL: https://github.com/apache/airflow/pull/61288#discussion_r2759173392


##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -515,6 +515,14 @@ core:
       type: boolean
       example: ~
       default: "False"
+    bin:

Review Comment:
   Hmm, that's fair. I agree, the added flexibility might not be needed. Let me drop it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #61288:
URL: https://github.com/apache/airflow/pull/61288#issuecomment-4101590655

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Draft: Setup interactive mode for airflow standalone [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #61288:
URL: https://github.com/apache/airflow/pull/61288#discussion_r2758734924


##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -515,6 +515,14 @@ core:
       type: boolean
       example: ~
       default: "False"
+    bin:

Review Comment:
   I think we can avoid it and load it to `bin` of AIRFLOW_HOME - this is the folder where all other files are dynamically created (such sqlite db) so it has to be writeable - I see no reason why we could not use `${AIRFLOW_HOME}/bin`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org