Skip to content

Commit

Permalink
Updated go to 1.23 (#60)
Browse files Browse the repository at this point in the history
* Updated go to 1.23
* Changed docker-compose to docker compose
* Updated hms go dependencies
* Removed -i option from go build

CASMHMS-6317
  • Loading branch information
shunr-hpe authored Dec 9, 2024
1 parent c4d8f70 commit a022e37
Show file tree
Hide file tree
Showing 61 changed files with 376 additions and 923 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19.0
1.20.0
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\

## [1.20.0] - 2023-12-03

### Changed

- Updated go to 1.23

## [1.19.0] - 2023-01-10

### Changed
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# (C) Copyright [2020-2021] Hewlett Packard Enterprise Development LP
# (C) Copyright [2020-2021,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -24,7 +24,7 @@

### Build Base Stage ###

FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS build-base
FROM artifactory.algol60.net/docker.io/library/golang:1.23-alpine AS build-base

RUN set -ex \
&& apk -U upgrade \
Expand All @@ -46,7 +46,7 @@ FROM base AS builder

# Now build
RUN set -ex \
&& go build -v -i -o scsd github.com/Cray-HPE/hms-scsd/cmd/scsd
&& go build -v -o scsd github.com/Cray-HPE/hms-scsd/cmd/scsd

### Final Stage ###

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.test.integration
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP
# (C) Copyright [2020-2022,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -22,7 +22,7 @@

# Dockerfile for testing HMS SCSD.

FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS build-base
FROM artifactory.algol60.net/docker.io/library/golang:1.23-alpine AS build-base

RUN set -ex \
&& apk -U upgrade \
Expand All @@ -42,7 +42,7 @@ FROM base AS builder

# Now build
RUN set -ex \
&& go build -v -i -o scsd github.com/Cray-HPE/hms-scsd/cmd/scsd
&& go build -v -o scsd github.com/Cray-HPE/hms-scsd/cmd/scsd

### Final Stage ###

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.test.unit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# (C) Copyright [2020-2021] Hewlett Packard Enterprise Development LP
# (C) Copyright [2020-2021,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -22,7 +22,7 @@

### Build Base Stage ###
# Build base has the packages installed that we need.
FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS build-base
FROM artifactory.algol60.net/docker.io/library/golang:1.23-alpine AS build-base

RUN set -ex \
&& apk -U upgrade \
Expand Down
46 changes: 39 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,59 @@
module github.com/Cray-HPE/hms-scsd

go 1.16
go 1.23

require (
github.com/Cray-HPE/hms-base v1.15.1
github.com/Cray-HPE/hms-certs v1.4.0
github.com/Cray-HPE/hms-compcredentials v1.11.3
github.com/Cray-HPE/hms-securestorage v1.13.0
github.com/Cray-HPE/hms-certs v1.5.0
github.com/Cray-HPE/hms-compcredentials v1.12.0
github.com/Cray-HPE/hms-securestorage v1.14.0
github.com/Cray-HPE/hms-trs-app-api v1.6.2
github.com/Cray-HPE/hms-xname v1.0.2
github.com/Cray-HPE/hms-xname v1.4.0
github.com/gorilla/mux v1.8.0
github.com/sirupsen/logrus v1.8.1
)

require (
github.com/Cray-HPE/hms-trs-kafkalib v1.5.2 // indirect
github.com/Shopify/sarama v1.24.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.1.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/frankban/quicktest v1.7.3 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-cmp v0.5.1 // indirect
github.com/gorilla/mux v1.8.0
github.com/google/uuid v1.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.1 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/vault/api v1.0.4 // indirect
github.com/hashicorp/vault/sdk v0.1.13 // indirect
github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 // indirect
github.com/klauspost/compress v1.8.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.3.0 // indirect
github.com/pierrec/lz4 v2.4.1+incompatible // indirect
github.com/sirupsen/logrus v1.8.1
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/stretchr/testify v1.5.1 // indirect
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 // indirect
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc // indirect
golang.org/x/sys v0.0.0-20200817155316-9781c653f443 // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.2.3 // indirect
gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
)
25 changes: 8 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,18 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/Cray-HPE/hms-base v1.15.0/go.mod h1:+G8KFLPtanLC5lQ602hrf3MDfLTmIXedTavVCOdz5XA=
github.com/Cray-HPE/hms-base v1.15.1 h1:+f9cl9BsDWvewvGBPzinmBSU//I7yhwaSUTaNUwxwxQ=
github.com/Cray-HPE/hms-base v1.15.1/go.mod h1:+G8KFLPtanLC5lQ602hrf3MDfLTmIXedTavVCOdz5XA=
github.com/Cray-HPE/hms-certs v1.3.2 h1:Prd7PTwiSMULYuL8bhsvw7LSICx+pSvpWlA9fQKvW9s=
github.com/Cray-HPE/hms-certs v1.3.2/go.mod h1:6DymilWScLtbQkaQRMuf55K1MzEi0kYCoXfT212yLjY=
github.com/Cray-HPE/hms-certs v1.4.0 h1:ZyQ50B1e2P81Y7PCbfSFW6O1F0Behi0spScwR6GAM04=
github.com/Cray-HPE/hms-certs v1.4.0/go.mod h1:4/NBEi9SWhWxWkZwhk2WDFxQDyXU6PCN5BAr7ejuWLE=
github.com/Cray-HPE/hms-compcredentials v1.11.2 h1:Ug7e7vMSx1STHKkniWY27ddD1X49pQAEljQmTcVkng4=
github.com/Cray-HPE/hms-compcredentials v1.11.2/go.mod h1:tmurR+zsOtB61n6j3GlEfsl7wmNIAGJqErFymOUb0Hw=
github.com/Cray-HPE/hms-compcredentials v1.11.3 h1:y3VwLBby2b+pVUxVjiZUpsvPK5pspXr3w4pxeh/D35s=
github.com/Cray-HPE/hms-compcredentials v1.11.3/go.mod h1:tmurR+zsOtB61n6j3GlEfsl7wmNIAGJqErFymOUb0Hw=
github.com/Cray-HPE/hms-securestorage v1.12.2 h1:H5n0i6ldzewd5p7PI2Hktr/+9cYfSCui+0367p2L6n8=
github.com/Cray-HPE/hms-securestorage v1.12.2/go.mod h1:P4CMKqQVlx/lv+AdyEjNQubZw2FKNyo/IAtFNgQ3VuI=
github.com/Cray-HPE/hms-securestorage v1.13.0 h1:ut6z9TMtCzL902f9NPxcbtkkDuk9zbX6E30pP8j3k6Q=
github.com/Cray-HPE/hms-securestorage v1.13.0/go.mod h1:P4CMKqQVlx/lv+AdyEjNQubZw2FKNyo/IAtFNgQ3VuI=
github.com/Cray-HPE/hms-certs v1.5.0 h1:FzsYDzXxvAGBYtrSJsUj2pPLEykeiCtlLpWsa+RZMU0=
github.com/Cray-HPE/hms-certs v1.5.0/go.mod h1:jtnNV3KcxUgoWgA2mMKJtyyoKBnk+ABo86UGxYStH9o=
github.com/Cray-HPE/hms-compcredentials v1.12.0 h1:xlAgEvbFlhGeiYIbbelvVgcTFY3E7aFoX90DpMLrEoE=
github.com/Cray-HPE/hms-compcredentials v1.12.0/go.mod h1:n97p0QnsVJTmzd3wl/hETIUdTS2IAerZ8NXxQ4t3Y2o=
github.com/Cray-HPE/hms-securestorage v1.14.0 h1:9s9eoUM6HYwOms16CK9hHBxk9Sr1RM+MmYpIKvzsyR8=
github.com/Cray-HPE/hms-securestorage v1.14.0/go.mod h1:izwfNP4T+AATt+XRfv4i9QjODL5Adpb/0nvby6YxBww=
github.com/Cray-HPE/hms-trs-app-api v1.6.2 h1:yzf2E+8QM0+S7AFc47JIyu4yTLM/HKvY1BHtdGSEXFY=
github.com/Cray-HPE/hms-trs-app-api v1.6.2/go.mod h1:RbB2pYCrZ5N3d0ho4nzTAz9ifI2GYpAdf4Qeco748KQ=
github.com/Cray-HPE/hms-trs-kafkalib v1.5.2 h1:MhV6SE0HmEcMnuAb/dVclfXd+49udbVCYr2ze0CDXoI=
github.com/Cray-HPE/hms-trs-kafkalib v1.5.2/go.mod h1:jo5bCP12PYVHeyaSa9okvz36pgwwY1czjZzUi96Ryjg=
github.com/Cray-HPE/hms-xname v1.0.2 h1:5XTBQAlUdfQ7yFecVMwNpNClTvcYj8Jesn5KiMyV6Pk=
github.com/Cray-HPE/hms-xname v1.0.2/go.mod h1:3A70QF0ddmkt/nz0jis5o8UIB4zAmsgsUiN71dr97n4=
github.com/Cray-HPE/hms-xname v1.4.0 h1:i47YmE8rbSfJ64simKCCC6ZVcGid3rDIX6/jfVbISAM=
github.com/Cray-HPE/hms-xname v1.4.0/go.mod h1:wH7t1UXYck0VdHSWjrMsxZmaCK5W1lmwgNnsYAFPTus=
github.com/Shopify/sarama v1.24.1 h1:svn9vfN3R1Hz21WR2Gj0VW9ehaDGkiOS+VqlIcZOkMI=
github.com/Shopify/sarama v1.24.1/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU=
github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=
Expand Down Expand Up @@ -146,12 +140,10 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
Expand Down Expand Up @@ -183,7 +175,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
14 changes: 7 additions & 7 deletions runCT.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# MIT License
#
# (C) Copyright [2022] Hewlett Packard Enterprise Development LP
# (C) Copyright [2022,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -41,7 +41,7 @@ echo "COMPOSE_FILE: $COMPOSE_FILE"
args="-f $COMPOSE_FILE -p $COMPOSE_PROJECT_NAME"

function cleanup() {
docker-compose $args down
docker compose $args down
if ! [[ $? -eq 0 ]]; then
echo "Failed to decompose environment!"
exit 1
Expand All @@ -52,20 +52,20 @@ function cleanup() {

# Get the base containers running
echo "Starting containers..."
docker-compose $args build --no-cache
docker-compose $args up -d cray-scsd
docker-compose $args up -d ct-tests-functional-wait-for-smd
docker compose $args build --no-cache
docker compose $args up -d cray-scsd
docker compose $args up -d ct-tests-functional-wait-for-smd
docker wait ${COMPOSE_PROJECT_NAME}_ct-tests-functional-wait-for-smd_1
docker logs ${COMPOSE_PROJECT_NAME}_ct-tests-functional-wait-for-smd_1
docker-compose $args up --exit-code-from ct-tests-smoke ct-tests-smoke
docker compose $args up --exit-code-from ct-tests-smoke ct-tests-smoke
test_result=$?
echo "Cleaning up containers..."
if [[ $test_result -ne 0 ]]; then
echo "CT smoke tests FAILED!"
cleanup 1
fi

#docker-compose up --exit-code-from ct-tests-functional ct-tests-functional
#docker compose up --exit-code-from ct-tests-functional ct-tests-functional
#test_result=$?
# Clean up
#echo "Cleaning up containers..."
Expand Down
12 changes: 6 additions & 6 deletions runIntegration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# MIT License
#
# (C) Copyright [2022] Hewlett Packard Enterprise Development LP
# (C) Copyright [2022,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -42,7 +42,7 @@ echo "COMPOSE_FILE: ${COMPOSE_FILE}"
args="-f $COMPOSE_FILE -p $COMPOSE_PROJECT_NAME"

function cleanup() {
docker-compose $args down
docker compose $args down
if [[ $? -ne 0 ]]; then
echo "Failed to decompose environment!"
exit 1
Expand All @@ -53,16 +53,16 @@ function cleanup() {

# Get the base containers running
echo "Starting containers..."
docker-compose $args build --build-arg SCSD_VERSION=${SCSD_VERSION}
docker-compose $args up -d cray-scsd
docker-compose $args up --exit-code-from integration-tests integration-tests
docker compose $args build --build-arg SCSD_VERSION=${SCSD_VERSION}
docker compose $args up -d cray-scsd
docker compose $args up --exit-code-from integration-tests integration-tests

test_result=$?

# Clean up
echo "Cleaning up containers..."
if [[ $test_result -ne 0 ]]; then
docker-compose $args logs > ${LOG_FILE} 2>&1
docker compose $args logs > ${LOG_FILE} 2>&1
echo "================================================="
echo "LOGS:"
cat ${LOG_FILE}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP
# (C) Copyright [2020-2022,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -25,7 +25,7 @@
# Author: mpkelly
# Date: 26-February 2020

FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS builder
FROM artifactory.algol60.net/docker.io/library/golang:1.23-alpine AS builder
LABEL maintainer="Hewlett Packard Enterprise"

RUN go env -w GO111MODULE=auto
Expand Down
6 changes: 3 additions & 3 deletions test/integration/Dockerfile.fake-rfep
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# (C) Copyright [2020-2021] Hewlett Packard Enterprise Development LP
# (C) Copyright [2020-2021,2024] Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -25,13 +25,13 @@
# Date: 26-February 2020

# Base image contains everything needed for Go building, just build.
FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS builder
FROM artifactory.algol60.net/docker.io/library/golang:1.23-alpine AS builder

RUN go env -w GO111MODULE=auto

COPY fake-rfep.go ${GOPATH}/src/fake-rfep/

RUN set -ex && go build -v -i -o /usr/local/bin/fake-rfep fake-rfep
RUN set -ex && go build -v -o /usr/local/bin/fake-rfep fake-rfep

### Final Stage ###

Expand Down
9 changes: 0 additions & 9 deletions vendor/github.com/Cray-HPE/hms-base/go.mod

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/Cray-HPE/hms-base/go.sum

This file was deleted.

8 changes: 8 additions & 0 deletions vendor/github.com/Cray-HPE/hms-compcredentials/.gitignore

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

2 changes: 1 addition & 1 deletion vendor/github.com/Cray-HPE/hms-compcredentials/.version

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

6 changes: 6 additions & 0 deletions vendor/github.com/Cray-HPE/hms-compcredentials/CHANGELOG.md

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

Loading

0 comments on commit a022e37

Please sign in to comment.