Skip to content

Commit

Permalink
run link validator job (#114)
Browse files Browse the repository at this point in the history
try to fix link validator

akka refs
  • Loading branch information
pjfanning authored Aug 2, 2023
1 parent 8b949c8 commit abd24c2
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/link-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Link Validator

permissions: {}

on:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'

jobs:
validate-links:
runs-on: ubuntu-20.04
if: github.repository == 'apache/incubator-pekko-management'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout GitHub merge
if: github.event.pull_request
run: |-
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Cache Coursier cache
uses: coursier/[email protected]

- name: Setup Coursier
uses: coursier/[email protected]

- name: Create the Pekko site
run: sbt "unidoc; docs/paradox"

- name: Run Link Validator
run: cs launch net.runne::site-link-validator:0.2.2 -- scripts/link-validator.conf
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ lazy val docs = project
"scaladoc.pekko.base_url" -> s"https://pekko.apache.org/api/pekko/current/",
"extref.pekko-http.base_url" -> s"https://pekko.apache.org/docs/pekko-http/current/%s",
"scaladoc.pekko.http.base_url" -> s"https://pekko.apache.org/api/pekko-http/current/",
"extref.pekko-grpc.base_url" -> s"https://pekko.apache.org/docs/pekko-grpc/current/%s",
"scaladoc.akka.management.base_url" -> s"/${(Preprocess / siteSubdirName).value}/"),
"extref.pekko-grpc.base_url" -> s"https://pekko.apache.org/docs/pekko-grpc/current/%s"),
Compile / paradoxMarkdownToHtml / sourceGenerators += Def.taskDyn {
val targetFile = (Compile / paradox / sourceManaged).value / "license-report.md"

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/bootstrap/istio.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To bootstrap a Pekko cluster in Istio, Istio must be configured to allow Pekko c

It is important to be aware that since Istio's proxy is bypassed, the Pekko cluster communication will not be secured by Istio using TLS. If you wish to secure your cluster communication, you will need to configure [Pekko remoting with mTLS](https://pekko.apache.org/docs/pekko/current/remoting-artery.html#remote-security) yourself.

Booting a Pekko cluster in Istio requires a minimum Istio version of 1.2.0, as it requires the outbound port exclusions feature that was added in there. It also requires using the @ref[Kubernetes API](kubernetes-api.md) contact point discovery method to be used. The instructions below are for the additional configuration necessary to ensure an Akka cluster can be bootstrapped in Istio.
Booting a Pekko cluster in Istio requires a minimum Istio version of 1.2.0, as it requires the outbound port exclusions feature that was added in there. It also requires using the @ref[Kubernetes API](kubernetes-api.md) contact point discovery method to be used. The instructions below are for the additional configuration necessary to ensure a Pekko cluster can be bootstrapped in Istio.

## Allowing outbound communication

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/discovery/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:

### Role-Based Access Control

If your Kubernetes cluster has [Role-Based Access Control (RBAC)](https://kubernetes.io/docs/admin/authorization/rbac/)
If your Kubernetes cluster has [Role-Based Access Control (RBAC)](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
enabled, you'll also have to grant the Service Account that your pods run under access to list pods. The following
configuration can be used as a starting point. It creates a `Role`, `pod-reader`, which grants access to query pod
information. It then binds the default Service Account to the `Role` by creating a `RoleBinding`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To build and publish the image run the following. The Docker username and regist

Note that the registry to push to must include the username, for example `-Ddocker.registry=docker.io/youruser`.

Security information (i.e. user and password) can be specified in multiple ways as described in section [docker-maven-plugin authentication](http://dmp.fabric8.io/#authentication).
Security information (i.e. user and password) can be specified in multiple ways as described in section [docker-maven-plugin authentication](https://dmp.fabric8.io/#authentication).

```
mvn -Ddocker.username=<user> -Ddocker.registry=<registry>/<user> package docker:push
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/kubernetes-deployment/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ for 'hello world':

kubectl expose deployment appka --type=LoadBalancer --name=appka-service

You can inspect the Pekko Cluster membership status with the [Cluster HTTP Management](https://doc.pekko.io/docs/pekko-management/current/cluster-http-management.html).
You can inspect the Pekko Cluster membership status with the @ref:[Cluster HTTP Management](../cluster-http-management.md).

curl http://127.0.0.1:7626/cluster/members/

Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
Here are a few things to note:
* We're using a Kubernetes deployment. Deployments are logical groupings of pods that represent a single service using the same template.
They support [configurable rolling updates](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#deploymentstrategy-v1-apps),
They support [configurable rolling updates](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/),
meaning the cluster will be gradually upgraded, rather than upgrading every node at once and incurring an outage.
* We label the pod in the `template` with `app: appka`. This must match the ActorSystem name so that @ref[Pekko Bootstrap](../bootstrap/index.md) finds the other nodes in the cluster.
* The image we're using is `pekko-sample-cluster-kubernetes:latest`. This corresponds to the name and version of the service in our build.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/loglevels/logback.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Dynamic Log Levels for Logback hooks into Pekko Management and provides a route

@@project-info{ projectId="management-loglevels-logback" }

Requires @ref:[Pekko Management](../pekko-management.md) and that the application uses [Logback](http://logback.qos.ch) as logging backend.
Requires @ref:[Pekko Management](../pekko-management.md) and that the application uses [Logback](https://logback.qos.ch) as logging backend.

@@dependency[sbt,Gradle,Maven] {
symbol1=PekkoManagementVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import scala.util.Random
* INTERNAL API
* Convenience methods to ease building an SSLContext from k8s-provided PEM files.
*/
// Duplicate from https://github.com/akka/akka/blob/31f654768f86db68f4c22daa2cbd0bae28fc1fad/akka-remote/src/main/scala/akka/remote/artery/tcp/ssl/PemManagersProvider.scala#L35
// Duplicate from https://github.com/apache/incubator-pekko/blob/964dcf53eb9a81a65944a1b1d51575091fe0a031/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala
// Eventually that will be a bit more open and we can reuse the class from Pekko in pekko-management.
// See also https://github.com/akka/akka-http/issues/3772
@InternalApi
Expand Down
86 changes: 86 additions & 0 deletions scripts/link-validator.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// config for https://github.com/ennru/site-link-validator/
site-link-validator {
root-dir = "docs/target/paradox/site/main/"
# relative to `root-dir`
start-file = "index.html"

# Resolves URLs with the given prefix as local files instead
link-mappings = [
{
prefix = "https://pekko.apache.org/docs/pekko/current/"
replace = ""
}
# ScalaDoc from unidoc
{
prefix = "https://pekko.apache.org/api/pekko-management/current/"
replace = "/../../../../../target/scala-2.13/unidoc/"
}
{
prefix = "https://pekko.apache.org/api/pekko-management/current/"
replace = "/../../../../../target/scala-2.13/unidoc/"
}
{
prefix = "https://pekko.apache.org/api/pekko-management/snapshot/"
replace = "/../../../../../target/scala-2.13/unidoc/"
}
]

ignore-missing-local-files-regex = ""
// e.g. "^api/alpakka/snapshot/pekko/stream/alpakka/googlecloud/storage/impl/Formats.*"

ignore-prefixes = [
# example in docs
"http://127.0.0.1"
# Fails after a number of requests with "403 Forbidden"
"https://javadoc.io/static/"
# GitHub will block with "429 Too Many Requests"
"https://github.com/"
# Github links generated by sbt-license-report
"http://github.com/"
# Other links generated by sbt-license-report
"http://asm.objectweb.org/"
"http://groovy.codehaus.org/"
"http://www.mockito.org"
"https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html"
# Occasionally returns a 500 Internal Server Error
"http://code.google.com/"
]

non-https-whitelist = [
# license report
"http://ant.apache.org/"
"http://asm.objectweb.org/"
"http://asm.ow2.io/"
"http://commons.apache.org/"
"http://ezmorph.sourceforge.net"
"http://findbugs.sourceforge.net/"
"http://groovy.codehaus.org/modules/http-builder/"
"http://hamcrest.org/JavaHamcrest/"
"http://hc.apache.org/"
"http://jopt-simple.github.io/jopt-simple"
"http://json-lib.sourceforge.net"
"http://junit.org"
"http://maven.apache.org"
"http://nekohtml.sourceforge.net/"
"http://opensource.org/"
"http://parboiled.org"
"http://servlet-spec.java.net"
"http://wiremock.org"
"http://www.apache.org/license/"
"http://www.apache.org/licenses/"
"http://www.eclipse.org/legal/epl-v10.html"
"http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
"http://www.jetbrains.org"
"http://www.joda.org/joda-time/"
"http://www.mockito.org"
"http://www.opensource.org/licenses/bsd-license.php"
"http://www.opensource.org/licenses/mit-license.php"
"http://www.reactive-streams.org/"
"http://www.scala-lang.org/"
"http://www.scalatest.org"
"http://www.slf4j.org"
"http://xerces.apache.org/xerces2-j"
"http://xml.apache.org/"
]

}

0 comments on commit abd24c2

Please sign in to comment.