Skip to content

Commit

Permalink
Migrate main branch from from akka-serialization-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Pekko Serialization Helper Bot committed Mar 5, 2024
1 parent 9b8f482 commit 255f11f
Show file tree
Hide file tree
Showing 195 changed files with 833 additions and 932 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml

This file was deleted.

47 changes: 8 additions & 39 deletions .github/workflows/standard-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
run: sbt scalafmtCheckAll scalafmtSbtCheck "scalafixAll --check"
working-directory: examples/event-migration

- name: Check code style - examples/akka-cluster-app
- name: Check code style - examples/pekko-cluster-app
run: sbt scalafmtCheckAll scalafmtSbtCheck "scalafixAll --check"
working-directory: examples/akka-cluster-app
working-directory: examples/pekko-cluster-app

- name: Check code style - examples/akka-persistence-app
- name: Check code style - examples/pekko-persistence-app
run: sbt scalafmtCheckAll scalafmtSbtCheck "scalafixAll --check"
working-directory: examples/akka-persistence-app
working-directory: examples/pekko-persistence-app

test-212:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -127,45 +127,14 @@ jobs:
run: sbt test
working-directory: examples/event-migration

- name: Compile akka-cluster-app
- name: Compile pekko-cluster-app
run: sbt compile
working-directory: examples/akka-cluster-app
working-directory: examples/pekko-cluster-app

- name: Test akka-persistence-app
- name: Test pekko-persistence-app
run: sbt test
working-directory: examples/akka-persistence-app
working-directory: examples/pekko-persistence-app

# <PEKKO-REMOVE-START>
patch-and-push-to-psh:
if: github.event_name != 'pull_request'
needs: [code-style-check, test-212, test-213-1, test-213-2, test-sbt-plugin, run-examples]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch all history so that a push to pekko-serialization-helper succeeds.
# See https://stackoverflow.com/q/76470864
fetch-depth: 0
- run: git status
- run: git checkout -b TEMP/from-ash
- run: curl -sL https://raw.githubusercontent.com/ap/rename/master/rename | sudo tee /usr/local/bin/rename
- run: sudo chmod +x /usr/local/bin/rename
- run: ./scripts/akka-to-pekko
- run: git add .
- run: git config user.email "[email protected]"
- run: git config user.name "Pekko Serialization Helper Bot"
- run: git commit -m 'Migrate `main` branch from from akka-serialization-helper'
- env:
# 2.1 Generate an SSH key in terminal (Leave the passphrase empty)
# 2.2 Add public key in the external repository: <external repository>/Settings/Deploy keys/Add deploy key
# Paste the public key. Enable "Allow write access"
# 2.3 Add private key in the source repository: <external repository>/Settings/Secrets/Actions/New repository secret
# Paste the private key.
PSH_SSH_PRIVATE_KEY: ${{ secrets.PSH_SSH_PRIVATE_KEY }}
run: mkdir -p ~/.ssh/ && echo "$PSH_SSH_PRIVATE_KEY" > ~/.ssh/psh && chmod 400 ~/.ssh/psh
- run: git config core.sshCommand "ssh -i $HOME/.ssh/psh"
- run: git push --force [email protected]:VirtusLab/pekko-serialization-helper.git HEAD:main
# <PEKKO-REMOVE-END>

publish-maven-artifacts:
needs: [code-style-check, test-212, test-213-1, test-213-2, test-sbt-plugin, run-examples]
Expand Down
73 changes: 7 additions & 66 deletions .scala-steward.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ commits.message = "Scala-Steward: Update ${artifactName} from ${currentVersion}

buildRoots = [
".",
"examples/akka-cluster-app/",
"examples/akka-persistence-app/",
"examples/pekko-cluster-app/",
"examples/pekko-persistence-app/",
"examples/event-migration/",
"sbt-akka-serialization-helper/src/sbt-test/sbt-dumpschema/dependencies",
"sbt-akka-serialization-helper/src/sbt-test/sbt-dumpschema/simple",
"sbt-pekko-serialization-helper/src/sbt-test/sbt-dumpschema/dependencies",
"sbt-pekko-serialization-helper/src/sbt-test/sbt-dumpschema/simple",
]

