Skip to content

Commit

Permalink
Sync documentation of main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 7, 2024
1 parent 3035b23 commit e8e29de
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 17 deletions.
15 changes: 10 additions & 5 deletions _versions/main/guides/funqy-gcp-functions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ You will have a single JAR inside the `target/deployment` repository that contai
Then you will be able to use `gcloud` to deploy your function to Google Cloud.
The `gcloud` command will be different depending on which event triggers your function.

NOTE: We will use the Java 17 runtime but you can switch to the Java 21 runtime by using `--runtime=java21` instead of `--runtime=java17` on the deploy commands.
NOTE: We will use the Java 21 runtime, but you can switch to the Java 17 runtime by using `--runtime=java17` instead of `--runtime=java21` on the deploy commands.

[WARNING]
====
Expand All @@ -168,7 +168,7 @@ Use this command to deploy to Google Cloud Functions:
----
gcloud functions deploy quarkus-example-funky-pubsub \
--entry-point=io.quarkus.funqy.gcp.functions.FunqyBackgroundFunction \
--runtime=java17 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish \
--runtime=java21 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish \
--source=target/deployment
----

Expand Down Expand Up @@ -205,7 +205,7 @@ Then, use this command to deploy to Google Cloud Functions:
----
gcloud functions deploy quarkus-example-funky-storage \
--entry-point=io.quarkus.funqy.gcp.functions.FunqyBackgroundFunction \
--runtime=java17 --trigger-resource quarkus-hello --trigger-event google.storage.object.finalize \
--runtime=java21 --trigger-resource quarkus-hello --trigger-event google.storage.object.finalize \
--source=target/deployment
----

Expand Down Expand Up @@ -246,7 +246,7 @@ Then, use this command to deploy to Google Cloud Functions:
----
gcloud functions deploy quarkus-example-cloud-event --gen2 \
--entry-point=io.quarkus.funqy.gcp.functions.FunqyCloudEventsFunction \
--runtime=java17 --trigger-bucket=example-cloud-event --source=target/deployment
--runtime=java21 --trigger-bucket=example-cloud-event --source=target/deployment
----

[IMPORTANT]
Expand Down Expand Up @@ -371,7 +371,7 @@ This will call your cloud events function with an event on the `"MY_FILE.txt` fi

Quarkus provides built-in support for testing your Funqy Google Cloud functions via the `quarkus-test-google-cloud-functions` dependency.

To use it, you must add the following test dependency in your `pom.xml`.
To use it, you must add the following test dependencies in your `pom.xml`.

[source,xml]
----
Expand All @@ -380,6 +380,11 @@ To use it, you must add the following test dependency in your `pom.xml`.
<artifactId>quarkus-test-google-cloud-functions</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
----

This extension provides a `@WithFunction` annotation that can be used to annotate `@QuarkusTest` test cases to start a Cloud Function invoker before you test cases and stop it at the end.
Expand Down
4 changes: 2 additions & 2 deletions _versions/main/guides/gcp-functions-http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ The result of the previous command is a single JAR file inside the `target/deplo

Then you will be able to use `gcloud` to deploy your function to Google Cloud.

NOTE: We will use the Java 17 runtime but you can switch to the Java 21 runtime by using `--runtime=java21` instead of `--runtime=java17` on the deploy commands.
NOTE: We will use the Java 21 runtime, but you can switch to the Java 17 runtime by using `--runtime=java17` instead of `--runtime=java21` on the deploy commands.

[source,bash]
----
gcloud functions deploy quarkus-example-http \
--entry-point=io.quarkus.gcp.functions.http.QuarkusHttpFunction \
--runtime=java17 --trigger-http --allow-unauthenticated --source=target/deployment
--runtime=java21 --trigger-http --allow-unauthenticated --source=target/deployment
----

[IMPORTANT]
Expand Down
15 changes: 10 additions & 5 deletions _versions/main/guides/gcp-functions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ The result of the previous command is a single JAR file inside the `target/deplo
Then you will be able to use `gcloud` to deploy your function to Google Cloud.
The `gcloud` command will be different depending on which event triggers your function.

NOTE: We will use the Java 17 runtime but you can switch to the Java 21 runtime by using `--runtime=java21` instead of `--runtime=java17` on the deploy commands.
NOTE: We will use the Java 21 runtime but you can switch to the Java 17 runtime by using `--runtime=java17` instead of `--runtime=java21` on the deploy commands.

[WARNING]
====
Expand All @@ -262,7 +262,7 @@ This is an example command to deploy your `HttpFunction` to Google Cloud:
----
gcloud functions deploy quarkus-example-http \
--entry-point=io.quarkus.gcp.functions.QuarkusHttpFunction \
--runtime=java17 --trigger-http --allow-unauthenticated --source=target/deployment
--runtime=java21 --trigger-http --allow-unauthenticated --source=target/deployment
----

