Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/http2/node-grpc/grpc…
Browse files Browse the repository at this point in the history
…/grpc-js-1.11.2
  • Loading branch information
hoffmaen authored Sep 13, 2024
2 parents 863ad0d + c5cad53 commit 1bc0ef6
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 38 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/test-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
runs-on: ubuntu-latest
concurrency: test-landscape
environment: cf_env
env:
HOSTNAME_PREFIX: gh-run-${{ github.run_id }}-
steps:
- name: Limit access
if: |
Expand Down Expand Up @@ -59,20 +61,22 @@ jobs:
- name: Logging into target CloudFoundry
run: cf8 login -a "${{ secrets.CF_API }}" -u "${{ secrets.CF_USERNAME }}" -p "${{ secrets.CF_PASSWORD }}" -o "${{ secrets.CF_ORG }}" -s "${{ secrets.CF_SPACE }}" --origin uaa
- name: Deploy CloudFoundry sample apps
run: cf8 push -f "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" --var domain=${{ secrets.CF_DOMAIN }} --vars-file "${GITHUB_WORKSPACE}/http2/gradle.properties"
run: cf8 push -f "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" --var domain=${{ secrets.CF_DOMAIN }} --var hostname_prefix="$HOSTNAME_PREFIX" --vars-file "${GITHUB_WORKSPACE}/http2/gradle.properties"
- name: Test Sample apps
run: |
get_route() {
echo "${HOSTNAME_PREFIX}${1}.${{ secrets.CF_DOMAIN }}"
}
echo "### Testing HTTP2_APP app ###"
yq e '.applications.[].name' "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" | grep -i 'http2' | while read -r HTTP2_APP; do
echo "curl -v --http2-prior-knowledge -H 'Connection: close' 'https://$HTTP2_APP.${{ secrets.CF_DOMAIN }}'"
curl -v --http2-prior-knowledge -H "Connection: close" "https://$HTTP2_APP.${{ secrets.CF_DOMAIN }}"
curl -v --http2-prior-knowledge -H 'Connection: close' "https://$(get_route "$HTTP2_APP")"
done
echo "Testing GRPC apps"
grpcurl go-grpc-test.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
grpcurl -proto http2/java-grpc/app/src/main/proto/example.proto java-grpc-test.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
grpcurl -proto http2/node-grpc/example.proto node-grpc-test.${{ secrets.CF_DOMAIN }}:443 Example.Run
grpcurl -proto http2/python-grpc/example.proto python-grpc-test.${{ secrets.CF_DOMAIN }}:443 Example.Run
grpcurl -proto http2/ruby-grpc/example.proto ruby-grpc-test.${{ secrets.CF_DOMAIN }}:443 Example.Run
grpcurl $(get_route go-grpc-test):443 example.Example.Run
grpcurl -proto http2/java-grpc/app/src/main/proto/example.proto $(get_route java-grpc-test):443 example.Example.Run
grpcurl -proto http2/node-grpc/example.proto $(get_route node-grpc-test):443 Example.Run
grpcurl -proto http2/python-grpc/example.proto $(get_route python-grpc-test):443 Example.Run
grpcurl -proto http2/ruby-grpc/example.proto $(get_route ruby-grpc-test):443 Example.Run
- name: Clean-up
if: success() || failure()
run: |
Expand Down
20 changes: 10 additions & 10 deletions http2/apps-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ applications:
buildpacks:
- go_buildpack
routes:
- route: go-grpc-test.((domain))
- route: ((hostname_prefix))go-grpc-test.((domain))
protocol: http2
- name: go-http2-test
<<: *stack
Expand All @@ -34,7 +34,7 @@ applications:
buildpacks:
- go_buildpack
routes:
- route: go-http2-test.((domain))
- route: ((hostname_prefix))go-http2-test.((domain))
protocol: http2
- name: java-grpc-test
<<: *stack
Expand All @@ -43,7 +43,7 @@ applications:
buildpacks:
- java_buildpack
routes:
- route: java-grpc-test.((domain))
- route: ((hostname_prefix))java-grpc-test.((domain))
protocol: http2
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ }}'
Expand All @@ -54,7 +54,7 @@ applications:
buildpacks:
- java_buildpack
routes:
- route: java-http2-test.((domain))
- route: ((hostname_prefix))java-http2-test.((domain))
protocol: http2
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ }}'
Expand All @@ -65,7 +65,7 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
routes:
- route: node-grpc-test.((domain))
- route: ((hostname_prefix))node-grpc-test.((domain))
protocol: http2
- name: node-http2-test
<<: *stack
Expand All @@ -74,7 +74,7 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
routes:
- route: node-http2-test.((domain))
- route: ((hostname_prefix))node-http2-test.((domain))
protocol: http2
- name: python-grpc-test
<<: *stack
Expand All @@ -83,7 +83,7 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/python-buildpack
routes:
- route: python-grpc-test.((domain))
- route: ((hostname_prefix))python-grpc-test.((domain))
protocol: http2
- name: python-http2-test
<<: *stack
Expand All @@ -92,7 +92,7 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/python-buildpack
routes:
- route: python-http2-test.((domain))
- route: ((hostname_prefix))python-http2-test.((domain))
protocol: http2
- name: ruby-grpc-test
<<: *stack
Expand All @@ -101,7 +101,7 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/ruby-buildpack
routes:
- route: ruby-grpc-test.((domain))
- route: ((hostname_prefix))ruby-grpc-test.((domain))
protocol: http2
- name: ruby-http2-test
<<: *stack
Expand All @@ -110,5 +110,5 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/ruby-buildpack
routes:
- route: ruby-http2-test.((domain))
- route: ((hostname_prefix))ruby-http2-test.((domain))
protocol: http2
2 changes: 1 addition & 1 deletion http2/go-grpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/SAP-samples/cf-routing-samples/go-grpc
go 1.21.0

require (
google.golang.org/grpc v1.66.0
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
)

Expand Down
4 changes: 2 additions & 2 deletions http2/go-grpc/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo=
google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
2 changes: 1 addition & 1 deletion http2/java-http2/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
}

dependencies {
implementation platform('io.projectreactor:reactor-bom:2023.0.9')
implementation platform('io.projectreactor:reactor-bom:2023.0.10')
implementation 'io.projectreactor.netty:reactor-netty-core'
implementation 'io.projectreactor.netty:reactor-netty-http'
}
Expand Down
14 changes: 9 additions & 5 deletions http2/ruby-grpc/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
google-protobuf (3.25.3)
googleapis-common-protos-types (1.14.0)
google-protobuf (~> 3.18)
grpc (1.64.0)
google-protobuf (~> 3.25)
bigdecimal (3.1.8)
google-protobuf (4.27.3)
bigdecimal
rake (>= 13)
googleapis-common-protos-types (1.15.0)
google-protobuf (>= 3.18, < 5.a)
grpc (1.66.0)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc-tools (1.66.0)
rake (13.2.1)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion http2/ruby-grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ grpcurl -proto example.proto ruby-grpc-test.my.cf.app.domain:443 Example.Run
2. `PORT=8080 bundle exec ruby server.rb`
3. `grpcurl -proto example.proto -plaintext localhost:8080 Example.Run`

### Renerating code
### Regenerating code

```shell
bundle install --path vendor/bundle
Expand Down
15 changes: 6 additions & 9 deletions http2/ruby-grpc/example_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion http2/vars.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
domain: <domain.for.app.routes>

hostname_prefix: ""

0 comments on commit 1bc0ef6

Please sign in to comment.