Skip to content

Commit

Permalink
feat(run-v2): Support for the Builds service and submit_build RPC
Browse files Browse the repository at this point in the history
feat(run-v2): Support for service mesh connectivity
feat(run-v2): Support for revision node selector
feat(run-v2): Support for service scaling modes
feat(run-v2): Support for disabling IAM permission check for invokers
feat(run-v2): Services now report all URLs serving traffic
  • Loading branch information
gcf-owl-bot[bot] authored Oct 7, 2024
1 parent 31cadc7 commit 5771d54
Show file tree
Hide file tree
Showing 35 changed files with 2,161 additions and 30 deletions.
14 changes: 14 additions & 0 deletions google-cloud-run-v2/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
"google-cloud-run-v2.gemspec",
"lib/google-cloud-run-v2.rb",
"lib/google/cloud/run/v2.rb",
"lib/google/cloud/run/v2/build_pb.rb",
"lib/google/cloud/run/v2/build_services_pb.rb",
"lib/google/cloud/run/v2/builds.rb",
"lib/google/cloud/run/v2/builds/client.rb",
"lib/google/cloud/run/v2/builds/credentials.rb",
"lib/google/cloud/run/v2/builds/paths.rb",
"lib/google/cloud/run/v2/builds/rest.rb",
"lib/google/cloud/run/v2/builds/rest/client.rb",
"lib/google/cloud/run/v2/builds/rest/service_stub.rb",
"lib/google/cloud/run/v2/condition_pb.rb",
"lib/google/cloud/run/v2/execution_pb.rb",
"lib/google/cloud/run/v2/execution_services_pb.rb",
Expand Down Expand Up @@ -84,6 +93,7 @@
"proto_docs/google/api/launch_stage.rb",
"proto_docs/google/api/resource.rb",
"proto_docs/google/api/routing.rb",
"proto_docs/google/cloud/run/v2/build.rb",
"proto_docs/google/cloud/run/v2/condition.rb",
"proto_docs/google/cloud/run/v2/execution.rb",
"proto_docs/google/cloud/run/v2/execution_template.rb",
Expand All @@ -109,6 +119,7 @@
"proto_docs/google/rpc/status.rb",
"proto_docs/google/type/expr.rb",
"snippets/Gemfile",
"snippets/builds/submit_build.rb",
"snippets/executions/cancel_execution.rb",
"snippets/executions/delete_execution.rb",
"snippets/executions/get_execution.rb",
Expand Down Expand Up @@ -136,6 +147,9 @@
"snippets/snippet_metadata_google.cloud.run.v2.json",
"snippets/tasks/get_task.rb",
"snippets/tasks/list_tasks.rb",
"test/google/cloud/run/v2/builds_paths_test.rb",
"test/google/cloud/run/v2/builds_rest_test.rb",
"test/google/cloud/run/v2/builds_test.rb",
"test/google/cloud/run/v2/executions_operations_test.rb",
"test/google/cloud/run/v2/executions_paths_test.rb",
"test/google/cloud/run/v2/executions_rest_test.rb",
Expand Down
8 changes: 4 additions & 4 deletions google-cloud-run-v2/AUTHENTICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
```ruby
require "google/cloud/run/v2"

client = ::Google::Cloud::Run::V2::Executions::Client.new do |config|
client = ::Google::Cloud::Run::V2::Builds::Client.new do |config|
config.credentials = "path/to/credentialfile.json"
end
```
Expand All @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients:
```ruby
require "google/cloud/run/v2"

::Google::Cloud::Run::V2::Executions::Client.configure do |config|
::Google::Cloud::Run::V2::Builds::Client.configure do |config|
config.credentials = "path/to/credentialfile.json"
end

client = ::Google::Cloud::Run::V2::Executions::Client.new
client = ::Google::Cloud::Run::V2::Builds::Client.new
```

### Environment Variables
Expand Down Expand Up @@ -100,7 +100,7 @@ require "google/cloud/run/v2"

ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"

client = ::Google::Cloud::Run::V2::Executions::Client.new
client = ::Google::Cloud::Run::V2::Builds::Client.new
```

### Local ADC file
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-run-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps:
```ruby
require "google/cloud/run/v2"

client = ::Google::Cloud::Run::V2::Executions::Client.new
request = ::Google::Cloud::Run::V2::GetExecutionRequest.new # (request fields as keyword arguments...)
response = client.get_execution request
client = ::Google::Cloud::Run::V2::Builds::Client.new
request = ::Google::Cloud::Run::V2::SubmitBuildRequest.new # (request fields as keyword arguments...)
response = client.submit_build request
```

View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest)
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-run-v2/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args|
if project.nil? || keyfile.nil?
fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance"
end
require "google/cloud/run/v2/executions/credentials"
::Google::Cloud::Run::V2::Executions::Credentials.env_vars.each do |path|
require "google/cloud/run/v2/builds/credentials"
::Google::Cloud::Run::V2::Builds::Credentials.env_vars.each do |path|
ENV[path] = nil
end
ENV["GOOGLE_CLOUD_PROJECT"] = project
Expand Down
14 changes: 14 additions & 0 deletions google-cloud-run-v2/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
"protoPackage": "google.cloud.run.v2",
"libraryPackage": "::Google::Cloud::Run::V2",
"services": {
"Builds": {
"clients": {
"grpc": {
"libraryClient": "::Google::Cloud::Run::V2::Builds::Client",
"rpcs": {
"SubmitBuild": {
"methods": [
"submit_build"
]
}
}
}
}
},
"Executions": {
"clients": {
"grpc": {
Expand Down
5 changes: 3 additions & 2 deletions google-cloud-run-v2/lib/google/cloud/run/v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "google/cloud/run/v2/builds"
require "google/cloud/run/v2/executions"
require "google/cloud/run/v2/jobs"
require "google/cloud/run/v2/revisions"
Expand All @@ -32,12 +33,12 @@ module Run
# @example Load this package, including all its services, and instantiate a gRPC client
#
# require "google/cloud/run/v2"
# client = ::Google::Cloud::Run::V2::Executions::Client.new
# client = ::Google::Cloud::Run::V2::Builds::Client.new
#
# @example Load this package, including all its services, and instantiate a REST client
#
# require "google/cloud/run/v2"
# client = ::Google::Cloud::Run::V2::Executions::Rest::Client.new
# client = ::Google::Cloud::Run::V2::Builds::Rest::Client.new
#
module V2
end
Expand Down
53 changes: 53 additions & 0 deletions google-cloud-run-v2/lib/google/cloud/run/v2/build_pb.rb

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

45 changes: 45 additions & 0 deletions google-cloud-run-v2/lib/google/cloud/run/v2/build_services_pb.rb

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

55 changes: 55 additions & 0 deletions google-cloud-run-v2/lib/google/cloud/run/v2/builds.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# frozen_string_literal: true

# Copyright 2024 Google LLC
#
# Licensed 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
#
# https://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.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "gapic/common"
require "gapic/config"
require "gapic/config/method"

require "google/cloud/run/v2/version"

require "google/cloud/run/v2/builds/credentials"
require "google/cloud/run/v2/builds/paths"
require "google/cloud/run/v2/builds/client"
require "google/cloud/run/v2/builds/rest"

module Google
module Cloud
module Run
module V2
##
# Cloud Run Build Control Plane API
#
# @example Load this service and instantiate a gRPC client
#
# require "google/cloud/run/v2/builds"
# client = ::Google::Cloud::Run::V2::Builds::Client.new
#
# @example Load this service and instantiate a REST client
#
# require "google/cloud/run/v2/builds/rest"
# client = ::Google::Cloud::Run::V2::Builds::Rest::Client.new
#
module Builds
end
end
end
end
end

helper_path = ::File.join __dir__, "builds", "helpers.rb"
require "google/cloud/run/v2/builds/helpers" if ::File.file? helper_path
Loading

0 comments on commit 5771d54

Please sign in to comment.