[IMPORTANT]
Expand All @@ -289,7 +289,7 @@ it needs to use `--trigger-event google.storage.object.finalize` and the `--trig
gcloud functions deploy quarkus-example-storage \
--entry-point=io.quarkus.gcp.functions.QuarkusBackgroundFunction \
--trigger-resource quarkus-hello --trigger-event google.storage.object.finalize \
--runtime=java17 --source=target/deployment
--runtime=java21 --source=target/deployment
----

[IMPORTANT]
Expand All @@ -315,7 +315,7 @@ it needs to use `--trigger-event google.pubsub.topic.publish` and the `--trigger
----
gcloud functions deploy quarkus-example-pubsub \
--entry-point=io.quarkus.gcp.functions.QuarkusBackgroundFunction \
--runtime=java17 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish --source=target/deployment
--runtime=java21 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish --source=target/deployment
----

[IMPORTANT]
Expand All @@ -341,7 +341,7 @@ it needs to use `--trigger-bucket` parameter with the name of a previously creat
----
gcloud functions deploy quarkus-example-cloud-event --gen2 \
--entry-point=io.quarkus.gcp.functions.QuarkusCloudEventsFunction \
--runtime=java17 --trigger-bucket=example-cloud-event --source=target/deployment
--runtime=java21 --trigger-bucket=example-cloud-event --source=target/deployment
----

[IMPORTANT]
Expand Down Expand Up @@ -485,6 +485,11 @@ To use it, you must add the following test dependency in your `pom.xml`.
<artifactId>quarkus-test-google-cloud-functions</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
----

This extension provides a `@WithFunction` annotation that can be used to annotate `@QuarkusTest` test cases to start a Cloud Function invoker before you test cases and stop it at the end.
Expand Down
4 changes: 2 additions & 2 deletions _versions/main/guides/opentelemetry-tracing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ We have 2 options:

* Take a look at: xref:observability-devservices-lgtm.adoc[Getting Started with Grafana-OTel-LGTM].

This features a Quarkus Dev service including a Grafana for visualizing data, Loki to store logs, Tempo to store traces and Prometheus to store metrics. Also provides and OTel collector to receive the data.
This features a Quarkus Dev service including a Grafana for visualizing data, Loki to store logs, Tempo to store traces and Prometheus to store metrics. Also provides an OTel collector to receive the data.

=== Jaeger to see traces option

Expand All @@ -148,7 +148,7 @@ services:
- "16686:16686" # Jaeger UI
- "14268:14268" # Receive legacy OpenTracing traces, optional
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver, not yet used by Quarkus, optional
- "4318:4318" # OTLP HTTP receiver
- "14250:14250" # Receive from external otel-collector, optional
environment:
- COLLECTOR_OTLP_ENABLED=true
Expand Down
6 changes: 6 additions & 0 deletions _versions/main/guides/smallrye-graphql-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ that the target of the client is the application that is being tested (typically
This is useful if your application contains a GraphQL server-side API as well as a GraphQL client that is used for
testing the API.

If you need to add an authorization header, or any other custom HTTP header (in our case
it's not required), this can be done with a configuration in the configuration file as well:
----
quarkus.smallrye-graphql-client.star-wars-typesafe.header.HEADER-KEY=HEADER-VALUE
----

`star-wars-typesafe` is the name of the configured client instance, and corresponds to the `configKey`
in the `@GraphQLClientApi` annotation. If you don't want to specify a custom name, you can leave
out the `configKey`, and then refer to it by using the fully qualified name of the interface.
Expand Down
4 changes: 2 additions & 2 deletions _versions/main/guides/websockets-next-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ The solution is located in the `websockets-next-quickstart` link:{quickstarts-tr

First, we need a new project. Create a new project with the following command:

:create-app-artifact-id: websockets-quickstart
:create-app-extensions: websockets
:create-app-artifact-id: websockets-next-quickstart
:create-app-extensions: websockets-next
include::{includes}/devtools/create-app.adoc[]

This command generates the project (without any classes) and imports the `websockets-next` extension.
Expand Down
2 changes: 1 addition & 1 deletion _versions/main/guides/writing-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,7 @@ static record KeyPairContext(Map<String, String> properties) {}

<1> You can retrieve the context from `LiveReloadBuildItem`. This call returns `null` if there is no context for the specified type; otherwise, it returns the stored instance from a previous live reload execution.
<2> You can check if this is the first execution (not a live reload).
<3> The `LiveReloadBuildItem#setContext` method allows you to set a context across live reloads.
<3> The `LiveReloadBuildItem#setContextObject` method allows you to set a context across live reloads.

==== Triggering Live Reload

Expand Down

0 comments on commit e8e29de

Please sign in to comment.