You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/25 11:45:45 UTC

[GitHub] [flink] MartijnVisser opened a new pull request, #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

MartijnVisser opened a new pull request, #19571:
URL: https://github.com/apache/flink/pull/19571

   ## What is the purpose of the change
   
   As part of [FLINK-27393](https://issues.apache.org/jira/browse/FLINK-27393), the documentation of Elasticsearch will be moved to apache/flink-connector-elasticsearch
   
   However, we would still like to display the Elasticsearch documentation (which is then hosted outside of apache/flink) to appear in the same way this is currently done. This PR makes that possible. 
   
   
   ## Brief change log
   
   48a592b4983ec598cb35836394984e29bf2a0ac6 documents how you can add externally hosted documentation
   2ac2b34058256c67f9851bd5f38cd60ab29c6db3 removes the current Elasticsearch documentation
   7e8eae94ae4b3f3b535128f99621747d11b49fb1 updates the documentation build pipeline to make sure that the Elasticsearch documentation gets updated before building it
   7ac4ae9c49b037ea3b0637f3356245fc69699f35 adds the Elasticsearch documentation from https://github.com/apache/flink-connector-elasticsearch as a Hugo Module to the virtual Hugo mount/filesystem. Note: this doesn't yet work, since https://github.com/apache/flink-connector-elasticsearch/pull/12 is not merged yet. When that is merged, this commit needs to be updated. 
   
   ## Verifying this change
   
   You can verify that this change works by having Hugo installed and running `hugo config mounts`. You'll see something like:
   
   ```
   {
      "path": "github.com/apache/flink-connector-elasticsearch/docs",
      "version": "v0.0.0-20220425092437-8e4b91cb3984",
      "time": "2022-04-25T09:24:37Z",
      "owner": "github.com/apache/flink",
      "dir": "/var/folders/vy/p3hq5hts1wlbs4ycpxj82p5r0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!apache/flink-connector-elasticsearch/docs@v0.0.0-20220425092437-8e4b91cb3984/",
      "mounts": [
         {
            "source": "content",
            "target": "content"
         }
      ]
   }
   ```
   
   You can further verify this by building the documentation locally via the usual command (see `docs/README.md`)
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? documented in the Flink documentation README
   


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r859510133


##########
docs/build_docs.sh:
##########
@@ -24,5 +24,6 @@ then
 	exit 1
 fi
 git submodule update --init --recursive
-
+source ./setup_docs.sh

Review Comment:
   🤷 I'd say just running the script would be cleaner; in my mind source is a sort of import statement.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on PR #19571:
URL: https://github.com/apache/flink/pull/19571#issuecomment-1113108121

   > oh this doesn't even run in our ci image. then I guess you'll need to update the azure yaml as well.
   
   Based on https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md it does look like Go is installed. 
   
   The error `Error: module "github.com/apache/flink-connector-elasticsearch/docs" not found; either add it as a Hugo Module or store it in "/home/vsts/work/1/s/docs/themes".: module does not exist` also implies that the Hugo/Go command is actually executed. 
   
   I'll investigate what's going wrong


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862768062


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+# Display installed version of Go
+go version
+
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch="$1"
+
+echo "Current branch: $currentBranch"
+
+if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
+  # If the current branch is master or not provided, get the documentation from the main branch
+  echo "The current branch is not a release branch, so let's get documentation from the main branch"
+  if [ ! command -v hugo &> /dev/null ]; then
+    echo "Hugo is not installed"
+    Running "./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main"
+    ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main

Review Comment:
   I do think that makes sense yes. 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857867821


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   ~~I think we can actually live without this. When the documentation is built, it will be added by Hugo to this file, but it's not a prerequisite. If it's not there, it will just pull the latest, which is actually what we want.~~
   
   Curious on your opinion: we don't need it, if it's not there, Hugo will just pull the latest version (which is what we want). The documentation build pipeline specifies the branch, so that would work too I think. 
   
   However, adding this file to `.gitignore` would mean an extra step if we would like to do something like update the Go version (because the file won't be checked in anymore). What do you think we could do best?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857641210


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md

Review Comment:
   I do think it could be generalized to just have a folder for English and one for Chinese content



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858025694


##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,13 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the master branch
+  ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@$currentBranch

Review Comment:
   FYI this isn't gonna work because there is no master branch in flink-connector-elasticsearch.
   
   The beauty of different default branch names 🙈 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857625021


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md

Review Comment:
   I'll double check if it's not possible, this is more because this is the explicit method. I think it could be possible, because in one of my first attempts I didn't yet remove the Elasticsearch documentation from this repo. However, Hugo didn't have any issue in building it, it just used the local one first. 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858419194


##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,13 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the master branch
+  ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@$currentBranch

Review Comment:
   Ah darn. Fixed 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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858454247


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   We can't add a file to gitignore to ignore further modifications; it only ensures that a new file can't be tracked.
   So it's either we have no go.mod file at all, or we have the full thing.
   Maybe we could generate it on the fly during the docs build process? 🤔 
   



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r859510751


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   Please make sure to also add the .gitignore entries to the other release branches after merging.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858566738


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   That was a good idea. I'm now creating a default `go.mod` file in the steps where it's necessary and I've added these files to the .gitignore



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] JingGe commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
JingGe commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857553242


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md
+      lang: en
+    - source: content.zh/docs/connectors/datastream/<filename>.md
+      target: content.zh/docs/connectors/datastream/<filename>.md
+      lang: zh
+    - source: content.zh/docs/connectors/table/<filename>.md
+      target: content.zh/docs/connectors/table/<filename>.md
+      lang: zh
+```
+
+Replace <filename> with the name of the file you want to include in the documentation.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/config.toml for an example.

Review Comment:
   Not sure if I did something wrong, I got 404 with this link.



##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md

Review Comment:
   It seems that `source` and `target` are identical. The effort is big if there are many md files. Is Hugo smart enough to work without the yaml or only with `source` in this case(target contains redundant info)?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857873472


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:

Review Comment:
   Hugo Modules are the generic building blocks: `Hugo Modules are the core building blocks in Hugo. A module can be your main project or a smaller module providing one or more of the 7 component types defined in Hugo: static, content, layouts, data, assets, i18n, and archetypes.` See https://gohugo.io/hugo-modules/
   
   Hugo Mount is a configuration option of a Hugo Module: https://gohugo.io/hugo-modules/configuration/#module-config-mounts



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862766972


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+pipelinerun="$1"
+
+# Determine if script is called by pipeline to determine correct path for go.mod file
+if [[ $pipelinerun == "pipeline" ]]; then

Review Comment:
   🙈 that's just way easier. Fixed



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862819364


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+# Display installed version of Go
+go version
+
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch="$1"
+
+echo "Current branch: $currentBranch"
+
+if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
+  # If the current branch is master or not provided, get the documentation from the main branch
+  echo "The current branch is not a release branch, so let's get documentation from the main branch"
+  if [ ! command -v hugo &> /dev/null ]; then
+    echo "Hugo is not installed"
+    Running "./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main"
+    ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main

Review Comment:
   Let's do that in a follow-up then.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r861110119


##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,14 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the main branch

Review Comment:
   ```suggestion
   ```



##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,14 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the main branch
+  ./setup_docs.sh
+

Review Comment:
   ```suggestion
   ```



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on PR #19571:
URL: https://github.com/apache/flink/pull/19571#issuecomment-1112439000

   guess go is indeed missing in the CI images; will prepare an update


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862724688


##########
tools/ci/docs.sh:
##########
@@ -28,10 +28,11 @@ fi
 tar -zxvf $HUGO_ARTIFACT
 
 git submodule update --init --recursive
+# Setup the external documentation modules
+source docs/setup_docs.sh "pipeline"
 ./hugo --source docs
 
 if [ $? -ne 0 ]; then
 	echo "Error building the docs"
 	exit 1
 fi
-

Review Comment:
   revert?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857867821


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   I think we can actually live without this. When the documentation is built, it will be added by Hugo to this file, but it's not a prerequisite. If it's not there, it will just pull the latest, which is actually what we want.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862818185


##########
tools/ci/docs.sh:
##########
@@ -28,10 +28,11 @@ fi
 tar -zxvf $HUGO_ARTIFACT
 
 git submodule update --init --recursive
+# Setup the external documentation modules
+source docs/setup_docs.sh "pipeline"
 ./hugo --source docs
 
 if [ $? -ne 0 ]; then
 	echo "Error building the docs"
 	exit 1
 fi
-

Review Comment:
   you removed a line.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862642229


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+# Display installed version of Go
+go version
+
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch="$1"
+
+echo "Current branch: $currentBranch"
+
+if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
+  # If the current branch is master or not provided, get the documentation from the main branch
+  echo "The current branch is not a release branch, so let's get documentation from the main branch"
+  if [ ! command -v hugo &> /dev/null ]; then

Review Comment:
   `command -v hugo &> /dev/null` always returns 0.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862819931


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+HERE=` basename "$PWD"`
+if [[ "$HERE" != "docs" ]]; then
+    echo "Please only execute in the docs/ directory";
+    exit 1;
+fi
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+echo "Created temporary file" $goModFileLocation/go.mod
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch=$(git branch --show-current)

Review Comment:
   Please create a follow-up ticket to derive this variable from `docs/config.toml#branch`.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857871231


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md

Review Comment:
   Just to confirm: you can. If the file exists in both this repo and an external repo, the file in this repo has priority over the external one.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857624901


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:

Review Comment:
   What's the difference in mounting and importing hugo modules?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857623653


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   From my experience, the go.mod reference is static. The `hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs` comment is the one that actually checks if there's a new version, which would be included in a `go.sum` file. That one is not checked in. 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857860887


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md

Review Comment:
   Just to confirm, I've managed to generalize it in such a way that all content from either the `content` or `content.zh` folder will be mapped. The PR is updated accordingly. 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on PR #19571:
URL: https://github.com/apache/flink/pull/19571#issuecomment-1110108757

   > Is that so?
   
   yes. Building it locally failed for me until I installed go. That means we also have to double-check that hugo is installed in the CI images (which may or may not be related to the current CI failures).


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857623315


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md

Review Comment:
   I'm just gonna assume we can't just set both source/target to `content` because it would ignore all the Flink-local content?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857616436


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   does it really make to commit such a go.mod file? aren't the date/sha references gonna change all the time?



##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   does it really make sense to commit such a go.mod file? aren't the date/sha references gonna change all the time?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858829347


##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,14 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the main branch
+  ./setup_docs.sh
+  ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main

Review Comment:
   how about moving this into setup_docs.sh as well?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862643520


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+# Display installed version of Go
+go version
+
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch="$1"
+
+echo "Current branch: $currentBranch"
+
+if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
+  # If the current branch is master or not provided, get the documentation from the main branch
+  echo "The current branch is not a release branch, so let's get documentation from the main branch"
+  if [ ! command -v hugo &> /dev/null ]; then

Review Comment:
   ```suggestion
     if [ ! $(command -v hugo) != "" ]; then
   ```
   try this



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on PR #19571:
URL: https://github.com/apache/flink/pull/19571#issuecomment-1114924878

   Build passed locally, most likely the failure was related to a flaky test. Passing build: https://dev.azure.com/martijn0323/Flink/_build/results?buildId=2343&view=results


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser merged pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser merged PR #19571:
URL: https://github.com/apache/flink/pull/19571


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on PR #19571:
URL: https://github.com/apache/flink/pull/19571#issuecomment-1109915301

   > It's unfortunate that everyone now needs to install `go` to build the docs
   
   Is that so? I believe that if you use the Hugo Docker Image, it uses the Hugo installation from there which works. But then again, I've only tested it on my machine which indeed does have `go` installed. 


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858835514


##########
docs/build_docs.sh:
##########
@@ -24,5 +24,6 @@ then
 	exit 1
 fi
 git submodule update --init --recursive
-
+source ./setup_docs.sh

Review Comment:
   No, I just searched if `source` was used elsewhere in the Flink codebase and saw it was, so used that. Any preference from your end?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862834393


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+HERE=` basename "$PWD"`
+if [[ "$HERE" != "docs" ]]; then
+    echo "Please only execute in the docs/ directory";
+    exit 1;
+fi
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+echo "Created temporary file" $goModFileLocation/go.mod
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch=$(git branch --show-current)

Review Comment:
   https://issues.apache.org/jira/browse/FLINK-27474



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862719926


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+pipelinerun="$1"
+
+# Determine if script is called by pipeline to determine correct path for go.mod file
+if [[ $pipelinerun == "pipeline" ]]; then

Review Comment:
   ... why not just always call this from the docs directory (and enforce 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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857686481


##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,13 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the master branch
+  ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@$currentBranch

Review Comment:
   Yes. I deliberately included it, to make sure that documentation can also be build for release branches in the near future. 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] flinkbot commented on pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19571:
URL: https://github.com/apache/flink/pull/19571#issuecomment-1108470025

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7ac4ae9c49b037ea3b0637f3356245fc69699f35",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7ac4ae9c49b037ea3b0637f3356245fc69699f35",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7ac4ae9c49b037ea3b0637f3356245fc69699f35 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858454247


##########
docs/go.mod:
##########
@@ -0,0 +1,8 @@
+module github.com/apache/flink
+
+go 1.18
+
+require (
+	github.com/apache/flink-connector-elasticsearch v0.0.0-20220406114754-ce4058113b37 // indirect
+	github.com/apache/flink-connector-elasticsearch/docs v0.0.0-20220425092437-8e4b91cb3984 // indirect

Review Comment:
   We can't add a file to gitignore to ignore further modifications; it only ensures that a new file can't be tracked.
   So it's either we have no go.mod file at all, or we have the full thing.
   Maybe we could generate it on the fly during the docs build process? 🤔  (and add it to .gitignore)
   



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857611018


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md
+      lang: en
+    - source: content.zh/docs/connectors/datastream/<filename>.md
+      target: content.zh/docs/connectors/datastream/<filename>.md
+      lang: zh
+    - source: content.zh/docs/connectors/table/<filename>.md
+      target: content.zh/docs/connectors/table/<filename>.md
+      lang: zh
+```
+
+Replace <filename> with the name of the file you want to include in the documentation.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/config.toml for an example.

Review Comment:
   That's because the ES side is also still in the draft stage. https://github.com/apache/flink-connector-elasticsearch/pull/13



##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md
+      lang: en
+    - source: content.zh/docs/connectors/datastream/<filename>.md
+      target: content.zh/docs/connectors/datastream/<filename>.md
+      lang: zh
+    - source: content.zh/docs/connectors/table/<filename>.md
+      target: content.zh/docs/connectors/table/<filename>.md
+      lang: zh
+```
+
+Replace <filename> with the name of the file you want to include in the documentation.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/config.toml for an example.

Review Comment:
   That's because the ES side isn't merged yet. https://github.com/apache/flink-connector-elasticsearch/pull/13



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857614183


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md

Review Comment:
   sounds like something that you can auto-generate quite easily.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r858824392


##########
docs/build_docs.sh:
##########
@@ -24,5 +24,6 @@ then
 	exit 1
 fi
 git submodule update --init --recursive
-
+source ./setup_docs.sh

Review Comment:
   is there a particular reason why this one uses `source`?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] MartijnVisser commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862767191


##########
tools/ci/docs.sh:
##########
@@ -28,10 +28,11 @@ fi
 tar -zxvf $HUGO_ARTIFACT
 
 git submodule update --init --recursive
+# Setup the external documentation modules
+source docs/setup_docs.sh "pipeline"
 ./hugo --source docs
 
 if [ $? -ne 0 ]; then
 	echo "Error building the docs"
 	exit 1
 fi
-

Review Comment:
   I haven't changed anything here? 



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862638444


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+# Display installed version of Go
+go version
+
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch="$1"
+
+echo "Current branch: $currentBranch"
+
+if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
+  # If the current branch is master or not provided, get the documentation from the main branch
+  echo "The current branch is not a release branch, so let's get documentation from the main branch"
+  if [ ! command -v hugo &> /dev/null ]; then
+    echo "Hugo is not installed"
+    Running "./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main"
+    ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main

Review Comment:
   should we just migrate the docs build to our CI images as well? Then we can streamline this whole thing.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857626336


##########
.github/workflows/docs.sh:
##########
@@ -31,6 +31,13 @@ if ! curl --fail -OL $HUGO_REPO ; then
 fi
 tar -zxvf $HUGO_ARTIFACT
 git submodule update --init --recursive
+# retrieve latest documentation from external connector repositories
+currentBranch=$(git branch --show-current)
+if [[ "$currentBranch" = "master" ]]; then
+  # The Elasticsearch documentation is currently only available on the master branch
+  ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@$currentBranch

Review Comment:
   The explicit reference to the es repo is needed to select the branch, correct?



-- 
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: issues-unsubscribe@flink.apache.org

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