This is an automated email from the ASF dual-hosted git repository.
kamilbregula pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new de15aa3 Deprecate Read the Docs (#12541)
de15aa3 is described below
commit de15aa30d476411379e33bc9d5ce4cf0544e858c
Author: Kamil BreguĊa <[email protected]>
AuthorDate: Sun Nov 22 19:45:12 2020 +0100
Deprecate Read the Docs (#12541)
---
.readthedocs.yml | 2 ++
IMAGES.rst | 2 +-
README.md | 4 ++--
airflow/api_connexion/exceptions.py | 5 +++-
airflow/api_connexion/openapi/v1.yaml | 2 +-
airflow/cli/cli_parser.py | 4 ++--
.../dingding/example_dags/example_dingding.py | 6 ++---
airflow/utils/docs.py | 4 +++-
dev/README_RELEASE_AIRFLOW.md | 4 +---
docs/conf.py | 1 +
docs/exts/airflow_intersphinx.py | 2 +-
.../microsoft/transfer/blob_storage_to_gcs.rst | 2 +-
docs/rtd-deprecation/404.html | 27 ++++++++++++++++++++++
.../rtd-deprecation/conf_rtd.py | 15 ++++--------
docs/rtd-deprecation/index.rst | 23 ++++++++++++++++++
tests/providers/dingding/hooks/test_dingding.py | 6 ++---
tests/utils/test_docs.py | 14 +++++++++--
17 files changed, 91 insertions(+), 32 deletions(-)
diff --git a/.readthedocs.yml b/.readthedocs.yml
index 75eef40..432451d 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -17,6 +17,8 @@
---
version: 2
formats: []
+sphinx:
+ configuration: docs/rtd-deprecation/conf_rtd.py
python:
version: 3.7
install:
diff --git a/IMAGES.rst b/IMAGES.rst
index 1cc062b..fad29a6 100644
--- a/IMAGES.rst
+++ b/IMAGES.rst
@@ -536,7 +536,7 @@ Production images
-----------------
You can find details about using, building, extending and customising the
production images in the
-`Latest documentation
<https://airflow.readthedocs.io/en/latest/production-deployment.html>`_
+`Latest documentation <docs/production-deployment.rst>`_
Image manifests
diff --git a/README.md b/README.md
index c49ad3f..e0120f8 100644
--- a/README.md
+++ b/README.md
@@ -98,7 +98,7 @@ running multiple schedulers -- please see the "Scheduler"
docs.
Visit the official Airflow website documentation (latest **stable** release)
for help with [installing
Airflow](https://airflow.apache.org/installation.html), [getting
started](https://airflow.apache.org/start.html), or walking through a more
complete [tutorial](https://airflow.apache.org/tutorial.html).
-> Note: If you're looking for documentation for master branch (latest
development branch): you can find it on
[ReadTheDocs](https://airflow.readthedocs.io/en/latest/).
+> Note: If you're looking for documentation for master branch (latest
development branch): you can find it on
[s.apache.org/airflow-docs](https://s.apache.org/airflow-docs/).
For more information on Airflow's Roadmap or Airflow Improvement Proposals
(AIPs), visit the [Airflow
Wiki](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Home).
@@ -162,7 +162,7 @@ Those are - in the order of most common ways people install
Airflow:
- [Docker Images](https://hub.docker.com/repository/docker/apache/airflow) to
install airflow via
`docker` tool, use them in Kubernetes, Helm Charts, `docker-compose`,
`docker swarm` etc. You can
read more about using, customising, and extending the images in the
- [Latest
docs](https://airflow.readthedocs.io/en/latest/production-deployment.html), and
+ [Latest docs](/docs//production-deployment.html), and
learn details on the internals in the [IMAGES.rst](IMAGES.rst) document.
- [Tags in GitHub](https://github.com/apache/airflow/tags) to retrieve the git
project sources that
were used to generate official source packages via git
diff --git a/airflow/api_connexion/exceptions.py
b/airflow/api_connexion/exceptions.py
index 7f3623a..7bfd06f 100644
--- a/airflow/api_connexion/exceptions.py
+++ b/airflow/api_connexion/exceptions.py
@@ -22,7 +22,10 @@ from connexion import FlaskApi, ProblemException, problem
from airflow import version
if any(suffix in version.version for suffix in ['dev', 'a', 'b']):
- doc_link =
"https://airflow.readthedocs.io/en/latest/stable-rest-api-ref.html"
+ doc_link = (
+
"http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest"
+ "/stable-rest-api-ref.html"
+ )
else:
doc_link =
f'https://airflow.apache.org/docs/{version.version}/stable-rest-api-ref.html'
diff --git a/airflow/api_connexion/openapi/v1.yaml
b/airflow/api_connexion/openapi/v1.yaml
index f9bbb43..9c7e942 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -1937,7 +1937,7 @@ components:
type: object
description: |
For details see:
-
(airflow.models.BaseOperator)[https://airflow.readthedocs.io/en/stable/_api/airflow/models/index.html#airflow.models.BaseOperator]
+
(airflow.models.BaseOperator)[https://airflow.apache.org/docs/stable/_api/airflow/models/index.html#airflow.models.BaseOperator]
properties:
class_ref:
$ref: '#/components/schemas/ClassReference'
diff --git a/airflow/cli/cli_parser.py b/airflow/cli/cli_parser.py
index b6fd520..46addc1 100644
--- a/airflow/cli/cli_parser.py
+++ b/airflow/cli/cli_parser.py
@@ -1411,7 +1411,7 @@ airflow_commands: List[CLICommand] = [
help='Rotate encrypted connection credentials and variables',
description=(
'Rotate all encrypted connection credentials and variables; see '
-
'https://airflow.readthedocs.io/en/stable/howto/secure-connections.html'
+
'https://airflow.apache.org/docs/stable/howto/secure-connections.html'
'#rotating-encryption-keys'
),
args=(),
@@ -1437,7 +1437,7 @@ airflow_commands: List[CLICommand] = [
help='Celery components',
description=(
'Start celery components. Works only when using CeleryExecutor.
For more information, see '
- 'https://airflow.readthedocs.io/en/stable/executor/celery.html'
+ 'https://airflow.apache.org/docs/stable/executor/celery.html'
),
subcommands=CELERY_COMMANDS,
),
diff --git a/airflow/providers/dingding/example_dags/example_dingding.py
b/airflow/providers/dingding/example_dags/example_dingding.py
index 907fc5e..9b7d5cc 100644
--- a/airflow/providers/dingding/example_dags/example_dingding.py
+++ b/airflow/providers/dingding/example_dags/example_dingding.py
@@ -181,17 +181,17 @@ with DAG(
"links": [
{
"title": "Airflow DAG feed card",
- "messageURL":
"https://airflow.readthedocs.io/en/latest/ui.html",
+ "messageURL":
"https://airflow.apache.org/docs/stable/ui.html",
"picURL": "http://airflow.apache.org/_images/dags.png",
},
{
"title": "Airflow tree feed card",
- "messageURL":
"https://airflow.readthedocs.io/en/latest/ui.html",
+ "messageURL":
"https://airflow.apache.org/docs/stable/ui.html",
"picURL": "http://airflow.apache.org/_images/tree.png",
},
{
"title": "Airflow graph feed card",
- "messageURL":
"https://airflow.readthedocs.io/en/latest/ui.html",
+ "messageURL":
"https://airflow.apache.org/docs/stable/ui.html",
"picURL": "http://airflow.apache.org/_images/graph.png",
},
]
diff --git a/airflow/utils/docs.py b/airflow/utils/docs.py
index f43652b..29e4526 100644
--- a/airflow/utils/docs.py
+++ b/airflow/utils/docs.py
@@ -23,7 +23,9 @@ from airflow import version
def get_docs_url(page: Optional[str] = None) -> str:
"""Prepare link to Airflow documentation."""
if "dev" in version.version:
- result = "https://airflow.readthedocs.io/en/latest/"
+ result = (
+
"http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/"
+ )
else:
result = f'https://airflow.apache.org/docs/{version.version}/'
if page:
diff --git a/dev/README_RELEASE_AIRFLOW.md b/dev/README_RELEASE_AIRFLOW.md
index 615687c..fd0ae67 100644
--- a/dev/README_RELEASE_AIRFLOW.md
+++ b/dev/README_RELEASE_AIRFLOW.md
@@ -575,9 +575,7 @@ https://pypi.python.org/pypi/apache-airflow
The documentation is available on:
https://airflow.apache.org/
-https://airflow.apache.org/1.10.2/
-https://airflow.readthedocs.io/en/1.10.2/
-https://airflow.readthedocs.io/en/stable/
+https://airflow.apache.org/docs/${VERSION}/
Find the CHANGELOG here for more details:
diff --git a/docs/conf.py b/docs/conf.py
index 4e48c46..ce8844e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -160,6 +160,7 @@ if PACKAGE_NAME == 'apache-airflow':
'howto/operator/microsoft/_partials',
'apache-airflow-providers-*/',
'apache-airflow-providers',
+ 'rtd-deprecation',
'README.rst',
] + glob.glob('apache-airflow-providers-*')
elif PACKAGE_NAME.startswith('apache-airflow-providers-'):
diff --git a/docs/exts/airflow_intersphinx.py b/docs/exts/airflow_intersphinx.py
index b42253d..b090092 100644
--- a/docs/exts/airflow_intersphinx.py
+++ b/docs/exts/airflow_intersphinx.py
@@ -87,7 +87,7 @@ def _generate_provider_intersphinx_mapping():
# will be fetched.
(
f'{DOCS_DIR}/_build/docs/apache-airflow/latest/objects.inv',
- 'https://airflow.readthedocs.io/en/latest/objects.inv',
+ f'{S3_DOC_URL}/docs/apache-airflow/latest/objects.inv',
),
)
diff --git a/docs/howto/operator/microsoft/transfer/blob_storage_to_gcs.rst
b/docs/howto/operator/microsoft/transfer/blob_storage_to_gcs.rst
index 12a7aac..3a52360 100644
--- a/docs/howto/operator/microsoft/transfer/blob_storage_to_gcs.rst
+++ b/docs/howto/operator/microsoft/transfer/blob_storage_to_gcs.rst
@@ -31,7 +31,7 @@ Please follow Azure
to do it.
TOKEN should be added to the Connection in Airflow in JSON format, Login and
Password as plain text.
-You can check `how to do such connection
<https://airflow.readthedocs.io/en/stable/howto/connection/index.html#editing-a-connection-with-the-ui>`_.
+You can check `how to do such connection
<https://airflow.apache.org/docs/stable/howto/connection/index.html#editing-a-connection-with-the-ui>`_.
See following example.
Set values for these fields:
diff --git a/docs/rtd-deprecation/404.html b/docs/rtd-deprecation/404.html
new file mode 100644
index 0000000..0091de5
--- /dev/null
+++ b/docs/rtd-deprecation/404.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <!-- Required meta tags -->
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
+
+ <!-- Bootstrap CSS -->
+ <link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
crossorigin="anonymous">
+
+ <title>Hello, world!</title>
+</head>
+<body>
+ <div class="container">
+
+ <div class="p-5 mt-5 bg-info text-white">
+ The documentation has been moved: <u><a class="text-white"
href="https://s.apache.org/airflow-docs/">s.apache.org/airflow-docs/</a></u>.<br>
+ For documentation for stable versions, see: <u><a class="text-white
text-" href="https://airflow.apache.org/docs/">airflow.apache.org</a></u>.
+ </div>
+ </div>
+ <script>
+ // "/en/latest/howto/operator/index.html" =>
"latest/howto/operator/index.html"
+ var path_without_lang = document.location.pathname.substr(4)
+ document.location
='http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/'
+ path_without_lang
+ </script>
+</body>
+</html>
diff --git a/.readthedocs.yml b/docs/rtd-deprecation/conf_rtd.py
similarity index 81%
copy from .readthedocs.yml
copy to docs/rtd-deprecation/conf_rtd.py
index 75eef40..5efcfb5 100644
--- a/.readthedocs.yml
+++ b/docs/rtd-deprecation/conf_rtd.py
@@ -14,14 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
----
-version: 2
-formats: []
-python:
- version: 3.7
- install:
- - method: pip
- path: .
- extra_requirements:
- - doc
- system_packages: true
+
+project = 'Apache Airflow'
+
+html_extra_path = ["404.html"]
diff --git a/docs/rtd-deprecation/index.rst b/docs/rtd-deprecation/index.rst
new file mode 100644
index 0000000..c4d487a
--- /dev/null
+++ b/docs/rtd-deprecation/index.rst
@@ -0,0 +1,23 @@
+ .. 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.
+
+Apache Airflow Documentation
+============================
+
+Documentation has been moved to the new address: `s.apache.org/airflow-docs
<https://s.apache.org/airflow-docs>`__
+
+For documentation for stable versions, see: `airflow.apache.org
<https://airflow.apache.org/docs/>`__
diff --git a/tests/providers/dingding/hooks/test_dingding.py
b/tests/providers/dingding/hooks/test_dingding.py
index d5d60e3..4938ded 100644
--- a/tests/providers/dingding/hooks/test_dingding.py
+++ b/tests/providers/dingding/hooks/test_dingding.py
@@ -185,17 +185,17 @@ class TestDingdingHook(unittest.TestCase):
"links": [
{
"title": "Airflow DAG feed card",
- "messageURL":
"https://airflow.readthedocs.io/en/latest/ui.html",
+ "messageURL":
"https://airflow.apache.org/docs/stable/ui.html",
"picURL": "http://airflow.apache.org/_images/dags.png",
},
{
"title": "Airflow tree feed card",
- "messageURL":
"https://airflow.readthedocs.io/en/latest/ui.html",
+ "messageURL":
"https://airflow.apache.org/docs/stable/ui.html",
"picURL": "http://airflow.apache.org/_images/tree.png",
},
{
"title": "Airflow graph feed card",
- "messageURL":
"https://airflow.readthedocs.io/en/latest/ui.html",
+ "messageURL":
"https://airflow.apache.org/docs/stable/ui.html",
"picURL": "http://airflow.apache.org/_images/graph.png",
},
]
diff --git a/tests/utils/test_docs.py b/tests/utils/test_docs.py
index 81d6a1d..3bcdb25 100644
--- a/tests/utils/test_docs.py
+++ b/tests/utils/test_docs.py
@@ -26,8 +26,18 @@ from airflow.utils.docs import get_docs_url
class TestGetDocsUrl(unittest.TestCase):
@parameterized.expand(
[
- ('2.0.0.dev0', None, 'https://airflow.readthedocs.io/en/latest/'),
- ('2.0.0.dev0', 'migration.html',
'https://airflow.readthedocs.io/en/latest/migration.html'),
+ (
+ '2.0.0.dev0',
+ None,
+
'http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/'
+ 'apache-airflow/latest/',
+ ),
+ (
+ '2.0.0.dev0',
+ 'migration.html',
+
'http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/'
+ 'apache-airflow/latest/migration.html',
+ ),
('1.10.0', None, 'https://airflow.apache.org/docs/1.10.0/'),
('1.10.0', 'migration.html',
'https://airflow.apache.org/docs/1.10.0/migration.html'),
]