You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2022/03/15 16:56:01 UTC

[trafficcontrol] branch 6.1.x updated: `go get`, not `go get -u` (#6638)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.1.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/6.1.x by this push:
     new 4255878  `go get`, not `go get -u` (#6638)
4255878 is described below

commit 4255878549e562885011f912ed6fca97328cc84a
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Fri Mar 11 10:25:50 2022 -0700

    `go get`, not `go get -u` (#6638)
    
    * `go get`, not `go get -u`
    
    * Use `go mod tidy` to update /x/ packages, not `go get`
    
    (cherry picked from commit 0340cca98d3a988d08810145b4cde9bc5ee5b8e6)
---
 .../actions/pr-to-update-go/pr_to_update_go/update_golang_org_x.sh | 7 +------
 infrastructure/cdn-in-a-box/cache/Dockerfile                       | 2 +-
 infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile             | 2 +-
 infrastructure/cdn-in-a-box/traffic_ops/Dockerfile                 | 2 +-
 infrastructure/cdn-in-a-box/traffic_stats/Dockerfile               | 2 +-
 tools/golang/Dockerfile                                            | 2 +-
 traffic_monitor/tests/Dockerfile-golangtest                        | 2 +-
 traffic_monitor/tests/_integration/Dockerfile                      | 2 +-
 traffic_monitor/tools/testcaches/Dockerfile                        | 2 +-
 traffic_monitor/tools/testto/Dockerfile                            | 2 +-
 10 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/.github/actions/pr-to-update-go/pr_to_update_go/update_golang_org_x.sh b/.github/actions/pr-to-update-go/pr_to_update_go/update_golang_org_x.sh
index aa15485..ddc6a27 100755
--- a/.github/actions/pr-to-update-go/pr_to_update_go/update_golang_org_x.sh
+++ b/.github/actions/pr-to-update-go/pr_to_update_go/update_golang_org_x.sh
@@ -22,12 +22,7 @@ trap 'echo "Error on line ${LINENO} of ${0}"; exit 1' ERR
 export GOPATH="${HOME}/go"
 
 # update all golang.org/x dependencies in go.mod/go.sum
-go get -u \
-	golang.org/x/crypto \
-	golang.org/x/net \
-	golang.org/x/sys \
-	golang.org/x/text \
-	golang.org/x/xerrors
+sed -i '/golang\.org\/x\//d' go.mod
 
 #Update go.mod and go.sum
 go mod tidy -v
diff --git a/infrastructure/cdn-in-a-box/cache/Dockerfile b/infrastructure/cdn-in-a-box/cache/Dockerfile
index 9454ef0..c2ad5f3 100644
--- a/infrastructure/cdn-in-a-box/cache/Dockerfile
+++ b/infrastructure/cdn-in-a-box/cache/Dockerfile
@@ -121,7 +121,7 @@ CMD /run.sh
 
 FROM common-traffic-server-dependencies AS get-delve
 RUN dnf -y install golang && \
-    go get -u github.com/go-delve/delve/cmd/dlv
+    go get github.com/go-delve/delve/cmd/dlv
 
 FROM common-cache-config-layers AS mid
 ENV CACHE_TYPE=mid
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
index 2ec4e56..f83ea7b 100644
--- a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
@@ -71,7 +71,7 @@ HEALTHCHECK --interval=10s --timeout=1s \
 FROM trafficmonitor-dependencies as get-delve
 
 RUN dnf -y install golang git && \
-    go get -u github.com/go-delve/delve/cmd/dlv
+    go get github.com/go-delve/delve/cmd/dlv
 
 FROM trafficmonitor as trafficmonitor-debug
 COPY --from=get-delve /root/go/bin /usr/bin
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index f3574b4..838a14d 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -119,7 +119,7 @@ HEALTHCHECK --interval=10s --timeout=1s \
 FROM trafficops-dependencies as get-delve
 
 RUN dnf -y install git golang && \
-    go get -u github.com/go-delve/delve/cmd/dlv
+    go get github.com/go-delve/delve/cmd/dlv
 
 FROM trafficops AS trafficops-debug
 COPY --from=get-delve /root/go/bin /usr/bin
diff --git a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
index 1fe212a..2030464 100644
--- a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
@@ -63,7 +63,7 @@ ENTRYPOINT /run.sh
 FROM trafficstats-dependencies AS get-delve
 
 RUN dnf -y install golang git && \
-    go get -u github.com/go-delve/delve/cmd/dlv
+    go get github.com/go-delve/delve/cmd/dlv
 
 FROM trafficstats AS trafficstats-debug
 COPY --from=get-delve /root/go/bin /usr/bin
diff --git a/tools/golang/Dockerfile b/tools/golang/Dockerfile
index 340d08c..b8598c0 100644
--- a/tools/golang/Dockerfile
+++ b/tools/golang/Dockerfile
@@ -58,6 +58,6 @@ FROM base AS unit
 VOLUME ["/junit"]
 
 RUN go get github.com/wadey/gocovmerge &&\
-    go get -u github.com/jstemmer/go-junit-report
+    go get github.com/jstemmer/go-junit-report
 
 CMD /go/src/github.com/apache/trafficcontrol/tools/golang/unit-tests.sh
diff --git a/traffic_monitor/tests/Dockerfile-golangtest b/traffic_monitor/tests/Dockerfile-golangtest
index 141efa8..a74f2a0 100644
--- a/traffic_monitor/tests/Dockerfile-golangtest
+++ b/traffic_monitor/tests/Dockerfile-golangtest
@@ -44,7 +44,7 @@ VOLUME ["/junit"]
 
 WORKDIR /go/src/$DIR/traffic_monitor
 
-RUN bash -c "go get -u github.com/jstemmer/go-junit-report"
+RUN bash -c "go get github.com/jstemmer/go-junit-report"
 RUN bash -c "go mod vendor -v"
 CMD bash -c 'go test -v ./... ../lib/go-tc/... 2>&1 | go-junit-report --package-name=golang.test.tm --set-exit-code > /junit/golang.test.tm.xml && chmod 777 -R /junit && cat /junit/golang.test.tm.xml'
 #
diff --git a/traffic_monitor/tests/_integration/Dockerfile b/traffic_monitor/tests/_integration/Dockerfile
index c484af8..e253510 100644
--- a/traffic_monitor/tests/_integration/Dockerfile
+++ b/traffic_monitor/tests/_integration/Dockerfile
@@ -29,7 +29,7 @@ ENV GOPATH=/go
 COPY ./tests/_integration/ /tm
 WORKDIR /tm
 
-RUN go get -u  github.com/apache/trafficcontrol/lib/go-log github.com/apache/trafficcontrol/lib/go-tc github.com/apache/trafficcontrol/traffic_monitor
+RUN go get  github.com/apache/trafficcontrol/lib/go-log github.com/apache/trafficcontrol/lib/go-tc github.com/apache/trafficcontrol/traffic_monitor
 COPY . ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/
 
 RUN go test -c -o /traffic_monitor_integration_test
diff --git a/traffic_monitor/tools/testcaches/Dockerfile b/traffic_monitor/tools/testcaches/Dockerfile
index 853a918..e6d62a9 100644
--- a/traffic_monitor/tools/testcaches/Dockerfile
+++ b/traffic_monitor/tools/testcaches/Dockerfile
@@ -21,7 +21,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 RUN dnf -y install golang git
 ENV GOPATH=/go
 
-RUN go get -u github.com/apache/trafficcontrol/lib/go-rfc
+RUN go get github.com/apache/trafficcontrol/lib/go-rfc
 ADD .   ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tools/testcaches/
 WORKDIR ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tools/testcaches
 RUN go build && cp testcaches /usr/sbin/
diff --git a/traffic_monitor/tools/testto/Dockerfile b/traffic_monitor/tools/testto/Dockerfile
index c779cdd..7caf5ae 100644
--- a/traffic_monitor/tools/testto/Dockerfile
+++ b/traffic_monitor/tools/testto/Dockerfile
@@ -21,7 +21,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 RUN dnf -y install golang git
 ENV GOPATH=/go
 
-RUN go get -u github.com/apache/trafficcontrol/lib/go-rfc github.com/apache/trafficcontrol/lib/go-tc
+RUN go get github.com/apache/trafficcontrol/lib/go-rfc github.com/apache/trafficcontrol/lib/go-tc
 ADD . ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tools/testto
 WORKDIR ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tools/testto
 RUN go build && cp testto /usr/sbin