You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2023/05/23 10:24:55 UTC
[incubator-pekko-persistence-r2dbc] branch main updated: publish docs nightly (#25)
This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-persistence-r2dbc.git
The following commit(s) were added to refs/heads/main by this push:
new 5f57e61 publish docs nightly (#25)
5f57e61 is described below
commit 5f57e6134764dd6b6ecc85233804ce2ffed35081
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Tue May 23 11:24:50 2023 +0100
publish docs nightly (#25)
* publish docs nightly
* Update build-test.yml
---
.github/actions/sync-nightlies/action.yml | 86 ++++++++++++++++++++++
.github/workflows/build-test.yml | 8 +-
.github/workflows/publish-nightly.yml | 23 ++++++
build.sbt | 15 ++--
docs/src/main/paradox/.htaccess | 2 -
docs/src/main/paradox/contributing.md | 6 +-
project/plugins.sbt | 2 +-
project/project-info.conf | 14 ++--
.../r2dbc/internal/R2dbcOffsetStore.scala | 6 +-
9 files changed, 135 insertions(+), 27 deletions(-)
diff --git a/.github/actions/sync-nightlies/action.yml b/.github/actions/sync-nightlies/action.yml
new file mode 100644
index 0000000..6a8deff
--- /dev/null
+++ b/.github/actions/sync-nightlies/action.yml
@@ -0,0 +1,86 @@
+# 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.
+
+# Based on Apache Arrow's sync-nightlies action
+# https://github.com/apache/arrow/blob/master/.github/actions/sync-nightlies/action.yml
+name: 'Sync Nightlies'
+description: 'Sync files to and from nightlies.apache.org'
+inputs:
+ upload:
+ description: 'Sync from local to remote'
+ default: false
+ required: false
+ switches:
+ description: 'see rsync --help'
+ required: true
+ local_path:
+ description: 'The relative local path within $GITHUB_WORKSPACE'
+ required: true
+ remote_path:
+ description: 'The remote path incl. sub dirs e.g. {{secrets.path}}/arrow/r'
+ required: true
+ remote_host:
+ description: 'The remote host'
+ required: true
+ remote_port:
+ description: 'The remote port'
+ required: false
+ default: 22
+ remote_user:
+ description: 'The remote user'
+ required: true
+ remote_key:
+ description: 'The remote key'
+ required: true
+
+runs:
+ using: "composite"
+ steps:
+ - name: Sync files
+ shell: bash
+ env:
+ SWITCHES: "${{ inputs.switches }}"
+ LOCAL_PATH: "${{ github.workspace }}/${{ inputs.local_path }}"
+
+ SSH_KEY: "${{ inputs.remote_key }}"
+ PORT: "${{ inputs.remote_port }}"
+ USER: "${{ inputs.remote_user }}"
+ HOST: "${{ inputs.remote_host }}"
+ REMOTE_PATH: "${{ inputs.remote_path }}"
+ run: |
+ # Make SSH key available and add remote to known hosts
+ eval "$(ssh-agent)" > /dev/null
+ echo "$SSH_KEY" | tr -d '\r' | ssh-add - >/dev/null
+ mkdir -p .ssh
+ chmod go-rwx .ssh
+ echo "$HOST_KEY" >> .ssh/known_hosts
+ # strict errors
+ set -eu
+ # We have to use a custom RSH to supply the port
+ RSH="ssh -o StrictHostKeyChecking=no -p $PORT"
+ DSN="$USER@$HOST"
+ # It is important to append '/' to the source path otherwise
+ # the entire source dir will be created as a sub dir in the destination
+ if [ "${{ inputs.upload }}" = true ]
+ then
+ SOURCE=$LOCAL_PATH/
+ DEST=$DSN:$REMOTE_PATH
+ else
+ SOURCE=$DSN:$REMOTE_PATH/
+ DEST=$LOCAL_PATH
+ fi
+ rsync $SWITCHES --rsh="$RSH" $SOURCE $DEST
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 1afe376..5ee9af3 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
SCALA_VERSION: [ 2.12, 2.13 ]
- JAVA_VERSION: [ 8, 11 ]
+ JAVA_VERSION: [ 8, 11, 17 ]
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -46,7 +46,7 @@ jobs:
if: github.repository == 'apache/incubator-pekko-persistence-r2dbc'
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -88,7 +88,7 @@ jobs:
if: github.repository == 'apache/incubator-pekko-persistence-r2dbc'
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -126,7 +126,7 @@ jobs:
if: github.repository == 'apache/incubator-pekko-persistence-r2dbc'
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 0
diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml
index 458ecf9..d789e33 100644
--- a/.github/workflows/publish-nightly.yml
+++ b/.github/workflows/publish-nightly.yml
@@ -31,3 +31,26 @@ jobs:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PW: ${{ secrets.NEXUS_PW }}
run: sbt +publish
+
+ - name: Build Documentation
+ run: |-
+ sbt docs/paradox unidoc
+
+ # Create directory structure upfront since rsync does not create intermediate directories otherwise
+ - name: Create nightly directory structure
+ run: |-
+ mkdir -p target/nightly-docs/docs/pekko-persistence-r2dbc/${{ github.ref_name }}-snapshot/
+ mv docs/target/paradox/site/main/ target/nightly-docs/docs/pekko-persistence-r2dbc/${{ github.ref_name }}-snapshot/docs
+ mv docs/target/scala-2.13/unidoc target/nightly-docs/docs/pekko-persistence-r2dbc/${{ github.ref_name }}-snapshot/api
+
+ - name: Upload nightly docs
+ uses: ./.github/actions/sync-nightlies
+ with:
+ upload: true
+ switches: --archive --compress --update --delete --progress --relative
+ local_path: target/nightly-docs/./docs/pekko-persistence-r2dbc/ # The intermediate dot is to show `--relative` which paths to operate on
+ remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/pekko/
+ remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
+ remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
+ remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
+ remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
\ No newline at end of file
diff --git a/build.sbt b/build.sbt
index 96fc5ed..f7170d0 100644
--- a/build.sbt
+++ b/build.sbt
@@ -54,30 +54,27 @@ lazy val migration = (project in file("migration"))
lazy val docs = project
.in(file("docs"))
- .enablePlugins(PekkoParadoxPlugin, ParadoxSitePlugin, PublishRsyncPlugin)
+ .enablePlugins(PekkoParadoxPlugin, ParadoxSitePlugin, ScalaUnidocPlugin)
.dependsOn(core, projection, migration)
.settings(dontPublish)
.settings(
name := "Apache Pekko Persistence R2DBC",
libraryDependencies ++= Dependencies.docs,
previewPath := (Paradox / siteSubdirName).value,
- Paradox / siteSubdirName := s"docs/akka-persistence-r2dbc/${projectInfoVersion.value}",
+ Paradox / siteSubdirName := s"docs/pekko-persistence-r2dbc/${projectInfoVersion.value}",
pekkoParadoxGithub := Some("https://github.com/apache/incubator-pekko-persistence-r2dbc"),
paradoxGroups := Map("Language" -> Seq("Java", "Scala")),
Compile / paradoxProperties ++= Map(
- "project.url" -> "https://doc.akka.io/docs/akka-persistence-r2dbc/current/",
- "canonical.base_url" -> "https://doc.akka.io/docs/akka-persistence-r2dbc/current",
+ "project.url" -> "https://pekko.apache.org/docs/pekko-persistence-r2dbc/current/",
+ "canonical.base_url" -> "https://pekko.apache.org/docs/pekko-persistence-r2dbc/current",
"pekko.version" -> Dependencies.PekkoVersion,
"scala.version" -> scalaVersion.value,
"scala.binary.version" -> scalaBinaryVersion.value,
- "extref.pekko.base_url" -> s"https://doc.akka.io/docs/akka/${Dependencies.PekkoVersionInDocs}/%s",
+ "extref.pekko.base_url" -> s"https://pekko.apache.org/docs/pekko/${Dependencies.PekkoVersionInDocs}/%s",
"extref.pekko-docs.base_url" -> s"https://pekko.apache.org/docs/pekko/${Dependencies.PekkoVersionInDocs}/%s",
"extref.pekko-projection.base_url" -> s"https://pekko.apache.org/docs/pekko-projection/${Dependencies.PekkoProjectionVersionInDocs}/%s",
"extref.java-docs.base_url" -> "https://docs.oracle.com/en/java/javase/11/%s",
"scaladoc.scala.base_url" -> s"https://www.scala-lang.org/api/current/",
"scaladoc.org.apache.pekko.base_url" -> s"https://pekko.apache.org/api/pekko/${Dependencies.PekkoVersion}",
"scaladoc.com.typesafe.config.base_url" -> s"https://lightbend.github.io/config/latest/api/"),
- apidocRootPackage := "org.apache.pekko",
- resolvers += Resolver.jcenterRepo,
- publishRsyncArtifacts += makeSite.value -> "www/",
- publishRsyncHost := "akkarepo@gustav.akka.io")
+ apidocRootPackage := "org.apache.pekko")
diff --git a/docs/src/main/paradox/.htaccess b/docs/src/main/paradox/.htaccess
deleted file mode 100644
index 1bbde4b..0000000
--- a/docs/src/main/paradox/.htaccess
+++ /dev/null
@@ -1,2 +0,0 @@
-# This file can be used for redirects like:
-# RedirectMatch 301 ^/docs/alpakka/([^/]+)/data-transformations/recordio.html https://doc.akka.io/docs/alpakka/$1/data-transformations/simple-codecs.html
diff --git a/docs/src/main/paradox/contributing.md b/docs/src/main/paradox/contributing.md
index bd60a58..0e400eb 100644
--- a/docs/src/main/paradox/contributing.md
+++ b/docs/src/main/paradox/contributing.md
@@ -1,6 +1,6 @@
# Contributing
-Please feel free to contribute to Akka Persistence R2DBC and the documentation by reporting issues you identify, or by suggesting changes to the code.
-Please refer to our [contributing instructions](https://github.com/akka/akka-persistence-r2dbc/blob/main/CONTRIBUTING.md) to learn how it can be done.
+Please feel free to contribute to Apache Pekko Persistence R2DBC and the documentation by reporting issues you identify, or by suggesting changes to the code.
+Please refer to our [contributing instructions](https://github.com/apache/incubator-pekko-persistence-r2dbc/blob/main/CONTRIBUTING.md) to learn how it can be done.
-We want Akka to strive in a welcoming and open atmosphere and expect all contributors to respect our [code of conduct](https://www.lightbend.com/conduct).
+We want the Apache Pekko community to have a welcoming and open atmosphere and expect all contributors to respect our [code of conduct](https://www.apache.org/foundation/policies/conduct.html).
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 5cef413..eab8561 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,6 +1,7 @@
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.5") // for maintenance of copyright file header
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
+addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
// for releasing
addSbtPlugin("org.mdedetrich" % "sbt-apache-sonatype" % "0.1.7")
@@ -21,5 +22,4 @@ addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox" % "0.9.2").force())
addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox-apidoc" % "0.10.1").force())
addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox-project-info" % "2.0.0").force())
-addSbtPlugin("com.lightbend.sbt" % "sbt-publish-rsync" % "0.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
diff --git a/project/project-info.conf b/project/project-info.conf
index 9789192..e347717 100644
--- a/project/project-info.conf
+++ b/project/project-info.conf
@@ -1,7 +1,7 @@
project-info {
version: "current"
shared-info {
- jdk-versions: ["OpenJDK 11"]
+ jdk-versions: ["OpenJDK 8", "OpenJDK 11", "OpenJDK 17"]
issues: {
url: "https://github.com/apache/incubator-pekko-persistence-r2dbc/issues"
text: "Github issues"
@@ -12,12 +12,16 @@ project-info {
}
forums: [
{
- text: "Lightbend Discuss"
- url: "https://discuss.lightbend.com/c/akka/"
+ text: "Apache Pekko User mailing list"
+ url: "https://lists.apache.org/list.html?user@pekko.apache.org"
}
{
- text: "akka/akka Gitter channel"
- url: "https://gitter.im/akka/akka"
+ text: "Apache Pekko Dev mailing list"
+ url: "https://lists.apache.org/list.html?dev@pekko.apache.org"
+ }
+ {
+ text: "Github Discussions"
+ url: "https://github.com/apache/incubator-pekko-persistence-r2dbc/discussions"
}
]
}
diff --git a/projection/src/main/scala/org/apache/pekko/projection/r2dbc/internal/R2dbcOffsetStore.scala b/projection/src/main/scala/org/apache/pekko/projection/r2dbc/internal/R2dbcOffsetStore.scala
index 134ac5c..f847fcb 100644
--- a/projection/src/main/scala/org/apache/pekko/projection/r2dbc/internal/R2dbcOffsetStore.scala
+++ b/projection/src/main/scala/org/apache/pekko/projection/r2dbc/internal/R2dbcOffsetStore.scala
@@ -540,7 +540,7 @@ private[projection] class R2dbcOffsetStore(
if (newInflight.size >= 10000) {
throw new IllegalStateException(
s"Too many envelopes in-flight [${newInflight.size}]. " +
- "Please report this issue at https://github.com/akka/akka-persistence-r2dbc")
+ "Please report this issue at https://github.com/apache/incubator-pekko-persistence-r2dbc")
}
if (!inflight.compareAndSet(currentInflight, newInflight))
cleanupInflight(newState) // CAS retry, concurrent update of inflight
@@ -701,7 +701,7 @@ private[projection] class R2dbcOffsetStore(
new IllegalStateException(
s"Rejected envelope from backtracking, persistenceId [$pid], seqNr [$seqNr] " +
"due to unexpected sequence number. " +
- "Please report this issue at https://github.com/akka/akka-persistence-r2dbc"))
+ "Please report this issue at https://github.com/apache/incubator-pekko-persistence-r2dbc"))
}
} else if (seqNr == 1) {
// always accept first event if no other event for that pid has been seen
@@ -732,7 +732,7 @@ private[projection] class R2dbcOffsetStore(
throw new IllegalStateException(
s"Rejected envelope from backtracking, persistenceId [$pid], seqNr [$seqNr], " +
"due to unknown sequence number. " +
- "Please report this issue at https://github.com/akka/akka-persistence-r2dbc")
+ "Please report this issue at https://github.com/apache/incubator-pekko-persistence-r2dbc")
}
case None =>
// previous not found, could have been deleted
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org