Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/deploy_botclient.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ import (
"github.com/metaplay/cli/pkg/styles"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"helm.sh/helm/v3/pkg/release"
rcommon "helm.sh/helm/v4/pkg/release/common"
)

const metaplayLoadTestChartName = "metaplay-loadtest"
Expand DownExpand Up@@ -298,7 +298,7 @@ func (o *deployBotClientOpts) Run(cmd *cobra.Command) error {
if existingRelease != nil {
releaseName := existingRelease.Name
releaseStatus := existingRelease.Info.Status
if releaseStatus == release.StatusUninstalling {
if releaseStatus == rcommon.StatusUninstalling {
return clierrors.Newf("Helm release %s is in state 'uninstalling'", releaseName).
WithSuggestion("Try again later, or manually uninstall the botclient with 'metaplay remove botclient'")
} else if releaseStatus.IsPending() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/deploy_server.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ import (
"github.com/metaplay/cli/pkg/styles"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"helm.sh/helm/v3/pkg/release"
rcommon "helm.sh/helm/v4/pkg/release/common"
)

const metaplayGameServerChartName = "metaplay-gameserver"
Expand DownExpand Up@@ -444,7 +444,7 @@ func (o *deployGameServerOpts) Run(cmd *cobra.Command) error {
log.Info().Msgf(" %-19s %s", "Revision:", styles.RenderTechnical(fmt.Sprintf("%d", existingRelease.Version)))
lastDeployedAt := "Unknown"
if !existingRelease.Info.LastDeployed.IsZero() {
lastDeployedAt = humanize.Time(existingRelease.Info.LastDeployed.Time)
lastDeployedAt = humanize.Time(existingRelease.Info.LastDeployed)
}
log.Info().Msgf(" %-19s %s", "Last Deployed:", styles.RenderTechnical(lastDeployedAt))
}
Expand All@@ -454,7 +454,7 @@ func (o *deployGameServerOpts) Run(cmd *cobra.Command) error {
uninstallExistingRelease := false
if existingRelease != nil {
releaseStatus := existingRelease.Info.Status
if releaseStatus == release.StatusUninstalling {
if releaseStatus == rcommon.StatusUninstalling {
return clierrors.New("Cannot deploy: existing Helm release is in state 'uninstalling'").
WithSuggestion("Wait for the uninstall to complete, or manually remove with 'metaplay remove server'")
} else if releaseStatus.IsPending() {
Expand Down
8 changes: 4 additions & 4 deletions cmd/get_server_info.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,7 +18,7 @@ import (
"github.com/metaplay/cli/pkg/styles"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"helm.sh/helm/v3/pkg/release"
v1 "helm.sh/helm/v4/pkg/release/v1"
)

type getServerInfoOpts struct {
Expand DownExpand Up@@ -236,13 +236,13 @@ func (o *getServerInfoOpts) gatherDeployedServerInfo(ctx context.Context, target
}

// Extract the Helm release information from a release object into a simpler info class.
func (o *getServerInfoOpts) getHelmReleaseInfo(releaseInfo *release.Release) (*helmReleaseInfo, error) {
func (o *getServerInfoOpts) getHelmReleaseInfo(releaseInfo *v1.Release) (*helmReleaseInfo, error) {
helmInfo := &helmReleaseInfo{
Name: releaseInfo.Name,
Status: releaseInfo.Info.Status.String(),
Namespace: releaseInfo.Namespace,
Revision: releaseInfo.Version,
LastDeployed: releaseInfo.Info.LastDeployed.Time,
LastDeployed: releaseInfo.Info.LastDeployed,
}

if releaseInfo.Chart != nil && releaseInfo.Chart.Metadata != nil {
Expand All@@ -254,7 +254,7 @@ func (o *getServerInfoOpts) getHelmReleaseInfo(releaseInfo *release.Release) (*h
}

// Extract information about the docker image used in the game server deployment.
func (o *getServerInfoOpts) getImageInfo(ctx context.Context, targetEnv *envapi.TargetEnvironment, existingRelease *release.Release) (*deploymentImageInfo, error) {
func (o *getServerInfoOpts) getImageInfo(ctx context.Context, targetEnv *envapi.TargetEnvironment, existingRelease *v1.Release) (*deploymentImageInfo, error) {
// Extract image information from Helm release values.
var imageTag, fullImageRef string
if existingRelease.Config != nil {
Expand Down
131 changes: 75 additions & 56 deletions go.mod
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,37 +8,37 @@ require (
charm.land/glamour/v2 v2.0.1
charm.land/lipgloss/v2 v2.0.5
github.com/Masterminds/semver/v3 v3.5.0
github.com/aws/aws-sdk-go-v2 v1.42.1
github.com/aws/aws-sdk-go-v2/config v1.32.30
github.com/aws/aws-sdk-go-v2/service/ecr v1.59.1
github.com/creativeprojects/go-selfupdate v1.6.0
github.com/aws/aws-sdk-go-v2 v1.41.1
github.com/aws/aws-sdk-go-v2/config v1.32.7
github.com/aws/aws-sdk-go-v2/service/ecr v1.55.1
github.com/creativeprojects/go-selfupdate v1.5.2
github.com/docker/docker v28.5.2+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/go-resty/resty/v2 v2.17.2
github.com/go-resty/resty/v2 v2.17.1
github.com/goccy/go-yaml v1.19.2
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/google/go-containerregistry v0.21.7
github.com/hashicorp/go-version v1.9.0
github.com/google/go-containerregistry v0.20.7
github.com/hashicorp/go-version v1.8.0
github.com/jwalton/go-supportscolor v1.2.0
github.com/mattn/go-isatty v0.0.23
github.com/mattn/go-isatty v0.0.20
github.com/moby/moby/api v1.55.0
github.com/moby/term v0.5.2
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/rs/zerolog v1.35.1
github.com/rs/zerolog v1.34.0
github.com/sergi/go-diff v1.4.0
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.43.0
github.com/tidwall/sjson v1.2.5
github.com/zalando/go-keyring v0.2.8
golang.org/x/sys v0.47.0
golang.org/x/term v0.45.0
google.golang.org/grpc v1.82.1
github.com/zalando/go-keyring v0.2.6
golang.org/x/sys v0.46.0
golang.org/x/term v0.44.0
google.golang.org/grpc v1.80.0
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.19.4
helm.sh/helm/v4 v4.1.0
k8s.io/api v0.36.2
k8s.io/apimachinery v0.36.2
k8s.io/client-go v0.36.2
Expand All@@ -47,31 +47,33 @@ require (
)

require (
code.gitea.io/sdk/gitea v0.23.2 // indirect
al.essio.dev/pkg/shellescape v1.6.0 // indirect
code.gitea.io/sdk/gitea v0.22.1 // indirect
dario.cat/mergo v1.0.2 // indirect
github.com/42wim/httpsig v1.2.4 // indirect
github.com/42wim/httpsig v1.2.3 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
github.com/ProtonMail/go-crypto v1.3.0 // indirect
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.29 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.32.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.44.1 // indirect
github.com/aws/smithy-go v1.27.3 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.7 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect
github.com/aws/smithy-go v1.24.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand All@@ -86,28 +88,34 @@ require (
github.com/charmbracelet/x/windows v0.2.2 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/containerd/containerd v1.7.30 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.18.1 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/cyphar/filepath-securejoin v0.7.0 // indirect
github.com/danieljoos/wincred v1.2.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect
github.com/distribution/distribution/v3 v3.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/docker/cli v29.5.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/docker/go-connections v0.7.0 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/docker/cli v29.0.3+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.5 // indirect
github.com/docker/go-connections v0.6.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a // indirect
github.com/ebitengine/purego v0.10.0 // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/extism/go-sdk v1.7.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fluxcd/cli-utils v0.37.0-flux.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-fed/httpsig v1.1.0 // indirect
Expand All@@ -119,28 +127,27 @@ require (
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/godbus/dbus/v5 v5.2.2 // indirect
github.com/godbus/dbus/v5 v5.2.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-github/v86 v86.0.0 // indirect
github.com/google/go-querystring v1.2.0 // indirect
github.com/google/go-github/v74 v74.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/klauspost/compress v1.18.5 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/lib/pq v1.12.3 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
Expand All@@ -150,14 +157,14 @@ require (
github.com/mattn/go-runewidth v0.0.24 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.2.0 // indirect
github.com/moby/moby/client v0.4.1 // indirect
github.com/moby/moby/client v0.4.0 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
github.com/moby/spdystream v0.5.1 // indirect
github.com/moby/sys/atomicwriter v0.1.0 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/user v0.4.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
Expand All@@ -183,37 +190,48 @@ require (
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/cast v1.8.0 // indirect
github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect
github.com/tetratelabs/wazero v1.11.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/vbatts/tar-split v0.12.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/goldmark v1.7.13 // indirect
github.com/yuin/goldmark-emoji v1.0.6 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.5 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
gitlab.com/gitlab-org/api/client-go v1.46.0 // indirect
gitlab.com/gitlab-org/api/client-go v1.9.1 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.65.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.53.0 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
golang.org/x/sync v0.21.0 // indirect
golang.org/x/text v0.38.0 // indirect
golang.org/x/time v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apiextensions-apiserver v0.35.0 // indirect
k8s.io/apiserver v0.35.0 // indirect
k8s.io/apiextensions-apiserver v0.36.2 // indirect
k8s.io/apiserver v0.36.2 // indirect
k8s.io/cli-runtime v0.36.2 // indirect
k8s.io/component-base v0.36.2 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
Expand All@@ -223,7 +241,8 @@ require (
modernc.org/libc v1.74.1 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
oras.land/oras-go/v2 v2.6.0 // indirect
oras.land/oras-go/v2 v2.6.1 // indirect
sigs.k8s.io/controller-runtime v0.22.4 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/kustomize/api v0.21.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect
Expand Down
Loading
Loading