From 5472fe260464f96e71d99a72377d8a43bc1add64 Mon Sep 17 00:00:00 2001 From: Charlie Stanley Date: Tue, 23 Feb 2021 15:32:14 -0800 Subject: [PATCH] Adding automatic link validation --- .github/workflows/link_validation.yaml | 29 +++++++++++++++++++ daprdocs/content/en/concepts/faq.md | 2 +- .../en/contributing/contributing-overview.md | 2 +- .../setup-pubsub/pubsub-namespaces.md | 4 +-- .../azure-keyvault-managed-identity.md | 2 +- .../supported-state-stores/setup-redis.md | 2 +- .../self-hosted/self-hosted-no-docker.md | 4 +-- 7 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/link_validation.yaml diff --git a/.github/workflows/link_validation.yaml b/.github/workflows/link_validation.yaml new file mode 100644 index 000000000..e0bcbfae7 --- /dev/null +++ b/.github/workflows/link_validation.yaml @@ -0,0 +1,29 @@ +name: validate-links + +on: + push: + branches: + - v* + tags: + - v* + pull_request: + branches: + - v* +jobs: + validate: + runs-on: ubuntu-latest + env: + PYTHON_VER: 3.7 + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ env.PYTHON_VER }} + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VER }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip3 install setuptools wheel twine tox mechanical-markdown + - name: Check Markdown Files + run: | + for name in `find . -name "*.md"`; do echo -e "------\n$name" ; mm.py -l $name || exit 1 ;done diff --git a/daprdocs/content/en/concepts/faq.md b/daprdocs/content/en/concepts/faq.md index aaad28c0b..8106ef646 100644 --- a/daprdocs/content/en/concepts/faq.md +++ b/daprdocs/content/en/concepts/faq.md @@ -36,7 +36,7 @@ The Dapr project is focused on performance due to the inherent discussion of Dap ### What is the relationship between Dapr, Orleans and Service Fabric Reliable Actors? The actors in Dapr are based on the same virtual actor concept that [Orleans](https://www.microsoft.com/research/project/orleans-virtual-actors/) started, meaning that they are activated when called and deactivated after a period of time. If you are familiar with Orleans, Dapr C# actors will be familiar. Dapr C# actors are based on [Service Fabric Reliable Actors](https://docs.microsoft.com/azure/service-fabric/service-fabric-reliable-actors-introduction) (which also came from Orleans) and enable you to take Reliable Actors in Service Fabric and migrate them to other hosting platforms such as Kubernetes or other on-premise environments. -Also Dapr is about more than just actors. It provides you with a set of best practice building blocks to build into any microservices application. See [Dapr overview](https://github.com/dapr/docs/blob/master/overview/README.md). +Also Dapr is about more than just actors. It provides you with a set of best practice building blocks to build into any microservices application. See [Dapr overview]({{< ref overview.md >}}). ### Differences between Dapr from an actor framework diff --git a/daprdocs/content/en/contributing/contributing-overview.md b/daprdocs/content/en/contributing/contributing-overview.md index cc9c81cd2..c8b72c60b 100644 --- a/daprdocs/content/en/contributing/contributing-overview.md +++ b/daprdocs/content/en/contributing/contributing-overview.md @@ -38,7 +38,7 @@ Before you submit an issue, make sure you've checked the following: - 👎 down-vote 1. For bugs - Check it's not an environment issue. For example, if running on Kubernetes, make sure prerequisites are in place. (state stores, bindings, etc.) - - You have as much data as possible. This usually comes in the form of logs and/or stacktrace. If running on Kubernetes or other environment, look at the logs of the Dapr services (runtime, operator, placement service). More details on how to get logs can be found [here](https://github.com/dapr/docs/tree/master/best-practices/troubleshooting/logs.md). + - You have as much data as possible. This usually comes in the form of logs and/or stacktrace. If running on Kubernetes or other environment, look at the logs of the Dapr services (runtime, operator, placement service). More details on how to get logs can be found [here]({{< ref "logs-troubleshooting.md" >}}). 1. For proposals - Many changes to the Dapr runtime may require changes to the API. In that case, the best place to discuss the potential feature is the main [Dapr repo](https://github.com/dapr/dapr). - Other examples could include bindings, state stores or entirely new components. diff --git a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md index fa186b403..a845e545b 100644 --- a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md +++ b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md @@ -43,7 +43,7 @@ kubectl create namespace namespace-a kubectl config set-context --current --namespace=namespace-a ``` -Install Redis (master and slave) on `namespace-a`, following [these instructions](https://github.com/dapr/docs/blob/master/howto/setup-pub-sub-message-broker/setup-redis.md). +Install Redis (master and slave) on `namespace-a`, following [these instructions]({{< ref "configure-state-pubsub.md" >}}). Now, configure `deploy/redis.yaml`, paying attention to the hostname containing `namespace-a`. @@ -125,4 +125,4 @@ kubectl delete namespace namespace-b - [Scope components to one or more applications]({{< ref "component-scopes.md" >}}) - [Use secret scoping]({{< ref "secrets-scopes.md" >}}) -- [Limit the secrets that can be read from secret stores]({{< ref "secret-scope.md" >}}) \ No newline at end of file +- [Limit the secrets that can be read from secret stores]({{< ref "secret-scope.md" >}}) diff --git a/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md b/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md index a95890410..fa1e015fe 100644 --- a/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md +++ b/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md @@ -78,7 +78,7 @@ The above example uses secrets as plain strings. It is recommended to use a loca ```bash az aks show -g -n ``` - For more detail about the roles to assign to integrate AKS with Azure Services [Role Assignment](https://github.com/Azure/aad-pod-identity/blob/master/docs/readmes/README.role-assignment.md). + For more detail about the roles to assign to integrate AKS with Azure Services [Role Assignment](https://azure.github.io/aad-pod-identity/docs/getting-started/role-assignment/). 4. Retrieve Managed Identity ID diff --git a/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md b/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md index 79810ee1f..bfdd6f94a 100644 --- a/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md +++ b/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md @@ -112,7 +112,7 @@ We can use [Helm](https://helm.sh/) to quickly create a Redis instance in our Ku 4. Once your instance is created, you'll need to grab the Host name (FQDN) and your access key. - for the Host name navigate to the resources "Overview" and copy "Host name" - for your access key navigate to "Access Keys" under "Settings" and copy your key. -5. Finally, we need to add our key and our host to a `redis.yaml` file that Dapr can apply to our cluster. If you're running a sample, you'll add the host and key to the provided `redis.yaml`. If you're creating a project from the ground up, you'll create a `redis.yaml` file as specified in [Configuration](#configuration). Set the `redisHost` key to `[HOST NAME FROM PREVIOUS STEP]:6379` and the `redisPassword` key to the key you copied in step 4. **Note:** In a production-grade application, follow [secret management](https://github.com/dapr/docs/blob/master/concepts/components/secrets.md) instructions to securely manage your secrets. +5. Finally, we need to add our key and our host to a `redis.yaml` file that Dapr can apply to our cluster. If you're running a sample, you'll add the host and key to the provided `redis.yaml`. If you're creating a project from the ground up, you'll create a `redis.yaml` file as specified in [Configuration](#configuration). Set the `redisHost` key to `[HOST NAME FROM PREVIOUS STEP]:6379` and the `redisPassword` key to the key you copied in step 4. **Note:** In a production-grade application, follow [secret management]({{< ref component-secrets.md >}}) instructions to securely manage your secrets. > **NOTE:** Dapr pub/sub uses [Redis Streams](https://redis.io/topics/streams-intro) that was introduced by Redis 5.0, which isn't currently available on Azure Managed Redis Cache. Consequently, you can use Azure Managed Redis Cache only for state persistence. {{% /codetab %}} diff --git a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md index 4c550ad06..355452b3a 100644 --- a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md +++ b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md @@ -51,9 +51,9 @@ INFO[0001] leader is established. instance=Nicoletaz-L10. ``` -From here on you can follow the sample example created for the [java-sdk](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/actors/http), [python-sdk](https://github.com/dapr/python-sdk/tree/master/examples/demo_actor) or [dotnet-sdk](https://github.com/dapr/dotnet-sdk/tree/master/samples/Actor) for running an application with Actors enabled. +From here on you can follow the sample example created for the [java-sdk](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/actors), [python-sdk](https://github.com/dapr/python-sdk/tree/master/examples/demo_actor) or [dotnet-sdk]({{< ref "dotnet-actor-howto.md" >}}) for running an application with Actors enabled. -Update the state store configuration files to have the Redis host and password match the setup that you have. Additionally to enable it as a actor state store have the metadata piece added similar to the [sample Java Redis component](https://github.com/dapr/java-sdk/blob/master/examples/components/redis.yaml) definition. +Update the state store configuration files to have the Redis host and password match the setup that you have. Additionally to enable it as a actor state store have the metadata piece added similar to the [sample Java Redis component](https://github.com/dapr/java-sdk/blob/master/examples/components/state/redis.yaml) definition. ```yaml - name: actorStateStore