pullRequests {
Expand All @@ -20,67 +20,8 @@ pullRequests {
}

updates {
# <PEKKO-UNCOMMENT-START>
# allowPreReleases = [ { groupId = "org.apache.pekko" } ]
# allow = [ { groupId = "org.apache.pekko" } ]
# ignore = [ { groupId = "org.apache.pekko", artifactId = "pekko-grpc-runtime_2.13" } ]
# <PEKKO-UNCOMMENT-END>
allowPreReleases = [ { groupId = "org.apache.pekko" } ]
allow = [ { groupId = "org.apache.pekko" } ]
ignore = [ { groupId = "org.apache.pekko", artifactId = "pekko-grpc-runtime_2.13" } ]

# <PEKKO-REMOVE-START>
pin = [
# * org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over 1.2.0
# +- com.github.sbt:sbt-native-packager:1.9.10 (sbtVersion=1.0, scalaVersion=2.12) (depends on 2.1.0)
# +- com.typesafe.play:twirl-api_2.12:1.5.1 (depends on 1.2.0)
{ groupId = "com.github.sbt", artifactId = "sbt-native-packager", version = "1.9.9" }

# * org.scala-lang.modules:scala-parser-combinators_2.13:2.1.0 (early-semver) is selected over 1.1.2
# +- org.scalikejdbc:scalikejdbc-core_2.13:4.0.0 (depends on 2.1.0)
# +- com.typesafe:ssl-config-core_2.13:0.4.3 (depends on 1.1.2)
{ groupId = "org.scalikejdbc", version = "3." }

# Since most libraries will pull in slf4j-api v1 for a long time...
# so to spare ourselves dependency overrides & all the hassle with v2, let's stick to v1 as for now.
{ groupId = "org.slf4j", version = "1." }

# Akka changed its license from Apache 2.0 (opensource) to Business Source License 1.1 (commercial) in the
# 2.7.0 release. So, we want to stick to 2.6.x for now to avoid potential license-connected problems.
{ groupId = "com.typesafe.akka", artifactId="akka-actor", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-actor-typed", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-stream", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-persistence-typed", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-actor-testkit-typed", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-stream-testkit", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-cluster-typed", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-cluster-sharding-typed", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-discovery", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-slf4j", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-serialization-jackson", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-persistence-testkit", version = "2.6." }
{ groupId = "com.typesafe.akka", artifactId="akka-persistence-query", version = "2.6." }
# Akka changed its license from Apache 2.0 (opensource) to Business Source License 1.1 (commercial) in the
# 1.3.0 release for akka-projection. So, we want to stick to 1.2.x for now to avoid
# potential license-connected problems.
{ groupId = "com.lightbend.akka", artifactId="akka-projection-eventsourced", version = "1.2." }
{ groupId = "com.lightbend.akka", artifactId="akka-projection-jdbc", version = "1.2." }
# Akka changed its license from Apache 2.0 (opensource) to Business Source License 1.1 (commercial) in the
# 2.2.0 release for akka-grpc. So, we want to stick to 2.1.x for now to avoid potential license-connected problems.
{ groupId = "com.lightbend.akka.grpc", artifactId="akka-grpc-runtime", version = "2.1." }
# Akka changed its license from Apache 2.0 (opensource) to Business Source License 1.1 (commercial) in the
# 10.3.0 release for akka-http. So, we want to stick to 10.2.x for now to avoid potential license-connected problems.
{ groupId = "com.typesafe.akka", artifactId="akka-http", version = "10.2." }
{ groupId = "com.typesafe.akka", artifactId="akka-http-spray-json", version = "10.2." }
{ groupId = "com.typesafe.akka", artifactId="akka-http2-support", version = "10.2." }
# Akka changed its license from Apache 2.0 (opensource) to Business Source License 1.1 (commercial) in the
# 1.2.0 release for akka-management - related modules. So, we want to stick to 1.1.x for now to avoid
# potential license-connected problems.
{ groupId = "com.lightbend.akka.management", artifactId="akka-management", version = "1.1." }
{ groupId = "com.lightbend.akka.management", artifactId="akka-management-cluster-http", version = "1.1." }
{ groupId = "com.lightbend.akka.management", artifactId="akka-management-cluster-bootstrap", version = "1.1." }
{ groupId = "com.lightbend.akka.discovery", artifactId="akka-discovery-kubernetes-api", version = "1.1." }
# Akka changed its license from Apache 2.0 (opensource) to Business Source License 1.1 (commercial) in the
# 5.2.0 release for akka-persistence-jdbc. So, we want to stick to 5.1.x for now to avoid
# potential license-connected problems.
{ groupId = "com.lightbend.akka", artifactId="akka-persistence-jdbc", version = "5.1." }
]
# <PEKKO-REMOVE-END>
}
4 changes: 2 additions & 2 deletions .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ OrganizeImports {
groups = [
"java.",
"scala.",
"akka.",
"org.apache.pekko.",
"*",
"org.virtuslab.ash"
"org.virtuslab.psh"
]
}
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ and using it in another project. Make sure that `mavenLocal` is added to the res
sbt publishM2
```

You can find two example applications that use Akka Serialization Helper:
- [akka-cluster-app](examples/akka-cluster-app)
- [akka-persistence-app](examples/akka-persistence-app)
You can find two example applications that use Pekko Serialization Helper:
- [pekko-cluster-app](examples/pekko-cluster-app)
- [pekko-persistence-app](examples/pekko-persistence-app)
These apps can be used for basic runtime testing as well. First, go to the app's directory:
```shell
cd examples/akka-cluster-app
cd examples/pekko-cluster-app
```
or
```shell
cd examples/akka-persistence-app
cd examples/pekko-persistence-app
```
And follow instructions from their README files.

Expand Down Expand Up @@ -68,7 +68,7 @@ Otherwise, incremental compilation might determine there is nothing to compile a

### Profiling

To profile akka-serialization-helper compiler plugin used in another project - follow instructions from https://www.lightbend.com/blog/profiling-jvm-applications
To profile pekko-serialization-helper compiler plugin used in another project - follow instructions from https://www.lightbend.com/blog/profiling-jvm-applications
You might as well use any other profiler, but using https://github.com/jvm-profiling-tools/async-profiler with flamegraphs should be really effective and easy to achieve (+ no unexpected bugs / issues / errors).

### Code quality
Expand All @@ -88,7 +88,7 @@ Releasing is done automatically by `sbt-ci-release` sbt plugin (read more on the

### Snapshots

The new `SNAPSHOT` version is automatically published by GitHub Actions to [Sonatype OSS Snapshot repo](https://oss.sonatype.org/content/repositories/snapshots/org/virtuslab/ash/)
The new `SNAPSHOT` version is automatically published by GitHub Actions to [Sonatype OSS Snapshot repo](https://oss.sonatype.org/content/repositories/snapshots/org/virtuslab/psh/)
every time a new commit is pushed to `main`.

To depend on the newest version with sbt, add the following setting:
Expand All @@ -99,7 +99,7 @@ to both `build.sbt` **and** `project/build.sbt` (so that the sbt plugin added in

### Maven Central

Releases to [Maven Central](https://repo1.maven.org/maven2/org/virtuslab/ash/) are triggered by pushing a lightweight git tag with a version number.
Releases to [Maven Central](https://repo1.maven.org/maven2/org/virtuslab/psh/) are triggered by pushing a lightweight git tag with a version number.

To publish version x.y.z, type in the console (on main branch):
```shell
Expand Down
Loading

0 comments on commit 255f11f

Please sign in to comment.