You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/07/12 17:07:38 UTC
[GitHub] [airflow] potiuk opened a new pull request, #32564: Remove "--for-production" flag from docs building
potiuk opened a new pull request, #32564:
URL: https://github.com/apache/airflow/pull/32564
We had two types of documentation building:
* latest
* for production
But in fact they never overlapped and we were never mixing the two We used the latest for all development work and for production for releasing to "airflow.apache.org".
However as we saw in #32562 (triggered by #32495 changing the build in main to run with `--for-production` flag - we actually do not need the "latest" builds at all. Everything can be build with "for production" by default.
This change removes the `--for-production` flag entirely, leaving the "for production" build mode as the only one available.
<!--
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.
-->
<!--
Thank you for contributing! 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 committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/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
[GitHub] [airflow] vincbeck commented on a diff in pull request #32564: Remove "--for-production" flag from docs building
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #32564:
URL: https://github.com/apache/airflow/pull/32564#discussion_r1261496394
##########
dev/breeze/src/airflow_breeze/commands/developer_commands.py:
##########
@@ -357,17 +351,12 @@ def start_airflow(
def build_docs(
docs_only: bool,
spellcheck_only: bool,
- for_production: bool,
builder: str,
clean_build: bool,
one_pass_only: bool,
package_filter: tuple[str],
github_repository: str,
):
- """Build documentation in the container."""
- if for_production and not clean_build:
- get_console().print("\n[warning]When building docs for production, clean-build is forced\n")
- clean_build = True
Review Comment:
Just double checking, `for_production` is now by default, before we were forcing `clean-build` when `for_production` was `True`. Does it make sense to keep that option then? Now we can have `clean_build = False` although `for_production` is like `True`
--
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
[GitHub] [airflow] potiuk commented on a diff in pull request #32564: Remove "--for-production" flag from docs building
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #32564:
URL: https://github.com/apache/airflow/pull/32564#discussion_r1261533906
##########
dev/breeze/src/airflow_breeze/commands/developer_commands.py:
##########
@@ -357,17 +351,12 @@ def start_airflow(
def build_docs(
docs_only: bool,
spellcheck_only: bool,
- for_production: bool,
builder: str,
clean_build: bool,
one_pass_only: bool,
package_filter: tuple[str],
github_repository: str,
):
- """Build documentation in the container."""
- if for_production and not clean_build:
- get_console().print("\n[warning]When building docs for production, clean-build is forced\n")
- clean_build = True
Review Comment:
Yes. That's good point and keen eye :) . I've thought about it to but we are pretty well covered here.
The `--clean-build` flag makes rebuilding docs slow (because it deletes all the cache) - so we certainly do not want to have it enabled by default. And the "force clean build for production" was added there mostly as a protection against somoene mistakenly building docs without `--clean-build` while releasing it and possibly publishing some old documentation.
However since it was introduced, we've also been very keen on perfecting our release process and we largely simply copy&paste the steps from here:
* https://github.com/apache/airflow/blob/main/dev/README_RELEASE_AIRFLOW.md#publish-documentation
* https://github.com/apache/airflow/blob/main/dev/README_RELEASE_HELM_CHART.md#publish-documentation
* https://github.com/apache/airflow/blob/main/dev/README_RELEASE_PROVIDER_PACKAGES.md#prepare-documentation
As you can check (and I double checked it before submitting this PR) in all cases there we have `--clean-build` added as a flag. Yes. it is not perfect, someone impatient might want to skip the copy&paste step but we really focus in our release management team on following the release process "by-the-book" and I think we are all aware that we should not do shortcuts. Also the risk is small, even if build is not clean, the probability of breaking docs is very small - and in most cases the problem will be that the build will fail, because some links will be missing in old docs etc.
So I think we are well covered.
--
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
[GitHub] [airflow] potiuk merged pull request #32564: Remove "--for-production" flag from docs building
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #32564:
URL: https://github.com/apache/airflow/pull/32564
--
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
[GitHub] [airflow] vincbeck commented on a diff in pull request #32564: Remove "--for-production" flag from docs building
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #32564:
URL: https://github.com/apache/airflow/pull/32564#discussion_r1261538449
##########
dev/breeze/src/airflow_breeze/commands/developer_commands.py:
##########
@@ -357,17 +351,12 @@ def start_airflow(
def build_docs(
docs_only: bool,
spellcheck_only: bool,
- for_production: bool,
builder: str,
clean_build: bool,
one_pass_only: bool,
package_filter: tuple[str],
github_repository: str,
):
- """Build documentation in the container."""
- if for_production and not clean_build:
- get_console().print("\n[warning]When building docs for production, clean-build is forced\n")
- clean_build = True
Review Comment:
Makes sense, thanks for the details
--
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