Skip to content

Commit

Permalink
Switch all components to 1.13.
Browse files Browse the repository at this point in the history
  • Loading branch information
loburm committed Oct 23, 2019
1 parent 9eb00c5 commit 7fa8854
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ language: go

matrix:
include:
- go: "1.9"
- go: "1.10"
- go: "1.13"

go_import_path: github.com/GoogleCloudPlatform/k8s-stackdriver

Expand Down
2 changes: 1 addition & 1 deletion custom-metrics-stackdriver-adapter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.10-alpine as builder
FROM golang:1.13-alpine as builder
WORKDIR ${GOPATH}/src/github.com/GoogleCloudPlatform/k8s-stackdriver/custom-metrics-stackdriver-adapter
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /adapter
Expand Down
2 changes: 1 addition & 1 deletion event-adapter/pkg/apiserver/installer/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func TestEventsAPI(t *testing.T) {
if err != nil {
bodyPart = fmt.Sprintf("[error extracting body: %v]", err)
}
t.Errorf("request: %s", request)
t.Errorf("request: %v", request)
t.Errorf("Expected %d for %s (%s), Got %#v -- %s", v.Status, v.Method, k, response, bodyPart)
}
}
Expand Down
2 changes: 1 addition & 1 deletion event-exporter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.9-alpine as builder
FROM golang:1.13-alpine as builder
WORKDIR ${GOPATH}/src/github.com/GoogleCloudPlatform/k8s-stackdriver/event-exporter
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /event-exporter
Expand Down
9 changes: 3 additions & 6 deletions hack/for-go-proj.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@ for dep_file in ${dep_projects}; do
(
project="${dep_file%Gopkg.toml}"

if [[ ( $TRAVIS_GO_VERSION =~ ^1\.9 && ! $project =~ 'custom-metrics-stackdriver-adapter' ) ||
( $TRAVIS_GO_VERSION =~ ^1\.10 && $project =~ 'custom-metrics-stackdriver-adapter' ) ]]; then
echo "go ${CMD}ing ${project}"
cd "${project}"
go "${CMD}" ./...
fi
echo "go ${CMD}ing ${project}"
cd "${project}"
go "${CMD}" ./...
)
done;
7 changes: 5 additions & 2 deletions hack/verify-flags/exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ kubelet-to-gcm/monitor/kubelet/translate.go: "pod_id": "machine",
kubelet-to-gcm/monitor/kubelet/translate.go: "pod_id": podID,
kubelet-to-gcm/monitor/kubelet/translate.go: "project_id": t.project,
kubelet-to-gcm/monitor/kubelet/translate.go: "project_id": t.project,
prometheus-to-sd/.idea/workspace.xml: <entry file="file://$PROJECT_DIR$/config/dynamic_source.go">
prometheus-to-sd/.idea/workspace.xml: <option value="$PROJECT_DIR$/config/dynamic_source.go" />
prometheus-to-sd/.idea/workspace.xml: <entry file="file://$PROJECT_DIR$/config/dynamic_source.go">
prometheus-to-sd/README.md:`project_id`, `cluster_name`, `instance_id` and `zone` are filled automatically by
prometheus-to-sd/README.md:the prometheus-to-sd. Values of the `namespace_id` and `pod_id` can be passed to
prometheus-to-sd/translator/metrics.go: []string{"component_name", "metric_name"},
Expand All @@ -118,7 +121,7 @@ prometheus-to-sd/translator/translator_test.go: "project_id": "test-projec
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "cluster_name": "test-cluster",
prometheus-to-sd/translator/translator_test.go: "namespace_id": "",
Expand All @@ -130,6 +133,6 @@ prometheus-to-sd/translator/translator_test.go: "pod_name": "test-pod",
prometheus-to-sd/translator/translator_test.go: "project_id": "default-project",
prometheus-to-sd/translator/translator_test.go: "project_id": "test-project",
prometheus-to-sd/translator/translator_test.go: "project_id": "test-project",
prometheus-to-sd/translator/translator_test.go: "project_id": "test-project",
prometheus-to-sd/translator/translator_test.go: "project_id": "test-project",
prometheus-to-sd/translator/translator_test.go: "project_id": "test-project",
prometheus-to-sd/translator/translator_test.go: "project_id": "test-project",
2 changes: 1 addition & 1 deletion prometheus-to-sd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.9-alpine as builder
FROM golang:1.13-alpine as builder
WORKDIR ${GOPATH}/src/github.com/GoogleCloudPlatform/k8s-stackdriver/prometheus-to-sd
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /monitor
Expand Down
1 change: 0 additions & 1 deletion prometheus-to-sd/translator/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ func TestScrapePrometheusMetrics(t *testing.T) {
resp.Body.Close()
}
}

4 changes: 2 additions & 2 deletions prometheus-to-sd/translator/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ func convertToDistributionValue(h *dto.Histogram) *v3.Distribution {
}

return &v3.Distribution{
Count: count,
Mean: mean,
Count: count,
Mean: mean,
SumOfSquaredDeviation: dev,
BucketOptions: &v3.BucketOptions{
ExplicitBuckets: &v3.Explicit{
Expand Down

0 comments on commit 7fa8854

Please sign in to comment.