Unverified Commit 0e7c3d64 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #64848 from yguo0905/automated-cherry-pick-of-#64727-upstream-release-1.10

Automatic merge from submit-queue. Automated cherry pick of #64727: Update GCE cloud provider to use Cloud TPU v1 API Cherry pick of #64727 on release-1.10. #64727: Update GCE cloud provider to use Cloud TPU v1 API
parents af0d3570 31d3a180
......@@ -3099,51 +3099,51 @@
},
{
"ImportPath": "google.golang.org/api/cloudmonitoring/v2beta2",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/compute/v0.alpha",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/compute/v0.beta",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/compute/v1",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/container/v1",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/gensupport",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/googleapi",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/googleapi/internal/uritemplates",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/logging/v2beta1",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/monitoring/v3",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/pubsub/v1",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/api/tpu/v1alpha1",
"Rev": "7f657476956314fee258816aaf81c0ff65cf8bee"
"ImportPath": "google.golang.org/api/tpu/v1",
"Rev": "8e296ef260056b6323d10727db40512dac6d92d5"
},
{
"ImportPath": "google.golang.org/genproto/googleapis/api/annotations",
......
......@@ -93030,7 +93030,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================================================
= vendor/google.golang.org/api/tpu/v1alpha1 licensed under: =
= vendor/google.golang.org/api/tpu/v1 licensed under: =
Copyright (c) 2011 Google Inc. All rights reserved.
......@@ -70,7 +70,7 @@ go_library(
"//vendor/google.golang.org/api/compute/v1:go_default_library",
"//vendor/google.golang.org/api/container/v1:go_default_library",
"//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/tpu/v1alpha1:go_default_library",
"//vendor/google.golang.org/api/tpu/v1:go_default_library",
"//vendor/gopkg.in/gcfg.v1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
......
......@@ -25,7 +25,7 @@ import (
"github.com/golang/glog"
"google.golang.org/api/googleapi"
tpuapi "google.golang.org/api/tpu/v1alpha1"
tpuapi "google.golang.org/api/tpu/v1"
"k8s.io/apimachinery/pkg/util/wait"
)
......@@ -165,7 +165,7 @@ func (gce *GCECloud) waitForTPUOp(interval, timeout time.Duration, op *tpuapi.Op
// newTPUMetricContext returns a new metricContext used for recording metrics
// of Cloud TPU API calls.
func newTPUMetricContext(request, zone string) *metricContext {
return newGenericMetricContext("tpus", request, unusedMetricLabel, zone, "alpha")
return newGenericMetricContext("tpus", request, unusedMetricLabel, zone, "v1")
}
// getErrorFromTPUOp returns the error in the failed op, or nil if the op
......
......@@ -413,7 +413,7 @@ filegroup(
"//vendor/google.golang.org/api/logging/v2beta1:all-srcs",
"//vendor/google.golang.org/api/monitoring/v3:all-srcs",
"//vendor/google.golang.org/api/pubsub/v1:all-srcs",
"//vendor/google.golang.org/api/tpu/v1alpha1:all-srcs",
"//vendor/google.golang.org/api/tpu/v1:all-srcs",
"//vendor/google.golang.org/genproto/googleapis/api/annotations:all-srcs",
"//vendor/google.golang.org/genproto/googleapis/rpc/status:all-srcs",
"//vendor/google.golang.org/grpc:all-srcs",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,6 +13,7 @@ import (
"net/http"
"net/textproto"
"strings"
"sync"
"google.golang.org/api/googleapi"
)
......@@ -105,12 +106,13 @@ type typeReader struct {
typ string
}
// multipartReader combines the contents of multiple readers to creat a multipart/related HTTP body.
// multipartReader combines the contents of multiple readers to create a multipart/related HTTP body.
// Close must be called if reads from the multipartReader are abandoned before reaching EOF.
type multipartReader struct {
pr *io.PipeReader
pipeOpen bool
ctype string
mu sync.Mutex
pipeOpen bool
}
func newMultipartReader(parts []typeReader) *multipartReader {
......@@ -146,10 +148,13 @@ func (mp *multipartReader) Read(data []byte) (n int, err error) {
}
func (mp *multipartReader) Close() error {
mp.mu.Lock()
if !mp.pipeOpen {
mp.mu.Unlock()
return nil
}
mp.pipeOpen = false
mp.mu.Unlock()
return mp.pr.Close()
}
......
......@@ -224,7 +224,7 @@
]
},
"write": {
"description": "Log entry resourcesWrites log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging.",
"description": "Writes log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)",
"flatPath": "v2beta1/entries:write",
"httpMethod": "POST",
"id": "logging.entries.write",
......@@ -755,7 +755,7 @@
}
}
},
"revision": "20180213",
"revision": "20180424",
"rootUrl": "https://logging.googleapis.com/",
"schemas": {
"BucketOptions": {
......@@ -1102,6 +1102,10 @@
"description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\nA project number may optionally be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.",
"type": "string"
},
"metadata": {
"$ref": "MonitoredResourceMetadata",
"description": "Output only. Additional metadata about the monitored resource. Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated."
},
"operation": {
"$ref": "LogEntryOperation",
"description": "Optional. Information about an operation associated with the log entry, if applicable."
......@@ -1121,7 +1125,7 @@
},
"resource": {
"$ref": "MonitoredResource",
"description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error."
"description": "Required. The primary monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error."
},
"severity": {
"description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.",
......@@ -1162,7 +1166,7 @@
"type": "string"
},
"timestamp": {
"description": "Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Stackdriver Logging assigns it the current time.Incoming log entries should have timestamps that are no more than the logs retention period in the past, and no more than 24 hours in the future. Log entries outside those time boundaries will not be available when calling entries.list, but those log entries can still be exported with LogSinks.",
"description": "Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Stackdriver Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed.Incoming log entries should have timestamps that are no more than the logs retention period in the past, and no more than 24 hours in the future. Log entries outside those time boundaries will not be available when calling entries.list, but those log entries can still be exported with LogSinks.",
"format": "google-datetime",
"type": "string"
},
......@@ -1483,6 +1487,28 @@
},
"type": "object"
},
"MonitoredResourceMetadata": {
"description": "Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Google Stackdriver Monitoring \u0026 Logging uses an ingestion pipeline to extract metadata for cloud resources of all types , and stores the metadata in this message.",
"id": "MonitoredResourceMetadata",
"properties": {
"systemLabels": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google Stackdriver. Stackdriver determines what system labels are useful and how to obtain their values. Some examples: \"machine_image\", \"vpc\", \"subnet_id\", \"security_group\", \"name\", etc. System label values can be only strings, Boolean values, or a list of strings. For example:\n{ \"name\": \"my-test-instance\",\n \"security_group\": [\"a\", \"b\", \"c\"],\n \"spot_instance\": false }\n",
"type": "object"
},
"userLabels": {
"additionalProperties": {
"type": "string"
},
"description": "Output only. A map of user-defined metadata labels.",
"type": "object"
}
},
"type": "object"
},
"RequestLog": {
"description": "Complete log information about a single HTTP request to an App Engine application.",
"id": "RequestLog",
......
......@@ -865,6 +865,11 @@ type LogEntry struct {
// never return any results.
LogName string `json:"logName,omitempty"`
// Metadata: Output only. Additional metadata about the monitored
// resource. Only k8s_container, k8s_pod, and k8s_node
// MonitoredResources have this field populated.
Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
// Operation: Optional. Information about an operation associated with
// the log entry, if applicable.
Operation *LogEntryOperation `json:"operation,omitempty"`
......@@ -878,10 +883,10 @@ type LogEntry struct {
// Stackdriver Logging.
ReceiveTimestamp string `json:"receiveTimestamp,omitempty"`
// Resource: Required. The monitored resource associated with this log
// entry. Example: a log entry that reports a database error would be
// associated with the monitored resource designating the particular
// database that reported the error.
// Resource: Required. The primary monitored resource associated with
// this log entry. Example: a log entry that reports a database error
// would be associated with the monitored resource designating the
// particular database that reported the error.
Resource *MonitoredResource `json:"resource,omitempty"`
// Severity: Optional. The severity of the log entry. The default value
......@@ -919,12 +924,14 @@ type LogEntry struct {
// Timestamp: Optional. The time the event described by the log entry
// occurred. This time is used to compute the log entry's age and to
// enforce the logs retention period. If this field is omitted in a new
// log entry, then Stackdriver Logging assigns it the current
// time.Incoming log entries should have timestamps that are no more
// than the logs retention period in the past, and no more than 24 hours
// in the future. Log entries outside those time boundaries will not be
// available when calling entries.list, but those log entries can still
// be exported with LogSinks.
// log entry, then Stackdriver Logging assigns it the current time.
// Timestamps have nanosecond accuracy, but trailing zeros in the
// fractional seconds might be omitted when the timestamp is
// displayed.Incoming log entries should have timestamps that are no
// more than the logs retention period in the past, and no more than 24
// hours in the future. Log entries outside those time boundaries will
// not be available when calling entries.list, but those log entries can
// still be exported with LogSinks.
Timestamp string `json:"timestamp,omitempty"`
// Trace: Optional. Resource name of the trace associated with the log
......@@ -1575,6 +1582,52 @@ func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MonitoredResourceMetadata: Auxiliary metadata for a MonitoredResource
// object. MonitoredResource objects contain the minimum set of
// information to uniquely identify a monitored resource instance. There
// is some other useful auxiliary metadata. Google Stackdriver
// Monitoring & Logging uses an ingestion pipeline to extract metadata
// for cloud resources of all types , and stores the metadata in this
// message.
type MonitoredResourceMetadata struct {
// SystemLabels: Output only. Values for predefined system metadata
// labels. System labels are a kind of metadata extracted by Google
// Stackdriver. Stackdriver determines what system labels are useful and
// how to obtain their values. Some examples: "machine_image", "vpc",
// "subnet_id", "security_group", "name", etc. System label values can
// be only strings, Boolean values, or a list of strings. For example:
// { "name": "my-test-instance",
// "security_group": ["a", "b", "c"],
// "spot_instance": false }
//
SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"`
// UserLabels: Output only. A map of user-defined metadata labels.
UserLabels map[string]string `json:"userLabels,omitempty"`
// ForceSendFields is a list of field names (e.g. "SystemLabels") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SystemLabels") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) {
type NoMethod MonitoredResourceMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RequestLog: Complete log information about a single HTTP request to
// an App Engine application.
type RequestLog struct {
......@@ -2385,11 +2438,13 @@ type EntriesWriteCall struct {
header_ http.Header
}
// Write: Log entry resourcesWrites log entries to Stackdriver Logging.
// This API method is the only way to send log entries to Stackdriver
// Logging. This method is used, directly or indirectly, by the
// Stackdriver Logging agent (fluentd) and all logging libraries
// configured to use Stackdriver Logging.
// Write: Writes log entries to Stackdriver Logging. This API method is
// the only way to send log entries to Stackdriver Logging. This method
// is used, directly or indirectly, by the Stackdriver Logging agent
// (fluentd) and all logging libraries configured to use Stackdriver
// Logging. A single request may contain log entries for a maximum of
// 1000 different resources (projects, organizations, billing accounts
// or folders)
func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall {
c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.writelogentriesrequest = writelogentriesrequest
......@@ -2479,7 +2534,7 @@ func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesRes
}
return ret, nil
// {
// "description": "Log entry resourcesWrites log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging.",
// "description": "Writes log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)",
// "flatPath": "v2beta1/entries:write",
// "httpMethod": "POST",
// "id": "logging.entries.write",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["tpu-gen.go"],
importpath = "google.golang.org/api/tpu/v1alpha1",
importpath = "google.golang.org/api/tpu/v1",
visibility = ["//visibility:public"],
deps = [
"//vendor/golang.org/x/net/context:go_default_library",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment