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/06/16 08:31:40 UTC
[incubator-pekko-grpc] branch main updated: use coursier github actions (#94)
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-grpc.git
The following commit(s) were added to refs/heads/main by this push:
new c6b2fefc use coursier github actions (#94)
c6b2fefc is described below
commit c6b2fefc04596f2fcb5d08b844590b4335323d45
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Fri Jun 16 09:31:34 2023 +0100
use coursier github actions (#94)
wrong action
Update link-validator.yml
fix some doc issues
more link fixes
Update link-validator.conf
Update link-validator.conf
Update gradle.md
Update link-validator.yml
---
.github/workflows/link-validator.yml | 13 +++++++------
build.sbt | 6 +++---
docs/src/main/paradox/apidesign.md | 6 +++---
docs/src/main/paradox/buildtools/gradle.md | 8 +++++---
docs/src/main/paradox/client/details.md | 2 +-
docs/src/main/paradox/overview.md | 2 +-
docs/src/main/paradox/proto.md | 4 ++--
docs/src/main/paradox/server/details.md | 2 +-
docs/src/main/paradox/server/kubernetes.md | 2 +-
docs/src/main/paradox/server/pekko-http.md | 2 +-
project/project-info.conf | 2 +-
scripts/link-validator.conf | 2 ++
12 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/link-validator.yml b/.github/workflows/link-validator.yml
index aa2e2b71..90573ebb 100644
--- a/.github/workflows/link-validator.yml
+++ b/.github/workflows/link-validator.yml
@@ -2,6 +2,7 @@ name: Link Validator
on:
pull_request:
+ workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
@@ -17,23 +18,23 @@ jobs:
# fetch everything https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0
- - name: Setup Java 8
+ - name: Setup Java 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Cache Coursier cache
- uses: coursier/cache-action@v6
+ uses: coursier/cache-action@v6.4.0
+
+ - name: Setup Coursier
+ uses: coursier/setup-action@v1.3.3
- name: sbt site
run: sbt docs/makeSite
- - name: Install Coursier command line tool
- run: curl -fLo cs https://git.io/coursier-cli-linux && chmod +x cs && ./cs
-
- name: Run Link Validator
run: |
VERSION=$(ls docs/target/site/docs/pekko-grpc)
sed -e "s/snapshot/$VERSION/" scripts/link-validator.conf > /tmp/link-validator.conf
- ./cs launch net.runne::site-link-validator:0.2.0 -- /tmp/link-validator.conf
+ cs launch net.runne::site-link-validator:0.2.2 -- /tmp/link-validator.conf
diff --git a/build.sbt b/build.sbt
index 2a167505..c9639e0c 100644
--- a/build.sbt
+++ b/build.sbt
@@ -205,9 +205,9 @@ lazy val docs = Project(id = "docs", base = file("docs"))
"canonical.base_url" -> "https://pekko.apache.org/docs/pekko-grpc/current",
"scaladoc.scala.base_url" -> s"https://www.scala-lang.org/api/current/",
// Apache Pekko
- "extref.pekko.base_url" -> s"https://pekko.apache.org/docs/pekko-grpc/current/%s",
- "scaladoc.pekko.base_url" -> "https://pekko.apache.org/docs/pekko-grpc/current/",
- "javadoc.pekko.base_url" -> "https://pekko.apache.org/docs/pekko-grpc/current/",
+ "extref.pekko.base_url" -> s"https://pekko.apache.org/docs/pekko/current/%s",
+ "scaladoc.pekko.base_url" -> "https://pekko.apache.org/docs/pekko/current/",
+ "javadoc.pekko.base_url" -> "https://pekko.apache.org/docs/pekko/current/",
// Apache Pekko HTTP
"extref.pekko-http.base_url" -> s"https://pekko.apache.org/docs/pekko-http/${Dependencies.Versions.pekkoHttpBinary}/%s",
"scaladoc.pekko-http.base_url" -> s"https://pekko.apache.org/api/pekko-http/${Dependencies.Versions.pekkoHttpBinary}/",
diff --git a/docs/src/main/paradox/apidesign.md b/docs/src/main/paradox/apidesign.md
index 588ceced..e45a1dc8 100644
--- a/docs/src/main/paradox/apidesign.md
+++ b/docs/src/main/paradox/apidesign.md
@@ -7,7 +7,7 @@ When designing a gRPC API, you could take into consideration some of the
If you want to create an endpoint that takes no parameters or produces no
response, it might be tempting to use the `Empty` type as defined by
-Google in their [empty.proto](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto).
+Google in their [empty.proto](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/empty.proto).
It is recommended to introduce your own (empty) message types, however, as
functionality may grow and this prepares you for adding additional (optional) fields
@@ -15,14 +15,14 @@ over time.
## Declare and enforce constraints for your request and response payloads with `protoc-gen-validate`
-[`protoc-gen-validate` (PGV)](https://github.com/envoyproxy/protoc-gen-validate) defines
+[`protoc-gen-validate` (PGV)](https://github.com/bufbuild/protoc-gen-validate) defines
a set of Protobuf options allowing to add additional rules on messages and fields in a declarative
fashion. A set of validators for different languages is also provided, to enforce these rules at
runtime.
### Java support
-Validators for Java stubs are provided by [the project itself](https://github.com/envoyproxy/protoc-gen-validate#java).
+Validators for Java stubs are provided by [the project itself](https://github.com/bufbuild/protoc-gen-validate#java).
Follow the instructions there for Maven and Gradle. If your are using sbt, you can get
`validate.proto` into the include path and run the protoc plugin generating the validators
diff --git a/docs/src/main/paradox/buildtools/gradle.md b/docs/src/main/paradox/buildtools/gradle.md
index 83a2013c..366c2e8c 100644
--- a/docs/src/main/paradox/buildtools/gradle.md
+++ b/docs/src/main/paradox/buildtools/gradle.md
@@ -1,6 +1,6 @@
# Gradle
-To get started with Pekko gRPC read the @ref[client](../client/index.md) or @ref[server](../server/index.md) introductions.
+To get started with Pekko gRPC, read the @ref[client](../client/index.md) or @ref[server](../server/index.md) introductions.
## Configuring plugin
@@ -9,10 +9,12 @@ Most of the settings could be configured using related setting of `protobuf-grad
Consult [protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin#protobuf-plugin-for-gradle-) documentation for details.
The plugin can generate either Java or Scala classes, and then server and or client for the corresponding language.
-By default both client and server are generated and Java or Scala is autodetected depending on the presence of source files with language extension in `src/main`.
+By default, both client and server are generated and Java or Scala is autodetected depending on the presence of source files with language extension in `src/main`.
### Installation
+**The Gradle plugin is not yet deployed to plugins.gradle.org.**
+
Follow instructions at [Gradle plugin portal](https://plugins.gradle.org/plugin/org.apache.pekko.grpc.gradle) to apply plugin.
### Available plugin options
@@ -99,4 +101,4 @@ Then, the server can then be started from the command line with:
## Play Framework support
-See the [Play gRPC documentation](https://developer.lightbend.com/docs/play-grpc/current/play/gradle-support.html) for details.
+See the [Play gRPC documentation](https://github.com/playframework/play-grpc) for details.
diff --git a/docs/src/main/paradox/client/details.md b/docs/src/main/paradox/client/details.md
index 02d0d518..d22864e8 100644
--- a/docs/src/main/paradox/client/details.md
+++ b/docs/src/main/paradox/client/details.md
@@ -76,7 +76,7 @@ Java
## Rich error model
-Beyond status codes you can also use the [Rich error model](https://www.grpc.io/docs/guides/error/#richer-error-model). Currently there is no particular support for consuming such error objects (such as the ones based on the [common protobuf](https://cloud.google.com/apis/design/errors#error_model), but you can obtain them 'manually'.
+Beyond status codes you can also use the [Rich error model](https://grpc.io/docs/guides/error/#richer-error-model). Currently there is no particular support for consuming such error objects (such as the ones based on the [common protobuf](https://cloud.google.com/apis/design/errors#error_model), but you can obtain them 'manually'.
Extract the `StatusRuntimeException` and parse the Rich error model to access `code`, `message` and `details`. Then find the details you are looking for based on their `typeUrl` and unpack them:
diff --git a/docs/src/main/paradox/overview.md b/docs/src/main/paradox/overview.md
index 971d8745..841f5d31 100644
--- a/docs/src/main/paradox/overview.md
+++ b/docs/src/main/paradox/overview.md
@@ -23,7 +23,7 @@ It features:
- @extref[Pekko HTTP/2 support](pekko-http:server-side/http2.html) for the server side and
- `grpc-netty-shaded` for the client side.
* Support for @ref[sbt](buildtools/sbt.md), @ref[gradle](buildtools/gradle.md), @ref[Maven](buildtools/maven.md),
- and the [Play Framework](https://developer.lightbend.com/docs/play-grpc/current/).
+ and the [Play Framework](https://github.com/playframework/play-grpc).
## Project Information
diff --git a/docs/src/main/paradox/proto.md b/docs/src/main/paradox/proto.md
index 4da9c593..3adb3474 100644
--- a/docs/src/main/paradox/proto.md
+++ b/docs/src/main/paradox/proto.md
@@ -3,7 +3,7 @@
gRPC uses the Protobuf `.proto` file format to define your messages, services
and some aspects of the code generation.
-For an in-depth description see the [Protocol buffers documentation](https://developers.google.com/protocol-buffers/docs/proto3),
+For an in-depth description see the [Protocol buffers documentation](https://protobuf.dev/programming-guides/proto3),
but here are a few quick examples:
## Messages
@@ -26,7 +26,7 @@ There are a number of options that can be set in the `.proto` definition that in
@@snip [helloworld.proto](/plugin-tester-scala/src/main/protobuf/helloworld.proto) { #options }
-The (optional) [`package`](https://developers.google.com/protocol-buffers/docs/proto3#packages)
+The (optional) [`package`](https://protobuf.dev/programming-guides/proto3#packages)
in the `.proto` is used to resolve references from one `.proto` file to another.
It can also be used for the package name in the generated code, but it is
common to use the separate `java_package` option to override it. In the Pekko gRPC
diff --git a/docs/src/main/paradox/server/details.md b/docs/src/main/paradox/server/details.md
index 1a4b4da2..f3f47342 100644
--- a/docs/src/main/paradox/server/details.md
+++ b/docs/src/main/paradox/server/details.md
@@ -44,7 +44,7 @@ Java
: @@snip[ExceptionGreeterServiceImpl](/interop-tests/src/test/java/example/myapp/helloworld/grpc/ExceptionGreeterServiceImpl.java) { #streaming }
## Rich error model
-Beyond status codes you can also use the [Rich error model](https://www.grpc.io/docs/guides/error/#richer-error-model).
+Beyond status codes you can also use the [Rich error model](https://grpc.io/docs/guides/error/#richer-error-model).
This example uses an error model taken from [common protobuf](https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto) but every class that is based on `scalapb.GeneratedMessage` can be used. Build and return the error as a `PekkoGrpcException`:
diff --git a/docs/src/main/paradox/server/kubernetes.md b/docs/src/main/paradox/server/kubernetes.md
index 6ba8625c..f144f622 100644
--- a/docs/src/main/paradox/server/kubernetes.md
+++ b/docs/src/main/paradox/server/kubernetes.md
@@ -10,7 +10,7 @@ There are 3 ways to use HTTP/2:
* HTTP/2 over plaintext TCP ('h2c'), without negotiation. This assumes the client has prior knowledge that the server supports HTTP/2.
A straightforward way to expose a TCP endpoint outside the cluster is to create a Kubernetes `Service` of type `LoadBalancer`. Beyond that, Kubernetes supports many types of [Ingress Controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
-[GCE](https://github.com/kubernetes/ingress-gce/blob/master/README.md) and [NGINX](https://github.com/kubernetes/ingress-nginx/blob/master/README.md)
+[GCE](https://github.com/kubernetes/ingress-gce/blob/master/README.md) and [NGINX](https://github.com/kubernetes/ingress-nginx/blob/main/README.md)
are the most widely known.
## LoadBalancer Service
diff --git a/docs/src/main/paradox/server/pekko-http.md b/docs/src/main/paradox/server/pekko-http.md
index 2af182c4..9150b07c 100644
--- a/docs/src/main/paradox/server/pekko-http.md
+++ b/docs/src/main/paradox/server/pekko-http.md
@@ -1,6 +1,6 @@
# Pekko HTTP interop
-Pekko gRPC is built on top of [Pekko HTTP](https://pekko.apache.org/docs/pekko-http).
+Pekko gRPC is built on top of @extref[Pekko HTTP](pekko-http:).
This means it is possible to leverage the Pekko HTTP API's to create more
complicated services, for example serving non-gRPC endpoints next to
gRPC endpoints or adding additional behavior around your gRPC routes.
diff --git a/project/project-info.conf b/project/project-info.conf
index 07c20b69..e3b754e0 100644
--- a/project/project-info.conf
+++ b/project/project-info.conf
@@ -3,7 +3,7 @@ project-info {
shared-info {
jdk-versions: ["OpenJDK 8", "OpenJDK 11", "OpenJDK 17"]
snapshots: {
- url: "https://repository.apache.org/content/groups/snapshots/org/apache/pekko/grpc/"
+ url: "https://repository.apache.org/content/groups/snapshots/org/apache/pekko/"
text: "Snapshots are available from Apache Snapshots Repository"
}
issues: {
diff --git a/scripts/link-validator.conf b/scripts/link-validator.conf
index e3c1bc52..f3cb659a 100644
--- a/scripts/link-validator.conf
+++ b/scripts/link-validator.conf
@@ -22,6 +22,8 @@ site-link-validator {
"https://github.com/apache/incubator-pekko-grpc/"
# MVN repository forbids access after a few requests
"https://mvnrepository.com/artifact/"
+ # we haven't yet set up the gradle plugin on plugins.gradle.org
+ "https://plugins.gradle.org/plugin/org.apache.pekko.grpc.gradle"
]
non-https-whitelist = []
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org