From fa87b683d985b1163c1a8ed5c5d7121e93a8e673 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:44:26 +0200 Subject: [PATCH 1/6] docs: revise URL structure (libraries) --- .github/workflows/link-validator.yml | 46 +++++++++++++++++++ .../src/main/paradox/guide/4-deploying.md | 2 +- .../paradox/guide/6-deploying-the-services.md | 2 +- .../src/main/resources/reference.conf | 2 +- .../src/main/resources/reference.conf | 2 +- build.sbt | 32 +++++++------ docs/release-train-issue-template.md | 7 ++- docs/src/main/paradox/actor.md | 2 +- docs/src/main/paradox/cassandra.md | 4 +- docs/src/main/paradox/classic.md | 6 +-- docs/src/main/paradox/durable-state.md | 4 +- docs/src/main/paradox/eventsourced.md | 6 +-- .../getting-started/event-generator-app.md | 2 +- .../getting-started/running-cluster.md | 4 +- .../main/paradox/getting-started/running.md | 6 +-- .../paradox/getting-started/setup-your-app.md | 4 +- .../getting-started/source-provider.md | 2 +- .../main/paradox/getting-started/testing.md | 4 +- ...rpc-replicated-event-sourcing-transport.md | 2 +- docs/src/main/paradox/jdbc.md | 2 +- docs/src/main/paradox/overview.md | 6 +-- docs/src/main/paradox/projection-settings.md | 2 +- docs/src/main/paradox/running.md | 12 ++--- docs/src/main/paradox/slick.md | 2 +- docs/src/main/paradox/snapshots.md | 2 +- docs/src/main/paradox/testing.md | 2 +- .../java/jdocs/guide/EventGeneratorApp.java | 2 +- .../scala/docs/guide/EventGeneratorApp.scala | 2 +- project/Common.scala | 9 +++- project/Dependencies.scala | 8 +++- project/plugins.sbt | 2 +- project/project-info.conf | 4 -- samples/grpc/iot-service-rs/README.md | 4 +- scripts/link-validator.conf | 8 ++-- 34 files changed, 131 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/link-validator.yml diff --git a/.github/workflows/link-validator.yml b/.github/workflows/link-validator.yml new file mode 100644 index 000000000..087ac7bc5 --- /dev/null +++ b/.github/workflows/link-validator.yml @@ -0,0 +1,46 @@ +name: Link Validator + +on: + workflow_dispatch: + pull_request: + schedule: + - cron: '0 5 1 * *' + +permissions: + contents: read + +jobs: + validate-links: + runs-on: ubuntu-22.04 + if: github.event.repository.fork == false + steps: + - name: Checkout + # https://github.com/actions/checkout/releases + # v4.1.1 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + with: + # See https://github.com/actions/checkout/issues/299#issuecomment-677674415 + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 100 + + - name: Fetch tags + run: git fetch --depth=100 origin +refs/tags/*:refs/tags/* + + - name: Cache Coursier cache + # https://github.com/coursier/cache-action/releases + # v6.4.5 + uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d + + - name: Set up JDK 17 + # https://github.com/coursier/setup-action/releases + # v1.3.5 + uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f + with: + jvm: temurin:1.17.0.5 + apps: cs + + - name: Create all API docs for artifacts/website and all reference docs + run: sbt "unidoc; docs/paradox; akka-distributed-cluster-docs/paradox; akka-edge-docs/paradox" + + - name: Run Link Validator + run: cs launch net.runne::site-link-validator:0.2.5 -- scripts/link-validator.conf diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/4-deploying.md b/akka-distributed-cluster-docs/src/main/paradox/guide/4-deploying.md index dcf3d14b8..958c6542b 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/4-deploying.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/4-deploying.md @@ -203,7 +203,7 @@ There are many alternatives for secure access with a load balancer. An incomplet * [Linkerd multi-cluster](https://linkerd.io/2.13/features/multicluster/) Mutual authentication with TLS (mTLS) can be very useful where only other known services are allowed to interact with -a service, and public access should be denied. See [Akka gRPC documentation](https://doc.akka.io/docs/akka-grpc/current/mtls.html). +a service, and public access should be denied. See [Akka gRPC documentation](https://doc.akka.io/libraries/akka-grpc/current/mtls.html). We are going to use a network load balancer for simplicity of this example, and we are not using TLS. Real applications would of course require TLS. diff --git a/akka-edge-docs/src/main/paradox/guide/6-deploying-the-services.md b/akka-edge-docs/src/main/paradox/guide/6-deploying-the-services.md index c4e90f8ee..b8731eafe 100644 --- a/akka-edge-docs/src/main/paradox/guide/6-deploying-the-services.md +++ b/akka-edge-docs/src/main/paradox/guide/6-deploying-the-services.md @@ -194,7 +194,7 @@ There are many alternatives for secure access with a load balancer. An incomplet * [Linkerd multi-cluster](https://linkerd.io/2.13/features/multicluster/) Mutual authentication with TLS (mTLS) can be very useful where only other known services are allowed to interact with -a service, and public access should be denied. See [Akka gRPC documentation](https://doc.akka.io/docs/akka-grpc/current/mtls.html). +a service, and public access should be denied. See [Akka gRPC documentation](https://doc.akka.io/libraries/akka-grpc/current/mtls.html). We are going to use a network load balancer for simplicity of this example, and we are not using TLS. Real applications would of course require TLS. diff --git a/akka-projection-core/src/main/resources/reference.conf b/akka-projection-core/src/main/resources/reference.conf index 9da9d492a..9325145a3 100644 --- a/akka-projection-core/src/main/resources/reference.conf +++ b/akka-projection-core/src/main/resources/reference.conf @@ -6,7 +6,7 @@ akka.projection { # The configuration to use to restart the projection after an underlying streams failure # The Akka streams restart source is used to facilitate this behaviour # See the streams documentation for more details - # https://doc.akka.io/docs/akka/current/stream/stream-error.html#delayed-restarts-with-a-backoff-operator + # https://doc.akka.io/libraries/akka-core/current/stream/stream-error.html#delayed-restarts-with-a-backoff-operator restart-backoff { min-backoff = 3s max-backoff = 30s diff --git a/akka-projection-grpc/src/main/resources/reference.conf b/akka-projection-grpc/src/main/resources/reference.conf index 30b296691..6079c729c 100644 --- a/akka-projection-grpc/src/main/resources/reference.conf +++ b/akka-projection-grpc/src/main/resources/reference.conf @@ -6,7 +6,7 @@ akka.projection.grpc { # if creating the GrpcQuerySettings programmatically these settings are ignored # Configuration of gRPC client. - # See https://doc.akka.io/docs/akka-grpc/current/client/configuration.html#by-configuration + # See https://doc.akka.io/libraries/akka-grpc/current/client/configuration.html#by-configuration client = ${akka.grpc.client."*"} client { } diff --git a/build.sbt b/build.sbt index ca78eff5e..8a2100c78 100644 --- a/build.sbt +++ b/build.sbt @@ -190,7 +190,7 @@ lazy val examples = project lazy val commonParadoxProperties = Def.settings( Compile / paradoxProperties ++= Map( // Akka - "extref.akka.base_url" -> s"https://doc.akka.io/docs/akka/${Dependencies.Versions.AkkaVersionInDocs}/%s", + "extref.akka.base_url" -> s"https://doc.akka.io/libraries/akka-core/${Dependencies.Versions.AkkaVersionInDocs}/%s", "scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka/${Dependencies.Versions.AkkaVersionInDocs}/", "javadoc.akka.base_url" -> s"https://doc.akka.io/japi/akka/${Dependencies.Versions.AkkaVersionInDocs}/", "javadoc.akka.link_style" -> "direct", @@ -203,9 +203,11 @@ lazy val commonParadoxProperties = Def.settings( "scaladoc.akka.kafka.base_url" -> s"https://doc.akka.io/api/alpakka-kafka/${Dependencies.Versions.AlpakkaKafkaVersionInDocs}/", "javadoc.akka.kafka.base_url" -> "", // Akka gRPC - "extref.akka-grpc.base_url" -> s"https://doc.akka.io/docs/akka-grpc/${Dependencies.Versions.AkkaGrpcVersionInDocs}/%s", + "extref.akka-grpc.base_url" -> s"https://doc.akka.io/libraries/akka-grpc/${Dependencies.Versions.AkkaGrpcVersionInDocs}/%s", + "scaladoc.akka.grpc.base_url" -> "", + "javadoc.akka.grpc.base_url" -> "", // Akka persistence R2DBC plugin - "extref.akka-persistence-r2dbc.base_url" -> s"https://doc.akka.io/docs/akka-persistence-r2dbc/${Dependencies.Versions.AkkaPersistenceR2dbcVersionInDocs}/%s", + "extref.akka-persistence-r2dbc.base_url" -> s"https://doc.akka.io/libraries/akka-persistence-r2dbc/${Dependencies.Versions.AkkaPersistenceR2dbcVersionInDocs}/%s", // Akka Guide "extref.akka-guide.base_url" -> "https://developer.lightbend.com/docs/akka-guide/microservices-tutorial/", // Java @@ -235,13 +237,13 @@ lazy val docs = project _ => s"https://doc\\.akka\\.io/api/akka-grpc/${akka.grpc.gen.BuildInfo.version}/akka/grpc/")), Paradox / siteSubdirName := s"docs/akka-projection/${projectInfoVersion.value}", Compile / paradoxProperties ++= Map( - "project.url" -> "https://doc.akka.io/docs/akka-projection/current/", - "canonical.base_url" -> "https://doc.akka.io/docs/akka-projection/current", + "project.url" -> "https://doc.akka.io/libraries/akka-projection/current/", + "canonical.base_url" -> "https://doc.akka.io/libraries/akka-projection/current", "github.base_url" -> "https://github.com/akka/akka-projection", "akka.version" -> Dependencies.Versions.Akka, "akka.r2dbc.version" -> Dependencies.Versions.AkkaPersistenceR2dbc, - "extref.akka-distributed-cluster.base_url" -> s"https://doc.akka.io/docs/akka-distributed-cluster/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", - "extref.akka-edge.base_url" -> s"https://doc.akka.io/docs/akka-edge/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s"), + "extref.akka-distributed-cluster.base_url" -> s"https://doc.akka.io/libraries/akka-distributed-cluster/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", + "extref.akka-edge.base_url" -> s"https://doc.akka.io/libraries/akka-edge/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s"), commonParadoxProperties, paradoxGroups := Map("Language" -> Seq("Java", "Scala")), paradoxRoots := List("index.html", "getting-started/event-generator-app.html"), @@ -262,12 +264,12 @@ lazy val `akka-distributed-cluster-docs` = project Paradox / siteSubdirName := s"docs/akka-distributed-cluster/${projectInfoVersion.value}", commonParadoxProperties, Compile / paradoxProperties ++= Map( - "project.url" -> "https://doc.akka.io/docs/akka-distributed-cluster/current/", - "canonical.base_url" -> "https://doc.akka.io/docs/akka-distributed-cluster/current", + "project.url" -> "https://doc.akka.io/libraries/akka-distributed-cluster/current/", + "canonical.base_url" -> "https://doc.akka.io/libraries/akka-distributed-cluster/current", "github.base_url" -> "https://github.com/akka/akka-projection", "akka.version" -> Dependencies.Versions.Akka, "akka.r2dbc.version" -> Dependencies.Versions.AkkaPersistenceR2dbc, - "extref.akka-projection.base_url" -> s"https://doc.akka.io/docs/akka-projection/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", + "extref.akka-projection.base_url" -> s"https://doc.akka.io/libraries/akka-projection/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", "scaladoc.akka.projection.base_url" -> s"https://doc.akka.io/api/akka-projection/${Dependencies.Versions.AkkaProjectionVersionInDocs}/"), paradoxGroups := Map("Language" -> Seq("Java", "Scala")), paradoxRoots := List("index.html"), @@ -287,17 +289,17 @@ lazy val `akka-edge-docs` = project Paradox / siteSubdirName := s"docs/akka-edge/${projectInfoVersion.value}", commonParadoxProperties, Compile / paradoxProperties ++= Map( - "project.url" -> "https://doc.akka.io/docs/akka-edge/current/", - "canonical.base_url" -> "https://doc.akka.io/docs/akka-edge/current", + "project.url" -> "https://doc.akka.io/libraries/akka-edge/current/", + "canonical.base_url" -> "https://doc.akka.io/libraries/akka-edge/current", "github.base_url" -> "https://github.com/akka/akka-projection", "akka.version" -> Dependencies.Versions.Akka, "akka.r2dbc.version" -> Dependencies.Versions.AkkaPersistenceR2dbc, "h2.version" -> Dependencies.Compile.h2.revision, "r2dbc-h2.version" -> Dependencies.Compile.r2dbcH2.revision, - "extref.akka-projection.base_url" -> s"https://doc.akka.io/docs/akka-projection/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", + "extref.akka-projection.base_url" -> s"https://doc.akka.io/libraries/akka-projection/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", "scaladoc.akka.projection.base_url" -> s"https://doc.akka.io/api/akka-projection/${Dependencies.Versions.AkkaProjectionVersionInDocs}/", - "extref.akka-distributed-cluster.base_url" -> s"https://doc.akka.io/docs/akka-distributed-cluster/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", - "extref.akka-persistence-r2dbc.base_url" -> s"https://doc.akka.io/docs/akka-persistence-r2dbc/${Dependencies.Versions.AkkaPersistenceR2dbcVersionInDocs}/%s", + "extref.akka-distributed-cluster.base_url" -> s"https://doc.akka.io/libraries/akka-distributed-cluster/${Dependencies.Versions.AkkaProjectionVersionInDocs}/%s", + "extref.akka-persistence-r2dbc.base_url" -> s"https://doc.akka.io/libraries/akka-persistence-r2dbc/${Dependencies.Versions.AkkaPersistenceR2dbcVersionInDocs}/%s", // API docs for akka-edge-rs "extref.akka-edge-rs-api.base_url" -> s"https://doc.akka.io/api/akka-edge-rs/current/%s"), paradoxGroups := Map("Language" -> Seq("Java", "Scala")), diff --git a/docs/release-train-issue-template.md b/docs/release-train-issue-template.md index 4ed5ae64d..6d999ea47 100644 --- a/docs/release-train-issue-template.md +++ b/docs/release-train-issue-template.md @@ -28,7 +28,7 @@ Variables to be expanded in this template: ### Check availability - [ ] Check [API](https://doc.akka.io/api/akka-projection/$VERSION$/) documentation -- [ ] Check [reference](https://doc.akka.io/docs/akka-projection/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning). +- [ ] Check [reference](https://doc.akka.io/libraries/akka-projection/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning). - [ ] Check the release on https://repo.akka.io/maven/com/lightbend/akka/akka-projection-core_2.13/$VERSION$/akka-projection-core_2.13-$VERSION$.pom ### When everything is on https://repo.akka.io/maven @@ -38,7 +38,7 @@ Variables to be expanded in this template: ``` cd ~/www git status - git add docs/akka-projection/current docs/akka-projection/$VERSION$ + git add libraries/akka-projection/current libraries/akka-projection/$VERSION$ git add api/akka-projection/current api/akka-projection/$VERSION$ git commit -m "Akka Projection $VERSION$" ``` @@ -49,7 +49,6 @@ For important patch releases, and only if critical issues have been fixed: - [ ] Send a release notification to [Lightbend discuss](https://discuss.akka.io) - [ ] Tweet using the [@akkateam](https://twitter.com/akkateam/) account (or ask someone to) about the new release -- [ ] Announce on [Gitter akka/akka](https://gitter.im/akka/akka) - [ ] Announce internally (with links to Tweet, discuss) For minor or major releases: @@ -58,6 +57,6 @@ For minor or major releases: ### Afterwards -- [ ] Update [akka-dependencies bom](https://github.com/lightbend/akka-dependencies) and version for [Akka module versions](https://doc.akka.io/docs/akka-dependencies/current/) in [akka-dependencies repo](https://github.com/akka/akka-dependencies) +- [ ] Update [akka-dependencies bom](https://github.com/akka/akka-dependencies) and version for [Akka module versions](https://doc.akka.io/libraries/akka-dependencies/current/) in [akka-dependencies repo](https://github.com/akka/akka-dependencies) - [ ] Update [Akka Guide samples](https://github.com/akka/akka-platform-guide) - Close this issue diff --git a/docs/src/main/paradox/actor.md b/docs/src/main/paradox/actor.md index 59a6e9faa..a4135b093 100644 --- a/docs/src/main/paradox/actor.md +++ b/docs/src/main/paradox/actor.md @@ -1,6 +1,6 @@ # Processing with Actor -A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/docs/akka/current/typed/actors.html). +A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/libraries/akka-core/current/typed/actors.html). The following example is using the `CassandraProjection` but the handler and actor would be the same if used any other @ref:[offset storage](overview.md). diff --git a/docs/src/main/paradox/cassandra.md b/docs/src/main/paradox/cassandra.md index 26c88f648..6e6a26598 100644 --- a/docs/src/main/paradox/cassandra.md +++ b/docs/src/main/paradox/cassandra.md @@ -223,7 +223,7 @@ Java ### Actor handler -A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/docs/akka/current/typed/actors.html), +A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/libraries/akka-core/current/typed/actors.html), which is described in @ref:[Processing with Actor](actor.md). ### Flow handler @@ -307,7 +307,7 @@ One important setting is to configure the database driver to retry the initial c It is not enabled automatically as it is in the driver's reference.conf and is not overridable in a profile. -It is possible to share the same Cassandra session as [Akka Persistence Cassandra](https://doc.akka.io/docs/akka-persistence-cassandra/current/) +It is possible to share the same Cassandra session as [Akka Persistence Cassandra](https://doc.akka.io/libraries/akka-persistence-cassandra/current/) by setting the `session-config-path`: ``` diff --git a/docs/src/main/paradox/classic.md b/docs/src/main/paradox/classic.md index 9718e0b3d..54e081d60 100644 --- a/docs/src/main/paradox/classic.md +++ b/docs/src/main/paradox/classic.md @@ -1,7 +1,7 @@ # Akka Classic -Akka Projections can be used with the [new Actor API](https://doc.akka.io/docs/akka/current/typed/actors.html) or -the [classic Actor API](https://doc.akka.io/docs/akka/current/index-classic.html). The documentation samples +Akka Projections can be used with the [new Actor API](https://doc.akka.io/libraries/akka-core/current/typed/actors.html) or +the [classic Actor API](https://doc.akka.io/libraries/akka-core/current/index-classic.html). The documentation samples show the new Actor API, and this page highlights how to use it with the classic Actor API. ## Actor System @@ -20,7 +20,7 @@ Java @ref:[Events from Akka Classic Persistence](eventsourced.md) can be emitted from `PersistentActor` and consumed by a Projection with the @apidoc[EventSourcedProvider$]. The events from the `PersistentActor` must be tagged by wrapping them in `akka.persistence.journal.Tagged`, which can be done in the `PersistentActor` or by using -[Event Adapters](https://doc.akka.io/docs/akka/current/persistence.html#event-adapters). +[Event Adapters](https://doc.akka.io/libraries/akka-core/current/persistence.html#event-adapters). ## Running diff --git a/docs/src/main/paradox/durable-state.md b/docs/src/main/paradox/durable-state.md index d1137d036..2502e05af 100644 --- a/docs/src/main/paradox/durable-state.md +++ b/docs/src/main/paradox/durable-state.md @@ -1,6 +1,6 @@ # Changes from Durable State -A typical source for Projections is the change stored with @apidoc[DurableStateBehavior$] in [Akka Persistence](https://doc.akka.io/docs/akka/current/typed/durable-state/persistence.html). Durable state changes can be consumed in a Projection with +A typical source for Projections is the change stored with @apidoc[DurableStateBehavior$] in [Akka Persistence](https://doc.akka.io/libraries/akka-core/current/typed/durable-state/persistence.html). Durable state changes can be consumed in a Projection with `changesByTag`, `changesBySlices` or `eventsBySlices` queries. @@@ note { title=Alternative } @@ -46,7 +46,7 @@ Scala Java : @@snip [DurableStateStoreDocExample.java](/examples/src/test/java/jdocs/state/DurableStateStoreDocExample.java) { #changesByTagSourceProvider } -This example is using the [DurableStateStore JDBC plugin for Akka Persistence](https://doc.akka.io/docs/akka-persistence-jdbc/current/durable-state-store.html). +This example is using the [DurableStateStore JDBC plugin for Akka Persistence](https://doc.akka.io/libraries/akka-persistence-jdbc/current/durable-state-store.html). You will use the same plugin that you configured for the write side. The one that is used by the `DurableStateBehavior`. This source is consuming all the changes from the `Account` `DurableStateBehavior` that are tagged with `"bank-accounts-1"`. In a production application, you would need to start as many instances as the number of different tags you used. That way you consume the changes from all entities. diff --git a/docs/src/main/paradox/eventsourced.md b/docs/src/main/paradox/eventsourced.md index aa21b8f29..c2d3dae01 100644 --- a/docs/src/main/paradox/eventsourced.md +++ b/docs/src/main/paradox/eventsourced.md @@ -1,6 +1,6 @@ # Events from Akka Persistence -A typical source for Projections is events stored with @apidoc[EventSourcedBehavior$] in [Akka Persistence](https://doc.akka.io/docs/akka/current/typed/persistence.html). Events can be consumed in a Projection with +A typical source for Projections is events stored with @apidoc[EventSourcedBehavior$] in [Akka Persistence](https://doc.akka.io/libraries/akka-core/current/typed/persistence.html). Events can be consumed in a Projection with `eventsByTag` or `eventsBySlices` queries. ## Dependencies @@ -42,9 +42,9 @@ Scala Java : @@snip [EventSourcedDocExample.java](/examples/src/test/java/jdocs/eventsourced/EventSourcedDocExample.java) { #eventsByTagSourceProvider } -This example is using the [Cassandra plugin for Akka Persistence](https://doc.akka.io/docs/akka-persistence-cassandra/current/read-journal.html), +This example is using the [Cassandra plugin for Akka Persistence](https://doc.akka.io/libraries/akka-persistence-cassandra/current/read-journal.html), but same code can be used for other Akka Persistence plugins by replacing the `CassandraReadJournal.Identifier`. -For example the [JDBC plugin](https://doc.akka.io/docs/akka-persistence-jdbc/current/) can be used. You will +For example the [JDBC plugin](https://doc.akka.io/libraries/akka-persistence-jdbc/current/) can be used. You will use the same plugin as you have configured for the write side that is used by the `EventSourcedBehavior`. This source is consuming all events from the `ShoppingCart` `EventSourcedBehavior` that are tagged with `"cart-1"`. diff --git a/docs/src/main/paradox/getting-started/event-generator-app.md b/docs/src/main/paradox/getting-started/event-generator-app.md index f32f7fd63..42a3c6a92 100644 --- a/docs/src/main/paradox/getting-started/event-generator-app.md +++ b/docs/src/main/paradox/getting-started/event-generator-app.md @@ -3,7 +3,7 @@ This is a simulation of fake Event Sourced shopping carts. The details of this implementation is not important for understanding Projections. It's needed for @ref:[running the example](running.md). -Please look at the [Akka reference documentation for Event Sourcing](https://doc.akka.io/docs/akka/current/typed/persistence.html) +Please look at the [Akka reference documentation for Event Sourcing](https://doc.akka.io/libraries/akka-core/current/typed/persistence.html) for how to implement real `EventSourcedBehavior`. Add the `EventGeneratorApp` to your project: diff --git a/docs/src/main/paradox/getting-started/running-cluster.md b/docs/src/main/paradox/getting-started/running-cluster.md index 7a91dac92..0244a491f 100644 --- a/docs/src/main/paradox/getting-started/running-cluster.md +++ b/docs/src/main/paradox/getting-started/running-cluster.md @@ -1,9 +1,9 @@ # Running the Projection in Akka Cluster -Running the Projection with [Akka Cluster](https://doc.akka.io/docs/akka/current/typed/cluster.html) allows us to add two important aspects to our system: availability and scalability. +Running the Projection with [Akka Cluster](https://doc.akka.io/libraries/akka-core/current/typed/cluster.html) allows us to add two important aspects to our system: availability and scalability. A Projection running as a single Actor creates a single point of failure (availability), when the app shuts down for any reason, the projection is no longer running until it's started again. A Projection running as a single Actor creates a processing bottleneck (scalability), all messages from the @apidoc[SourceProvider] are processed by a single Actor on a single machine. -By using a [Sharded Daemon Process](https://doc.akka.io/docs/akka/current/typed/cluster-sharded-daemon-process.html#sharded-daemon-process) with Akka Cluster and [Akka Cluster Sharding](https://doc.akka.io/docs/akka/current/typed/cluster-sharding.html) we can scale up the Projection and make it more available by running at least as many instances of the same Projection as we have cluster members. +By using a [Sharded Daemon Process](https://doc.akka.io/libraries/akka-core/current/typed/cluster-sharded-daemon-process.html#sharded-daemon-process) with Akka Cluster and [Akka Cluster Sharding](https://doc.akka.io/libraries/akka-core/current/typed/cluster-sharding.html) we can scale up the Projection and make it more available by running at least as many instances of the same Projection as we have cluster members. As Akka cluster members join and leave the cluster the Sharded Daemon Process will automatically scale and rebalance Sharded Daemon Processes (Projection instances) accordingly. Running the Projection as a Sharded Daemon Process requires no changes to our projection handler and repository, we only need to change the way in which the actor that runs the Projection is initialized. diff --git a/docs/src/main/paradox/getting-started/running.md b/docs/src/main/paradox/getting-started/running.md index c4a926271..44af2806d 100644 --- a/docs/src/main/paradox/getting-started/running.md +++ b/docs/src/main/paradox/getting-started/running.md @@ -16,7 +16,7 @@ Change directory to the directory of the `docker-compose.yml` file and manage a | Delete container state | `docker-compose --project-name getting-started rm -f` | | CQL shell (when running) | `docker run -it --network getting-started_default --rm cassandra cqlsh cassandra` | -To use a different Cassandra database update the [Cassandra driver's contact-points configuration](https://doc.akka.io/docs/akka-persistence-cassandra/current/configuration.html#contact-points-configuration) found in `./examples/src/resources/guide-shopping-cart-app.conf`. +To use a different Cassandra database update the [Cassandra driver's contact-points configuration](https://doc.akka.io/libraries/akka-persistence-cassandra/current/configuration.html#contact-points-configuration) found in `./examples/src/resources/guide-shopping-cart-app.conf`. @@@ @@ -41,11 +41,11 @@ PRIMARY KEY (item_id)); ``` Source events are generated with the `EventGeneratorApp`. -This app is configured to use [Akka Persistence Cassandra](https://doc.akka.io/docs/akka-persistence-cassandra/current/index.html) and [Akka Cluster](https://doc.akka.io/docs/akka/current/typed/cluster.html) [Sharding](https://doc.akka.io/docs/akka/current/typed/cluster-sharding.html) to persist random `ShoppingCartApp.Events` to a journal. +This app is configured to use [Akka Persistence Cassandra](https://doc.akka.io/libraries/akka-persistence-cassandra/current/index.html) and [Akka Cluster](https://doc.akka.io/libraries/akka-core/current/typed/cluster.html) [Sharding](https://doc.akka.io/libraries/akka-core/current/typed/cluster-sharding.html) to persist random `ShoppingCartApp.Events` to a journal. It will checkout a shopping cart with random items and quantities every 1 second. The app will automatically create all the Akka Persistence infrastructure tables in the `akka` keyspace. We won't go into any further detail about how this app functions because it falls outside the scope of Akka Projections. -To learn more about the writing events with [Akka Persistence see the Akka documentation](https://doc.akka.io/docs/akka/current/typed/index-persistence.html). +To learn more about the writing events with [Akka Persistence see the Akka documentation](https://doc.akka.io/libraries/akka-core/current/typed/index-persistence.html). Add the Akka Cluster Sharding library to your project: diff --git a/docs/src/main/paradox/getting-started/setup-your-app.md b/docs/src/main/paradox/getting-started/setup-your-app.md index e980664af..6af5b3d27 100644 --- a/docs/src/main/paradox/getting-started/setup-your-app.md +++ b/docs/src/main/paradox/getting-started/setup-your-app.md @@ -30,7 +30,7 @@ Java To enable serialization and deserialization of events with Akka Persistence it's necessary to define a base type for your event type hierarchy. In this guide we are using `akka.serialization.jackson.CborSerializable` that has a built-in binding to -[Jackson Serialization](https://doc.akka.io/docs/akka/current/serialization-jackson.html). +[Jackson Serialization](https://doc.akka.io/libraries/akka-core/current/serialization-jackson.html). @@@ note @@ -50,7 +50,7 @@ Java : @@snip [ShoppingCartTags.java](/examples/src/test/java/jdocs/guide/ShoppingCartTags.java) { #guideTags } Create the `ShoppingCartApp` with an `akka.actor.typed.ActorSystem` (API: @apidoc[akka.actor.typed.ActorSystem]) for Projections to use. -Create an empty [Guardian Actor](https://doc.akka.io/docs/akka/current/typed/actor-lifecycle.html#the-guardian-actor) (the root Actor of the `ActorSystem`). +Create an empty [Guardian Actor](https://doc.akka.io/libraries/akka-core/current/typed/actor-lifecycle.html#the-guardian-actor) (the root Actor of the `ActorSystem`). We will populate this Actor in the following steps of the guide. Note that we are using the @scala[`docs.scaladsl`]@java[`jdocs.scaladsl`] package. You may use any package, but we include this package in snippets throughout the guide. diff --git a/docs/src/main/paradox/getting-started/source-provider.md b/docs/src/main/paradox/getting-started/source-provider.md index 6f66501f7..242473dd0 100644 --- a/docs/src/main/paradox/getting-started/source-provider.md +++ b/docs/src/main/paradox/getting-started/source-provider.md @@ -22,7 +22,7 @@ Java : @@snip [ShoppingCartApp.java](/examples/src/test/java/jdocs/guide/ShoppingCartApp.java) { #guideSourceProviderImports } Create the @apidoc[SourceProvider]. -The @ref:[Event Sourced Source Provider](../eventsourced.md) is using [Akka Persistence](https://doc.akka.io/docs/akka/current/typed/persistence.html) internally (specifically the [eventsByTag](https://doc.akka.io/docs/akka/current/persistence-query.html#eventsbytag-and-currenteventsbytag) API). +The @ref:[Event Sourced Source Provider](../eventsourced.md) is using [Akka Persistence](https://doc.akka.io/libraries/akka-core/current/typed/persistence.html) internally (specifically the [eventsByTag](https://doc.akka.io/libraries/akka-core/current/persistence-query.html#eventsbytag-and-currenteventsbytag) API). To initialize the Source Provider we need to set parameters to choose the Akka Persistence plugin (Cassandra) to use as well as the name of the tag used for events we're interested in from the journal. Setup the `SourceProvider` in the Guardian `Behavior` defined in `ShoppingCartApp`: diff --git a/docs/src/main/paradox/getting-started/testing.md b/docs/src/main/paradox/getting-started/testing.md index 5a68806b4..d2af49d63 100644 --- a/docs/src/main/paradox/getting-started/testing.md +++ b/docs/src/main/paradox/getting-started/testing.md @@ -10,8 +10,8 @@ version=$project.version$ } Import the @apidoc[akka.projection.testkit.(javadsl|scaladsl).ProjectionTestKit] and other utilities into a new -@scala[[ScalaTest](https://doc.akka.io/docs/akka/current/typed/testing-async.html#test-framework-integration) test spec] -@java[[JUnit](https://doc.akka.io/docs/akka/current/typed/testing-async.html#test-framework-integration) test]. +@scala[[ScalaTest](https://doc.akka.io/libraries/akka-core/current/typed/testing-async.html#test-framework-integration) test spec] +@java[[JUnit](https://doc.akka.io/libraries/akka-core/current/typed/testing-async.html#test-framework-integration) test]. Scala : @@snip [ShoppingCartAppSpec.scala](/examples/src/test/scala/docs/guide/ShoppingCartAppSpec.scala) { #testKitImports } diff --git a/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md b/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md index 203385880..ab64ac7b9 100644 --- a/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md +++ b/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md @@ -6,7 +6,7 @@ such as active-active and hot standby. Originally, Akka Replicated Event Sourcing has required cross-replica access to the underlying replica database, which can be hard to open up for security and infrastructure reasons. It was also easiest to use in an -[Akka Multi DC Cluster](https://doc.akka.io/docs/akka/current/typed/cluster-dc.html) setup +[Akka Multi DC Cluster](https://doc.akka.io/libraries/akka-core/current/typed/cluster-dc.html) setup where a single cluster spans multiple datacenters or regions, another thing that can be complicated to allow. Akka Replicated Event Sourcing over gRPC builds on @ref:[Akka Projection gRPC](grpc.md) and @extref:[Akka gRPC](akka-grpc:index.html) to instead use gRPC as the cross-replica transport for events. diff --git a/docs/src/main/paradox/jdbc.md b/docs/src/main/paradox/jdbc.md index 31d2f9939..d73260434 100644 --- a/docs/src/main/paradox/jdbc.md +++ b/docs/src/main/paradox/jdbc.md @@ -200,7 +200,7 @@ Same type of handlers can be used with `JdbcProjection` instead of `CassandraPro ### Actor handler -A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/docs/akka/current/typed/actors.html), +A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/libraries/akka-core/current/typed/actors.html), which is described in @ref:[Processing with Actor](actor.md). ### Flow handler diff --git a/docs/src/main/paradox/overview.md b/docs/src/main/paradox/overview.md index 57d64b2cc..784d3d731 100644 --- a/docs/src/main/paradox/overview.md +++ b/docs/src/main/paradox/overview.md @@ -51,7 +51,7 @@ All of them share a dependency to `akka-projection-core`: ### Akka version -Akka Projections requires **Akka $akka.version$** or later. See [Akka's Binary Compatibility Rules](https://doc.akka.io/docs/akka/current/common/binary-compatibility-rules.html) for details. +Akka Projections requires **Akka $akka.version$** or later. See [Akka's Binary Compatibility Rules](https://doc.akka.io/libraries/akka-core/current/common/binary-compatibility-rules.html) for details. It is recommended to use the latest patch version of Akka. It is important all Akka dependencies are in the same version, so it is recommended to depend on @@ -81,8 +81,8 @@ See the individual modules for their transitive dependencies. ### Akka Classic -Akka Projections can be used with the [new Actor API](https://doc.akka.io/docs/akka/current/typed/actors.html) or -the [classic Actor API](https://doc.akka.io/docs/akka/current/index-classic.html). The documentation samples +Akka Projections can be used with the [new Actor API](https://doc.akka.io/libraries/akka-core/current/typed/actors.html) or +the [classic Actor API](https://doc.akka.io/libraries/akka-core/current/index-classic.html). The documentation samples show the new Actor API, and the @ref:[Akka Classic page](classic.md) highlights how to use it with the classic Actor API. diff --git a/docs/src/main/paradox/projection-settings.md b/docs/src/main/paradox/projection-settings.md index a5754b614..c055878a5 100644 --- a/docs/src/main/paradox/projection-settings.md +++ b/docs/src/main/paradox/projection-settings.md @@ -1,6 +1,6 @@ # Projection Settings -A Projection is a background process that continuously consume event envelopes from a `Source`. Therefore, in case of failures, it is automatically restarted. This is done by automatically wrapping the `Source` with a [RestartSource with backoff on failures](https://doc.akka.io/docs/akka/current/stream/operators/RestartSource/onFailuresWithBackoff.html#restartsource-onfailureswithbackoff). +A Projection is a background process that continuously consume event envelopes from a `Source`. Therefore, in case of failures, it is automatically restarted. This is done by automatically wrapping the `Source` with a [RestartSource with backoff on failures](https://doc.akka.io/libraries/akka-core/current/stream/operators/RestartSource/onFailuresWithBackoff.html#restartsource-onfailureswithbackoff). By default, the backoff configuration defined in the reference configuration is used. Those values can be overriden in the `application.conf` file or programatically as shown below. diff --git a/docs/src/main/paradox/running.md b/docs/src/main/paradox/running.md index f6cb9e703..4b3730f9c 100644 --- a/docs/src/main/paradox/running.md +++ b/docs/src/main/paradox/running.md @@ -12,7 +12,7 @@ name="Akka library repository" url="https://repo.akka.io/maven" } -To distribute the projection over the cluster we recommend the use of [ShardedDaemonProcess](https://doc.akka.io/docs/akka/current/typed/cluster-sharded-daemon-process.html). Add the following dependency in your project if not yet using Akka Cluster Sharding: +To distribute the projection over the cluster we recommend the use of [ShardedDaemonProcess](https://doc.akka.io/libraries/akka-core/current/typed/cluster-sharded-daemon-process.html). Add the following dependency in your project if not yet using Akka Cluster Sharding: @@dependency [sbt,Maven,Gradle] { group=com.typesafe.akka @@ -22,7 +22,7 @@ To distribute the projection over the cluster we recommend the use of [ShardedDa Akka Projections require Akka $akka.version$ or later, see @ref:[Akka version](overview.md#akka-version). -For more information on using Akka Cluster consult Akka's reference documentation on [Akka Cluster](https://doc.akka.io/docs/akka/current/typed/index-cluster.html) and [Akka Cluster Sharding](https://doc.akka.io/docs/akka/current/typed/cluster-sharding.html). +For more information on using Akka Cluster consult Akka's reference documentation on [Akka Cluster](https://doc.akka.io/libraries/akka-core/current/typed/index-cluster.html) and [Akka Cluster Sharding](https://doc.akka.io/libraries/akka-core/current/typed/cluster-sharding.html). ## Running with Sharded Daemon Process @@ -56,15 +56,15 @@ When using slices with @ref:[Projections R2DBC](r2dbc.md#slices) it is possible We will use those tags to query the journal and create as many Projections instances, and distribute them in the cluster. @@@ warning -When using [Akka Persistence Cassandra plugin](https://doc.akka.io/docs/akka-persistence-cassandra/current/) you should +When using [Akka Persistence Cassandra plugin](https://doc.akka.io/libraries/akka-persistence-cassandra/current/) you should not use too many tags for each event. Each tag will result in a copy of the event in a separate table and that can impact write performance. Typically, you would use 1 tag per event as illustrated here. Additional filtering of events can be done in the Projection handler if it doesn't have to act on certain events. -The [JDBC plugin](https://doc.akka.io/docs/akka-persistence-jdbc/current/) +The [JDBC plugin](https://doc.akka.io/libraries/akka-persistence-jdbc/current/) don't have this constraint. @@@ -See also the [Akka reference documentation for tagging](https://doc.akka.io/docs/akka/current/typed/persistence.html#tagging). +See also the [Akka reference documentation for tagging](https://doc.akka.io/libraries/akka-core/current/typed/persistence.html#tagging). ### Event Sourced Provider per tag @@ -125,7 +125,7 @@ overwrite each others offset storage with undefined and unpredictable results. ## Running in Cluster Singleton If you know that you only need one or a few projection instances an alternative to @ref:[Sharded Daemon Process](#running-with-sharded-daemon-process) -is to use [Akka Cluster Singleton](https://doc.akka.io/docs/akka/current/typed/cluster-singleton.html) +is to use [Akka Cluster Singleton](https://doc.akka.io/libraries/akka-core/current/typed/cluster-singleton.html) Scala : @@snip [CassandraProjectionDocExample.scala](/examples/src/test/scala/docs/cassandra/CassandraProjectionDocExample.scala) { #running-with-singleton } diff --git a/docs/src/main/paradox/slick.md b/docs/src/main/paradox/slick.md index 7c2cac5bc..5a429e622 100644 --- a/docs/src/main/paradox/slick.md +++ b/docs/src/main/paradox/slick.md @@ -149,7 +149,7 @@ Same type of handlers can be used with `SlickProjection` instead of `CassandraPr ### Actor handler -A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/docs/akka/current/typed/actors.html), +A good alternative for advanced state management is to implement the handler as an [actor](https://doc.akka.io/libraries/akka-core/current/typed/actors.html), which is described in @ref:[Processing with Actor](actor.md). ### Flow handler diff --git a/docs/src/main/paradox/snapshots.md b/docs/src/main/paradox/snapshots.md index 24b8a0f17..434121da3 100644 --- a/docs/src/main/paradox/snapshots.md +++ b/docs/src/main/paradox/snapshots.md @@ -42,4 +42,4 @@ Gradle ## Documentation -The [snapshot documentation](https://doc.akka.io/docs/akka-projection/snapshot) is updated with every snapshot build. +The [snapshot documentation](https://doc.akka.io/libraries/akka-projection/snapshot) is updated with every snapshot build. diff --git a/docs/src/main/paradox/testing.md b/docs/src/main/paradox/testing.md index dd2559055..7c3aeb31f 100644 --- a/docs/src/main/paradox/testing.md +++ b/docs/src/main/paradox/testing.md @@ -66,7 +66,7 @@ Java ## Testing with a TestSink probe -The [Akka Stream TestKit](https://doc.akka.io/docs/akka/current/stream/stream-testkit.html#using-the-testkit) can be used to drive the pace of envelopes flowing through the Projection. +The [Akka Stream TestKit](https://doc.akka.io/libraries/akka-core/current/stream/stream-testkit.html#using-the-testkit) can be used to drive the pace of envelopes flowing through the Projection. The Projection starts as soon as the first element is requested by the `TestSink` probe, new elements will be emitted as requested. The Projection is stopped once the assert function completes. diff --git a/examples/src/test/java/jdocs/guide/EventGeneratorApp.java b/examples/src/test/java/jdocs/guide/EventGeneratorApp.java index d86b39c2c..0ae8c1d54 100644 --- a/examples/src/test/java/jdocs/guide/EventGeneratorApp.java +++ b/examples/src/test/java/jdocs/guide/EventGeneratorApp.java @@ -175,7 +175,7 @@ static String tagFactory(String entityId, Boolean clusterMode) { /** * An Actor that persists shopping cart events for a particular persistence id (cart id) and tag. * This is not how real Event Sourced actors should be be implemented. Please look at - * https://doc.akka.io/docs/akka/current/typed/persistence.html for more information about + * https://doc.akka.io/libraries/akka-core/current/typed/persistence.html for more information about * `EventSourcedBehavior`. */ static class CartPersistentBehavior diff --git a/examples/src/test/scala/docs/guide/EventGeneratorApp.scala b/examples/src/test/scala/docs/guide/EventGeneratorApp.scala index 9b12ac211..bc3d54c27 100644 --- a/examples/src/test/scala/docs/guide/EventGeneratorApp.scala +++ b/examples/src/test/scala/docs/guide/EventGeneratorApp.scala @@ -118,7 +118,7 @@ object EventGeneratorApp extends App { /** * Construct an Actor that persists shopping cart events for a particular persistence id (cart id) and tag. * This is not how real Event Sourced actors should be be implemented. Please look at - * https://doc.akka.io/docs/akka/current/typed/persistence.html for more information about `EventSourcedBehavior`. + * https://doc.akka.io/libraries/akka-core/current/typed/persistence.html for more information about `EventSourcedBehavior`. */ def cartBehavior(persistenceId: String, tag: String): Behavior[Event] = Behaviors.setup { ctx => diff --git a/project/Common.scala b/project/Common.scala index 2ef12e67e..1ec00e2b8 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -60,9 +60,14 @@ object Common extends AutoPlugin { }) ++ { if (scalaBinaryVersion.value.startsWith("3")) { - Seq("-skip-packages:akka.pattern") // different usage in scala3 + Seq( + s"-external-mappings:https://docs.oracle.com/en/java/javase/${Dependencies.JavaDocLinkVersion}/docs/api/java.base/", "-skip-packages:akka.pattern") } else { - Seq("-skip-packages", "akka.pattern") // for some reason Scaladoc creates this + Seq( + "-jdk-api-doc-base", + s"https://docs.oracle.com/en/java/javase/${Dependencies.JavaDocLinkVersion}/docs/api/java.base/", + "-skip-packages", + "akka.pattern") } }, scalafmtOnCompile := System.getenv("CI") != "true", diff --git a/project/Dependencies.scala b/project/Dependencies.scala index ba207b0db..08649c86c 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -5,6 +5,10 @@ import sbt._ object Dependencies { + // Java Platform version for JavaDoc creation + // sync with Java version in .github/workflows/release.yml#documentation + lazy val JavaDocLinkVersion = 17 + val Scala213 = "2.13.15" val Scala3 = "3.3.4" @@ -17,7 +21,9 @@ object Dependencies { val Alpakka = "9.0.0-M1" val AlpakkaVersionInDocs = VersionNumber(Alpakka).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } - val AlpakkaKafkaVersionInDocs = "7.0.0-M1" + + val AlpakkaKafka = "7.0.0-M1" + val AlpakkaKafkaVersionInDocs = VersionNumber(AlpakkaKafka).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } val AkkaGrpcVersionInDocs = "2.5.0-M1" val AkkaProjectionVersionInDocs = "1.6.0" diff --git a/project/plugins.sbt b/project/plugins.sbt index 366401ccf..5488d321c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,7 +6,7 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1") -// remember to bump in samples/grpc/ projects as well if changing +// remember to bump in Dependencies.scala and samples/grpc/ projects as well if changing addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "2.5.0-M1") // Documentation diff --git a/project/project-info.conf b/project/project-info.conf index 248b4f2b1..db64b83c6 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -27,10 +27,6 @@ project-info { text: "Lightbend Discuss" url: "https://discuss.lightbend.com/c/akka/" } - { - text: "akka/akka Gitter channel" - url: "https://gitter.im/akka/akka" - } ] } akka-projection-core: ${project-info.shared-info} { diff --git a/samples/grpc/iot-service-rs/README.md b/samples/grpc/iot-service-rs/README.md index 69f4364e9..cf2562382 100644 --- a/samples/grpc/iot-service-rs/README.md +++ b/samples/grpc/iot-service-rs/README.md @@ -7,5 +7,5 @@ to a commit log. A simple HTTP API is provided to query and scan the commit log. is the use of the Akka Persistence Entity Manager in place of the `Database` struct that the Streambed example uses, and the integration with the [iot-service](https://github.com/akka/akka-projection/tree/main/samples/grpc/iot-service-scala) of Akka projections. -Please see the [documentation on Akka Edge Rust](https://doc.akka.io/docs/akka-edge/current/guide.html) for -guidance on using this example. \ No newline at end of file +Please see the [documentation on Akka Edge Rust](https://doc.akka.io/libraries/akka-edge/current/guide.html) for +guidance on using this example. diff --git a/scripts/link-validator.conf b/scripts/link-validator.conf index d679f960b..22f228c98 100644 --- a/scripts/link-validator.conf +++ b/scripts/link-validator.conf @@ -1,13 +1,13 @@ // config for https://github.com/ennru/site-link-validator/ site-link-validator { - root-dir = "./docs/target/site/" + root-dir = "./docs/target/paradox/site/main/" # relative to `root-dir` - start-file = "docs/akka-projection/snapshot/index.html" + start-file = "index.html" # Resolves URLs with the given prefix as local files instead link-mappings = [ { - prefix = "https://doc.akka.io/docs/akka-projection/snapshot/" + prefix = "https://doc.akka.io/libraries/akka-projection/snapshot/" replace = "/docs/akka-projection/snapshot/" } { @@ -18,6 +18,8 @@ site-link-validator { ignore-missing-local-files-regex = "" + ignore-files = [] + ignore-prefixes = [ # Fails after a number of requests with "403 Forbidden" "https://javadoc.io/static/" From 1eba8b0afdf79cb54712fb48c3a43b0fbf0a7afc Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:46:55 +0200 Subject: [PATCH 2/6] Leave docs checking to link validator workflow --- .github/workflows/checks.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index bd06ef4f6..60eeb32e8 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -76,38 +76,6 @@ jobs: - name: Compile all code with fatal warnings for Java 11, Scala 2.13 and Scala 3 run: sbt "clean ; +compile; +Test/compile; +akka-projection-integration/Test/compile" - check-docs: - name: Check Docs - runs-on: ubuntu-22.04 - steps: - - name: Checkout - # https://github.com/actions/checkout/releases - # v4.1.1 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - fetch-depth: 0 - - - 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: Cache Coursier cache - # https://github.com/coursier/cache-action/releases - # v6.4.5 - uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d - - - name: Set up JDK 11 - # https://github.com/coursier/setup-action/releases - # v1.3.5 - uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f - with: - jvm: temurin:1.11 - - - name: Create all API docs for artifacts/website and all reference docs - run: sbt "unidoc; docs/paradox; akka-distributed-cluster-docs/paradox; akka-edge-docs/paradox" - check-samples: name: Check Sample Projects runs-on: ubuntu-22.04 From a20d88a1d68e078f13043b08e35cab185e3e4c69 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:50:41 +0200 Subject: [PATCH 3/6] Add version check to release script --- docs/release-train-issue-template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-train-issue-template.md b/docs/release-train-issue-template.md index 6d999ea47..7f5c20804 100644 --- a/docs/release-train-issue-template.md +++ b/docs/release-train-issue-template.md @@ -16,6 +16,7 @@ Variables to be expanded in this template: - [ ] Check that open PRs and issues assigned to the milestone are reasonable - [ ] Update the Change date and version in the LICENSE file - [ ] Update the Akka Projection version in the samples to $VERSION$, otherwise the published zip files of the samples will have the old version. +- [ ] Update the Akka Projection version in `Dependencies.AkkaProjectionVersionInDocs` - [ ] Create a new milestone for the [next version](https://github.com/akka/akka-projection/milestones) - [ ] Close the [$VERSION$ milestone](https://github.com/akka/akka-projection/milestones?direction=asc&sort=due_date) - [ ] Make sure all important PRs have been merged From 7f8cb4f0805afb2b5cca304fb0d2843c6aabb211 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:53:38 +0200 Subject: [PATCH 4/6] Use JDK 17 for docs releasing --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0adde3a4..1dfaf0985 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,12 +66,12 @@ jobs: # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves fetch-depth: 0 - - name: Set up JDK 11 + - name: Set up JDK 17 # https://github.com/coursier/setup-action/releases # v1.3.5 uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f with: - jvm: temurin:1.11 + jvm: temurin:1.17 - name: Publish run: |- From 8b183ac8cb898ce9a5ba13ca73bef00c668c8dee Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:28:45 +0200 Subject: [PATCH 5/6] scalafmtSbt --- project/Common.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/Common.scala b/project/Common.scala index 1ec00e2b8..cca5b8ef2 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -61,7 +61,8 @@ object Common extends AutoPlugin { ++ { if (scalaBinaryVersion.value.startsWith("3")) { Seq( - s"-external-mappings:https://docs.oracle.com/en/java/javase/${Dependencies.JavaDocLinkVersion}/docs/api/java.base/", "-skip-packages:akka.pattern") + s"-external-mappings:https://docs.oracle.com/en/java/javase/${Dependencies.JavaDocLinkVersion}/docs/api/java.base/", + "-skip-packages:akka.pattern") } else { Seq( "-jdk-api-doc-base", From 96caa516d1c37292a19678d44879255e820cea31 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 4 Oct 2024 12:10:02 +0200 Subject: [PATCH 6/6] fmt --- project/Dependencies.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 08649c86c..24ff2609b 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -23,7 +23,9 @@ object Dependencies { val AlpakkaVersionInDocs = VersionNumber(Alpakka).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } val AlpakkaKafka = "7.0.0-M1" - val AlpakkaKafkaVersionInDocs = VersionNumber(AlpakkaKafka).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } + val AlpakkaKafkaVersionInDocs = VersionNumber(AlpakkaKafka).numbers match { + case Seq(major, minor, _*) => s"$major.$minor" + } val AkkaGrpcVersionInDocs = "2.5.0-M1" val AkkaProjectionVersionInDocs = "1.6.0"