Skip to content

Commit

Permalink
chore: merge 3.4 to 3.5
Browse files Browse the repository at this point in the history
Conflicts:
- cmd/modelcmd/base.go
- go.sum
- scripts/win-installer/setup.iss
- snap/snapcraft.yaml
- version/version.go
  • Loading branch information
hpidcock committed Aug 12, 2024
2 parents 26f5cbe + 0f599b9 commit 08fdd25
Show file tree
Hide file tree
Showing 29 changed files with 512 additions and 142 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,25 @@ jobs:
libdqlite-dev \
libsqlite3-dev \
sqlite3
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
go install golang.org/x/vuln/cmd/govulncheck@latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.1
sudo curl -sSfL https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_$(go env GOARCH) -o /usr/bin/shfmt
sudo chmod +x /usr/bin/shfmt
- name: Download Dependencies
run: go mod download

- name: "Static Analysis: Copyright"
if: steps.filter.outputs.static-analysis == 'true' || steps.filter.outputs.go == 'true'
run: |
STATIC_ANALYSIS_JOB=test_copyright make static-analysis
shell: bash

- name: "Static Analysis: Shell Check"
if: steps.filter.outputs.static-analysis == 'true' || steps.filter.outputs.sh == 'true'
run: |
STATIC_ANALYSIS_JOB=test_static_analysis_shell make static-analysis
shell: bash

- name: "Static Analysis: Go Check"
if: steps.filter.outputs.static-analysis == 'true' || steps.filter.outputs.go == 'true'
run: |
# Explicitly set GOROOT to avoid golangci-lint/issues/3107
export "GOROOT=$(go env GOROOT)"
Expand All @@ -90,7 +88,6 @@ jobs:
CGO_LDFLAGS_ALLOW: "(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"

- name: "Static Analysis: Python Check"
if: steps.filter.outputs.static-analysis == 'true' || steps.filter.outputs.python == 'true'
run: |
STATIC_ANALYSIS_JOB=test_static_analysis_python make static-analysis
shell: bash
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Remove LXD
if: env.RUN_TEST == 'RUN'
run: |
set -euxo pipefail
sudo snap remove lxd --purge
- name: Setup LXD
if: matrix.cloud == 'localhost'
uses: canonical/setup-lxd@4e959f8e0d9c5feb27d44c5e4d9a330a782edee0
Expand Down
2 changes: 1 addition & 1 deletion apiserver/common/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (s *getToolsSuite) TestOSTools(c *gc.C) {

current := coretesting.CurrentVersion()
currentCopy := current
currentCopy.Release = coretesting.HostSeries(c)
currentCopy.Release = "jammy"
configAttrs := map[string]interface{}{
"name": "some-name",
"type": "some-type",
Expand Down
10 changes: 5 additions & 5 deletions core/lxdprofile/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const AppName = "juju"

// Prefix is used to prefix all the lxd profile programmable profiles. If a
// profile doesn't have the prefix, then it will be removed when ensuring the
// the validity of the names (see LXDProfileNames)
// the validity of the names (see FilterLXDProfileNames)
var Prefix = fmt.Sprintf("%s-", AppName)

// Name returns a serialisable name that we can use to identify profiles
Expand All @@ -27,10 +27,10 @@ func Name(modelName, appName string, revision int) string {
return fmt.Sprintf("%s%s-%s-%d", Prefix, modelName, appName, revision)
}

// LXDProfileNames ensures that the LXD profile names are unique yet preserve
// FilterLXDProfileNames ensures that the LXD profile names are unique yet preserve
// the same order as the input. It removes certain profile names from the list,
// for example "default" profile name will be removed.
func LXDProfileNames(names []string) []string {
func FilterLXDProfileNames(names []string) []string {
// ensure that the ones we have are unique
unique := make(map[string]int)
for k, v := range names {
Expand Down Expand Up @@ -111,10 +111,10 @@ func MatchProfileNameByAppName(names []string, appName string) (string, error) {
return "", errors.BadRequestf("no application name specified")
}
var foundProfile string
for _, p := range LXDProfileNames(names) {
for _, p := range FilterLXDProfileNames(names) {
rev, err := ProfileRevision(p)
if err != nil {
// "Shouldn't" happen since we used LXDProfileNames...
// "Shouldn't" happen since we used FilterLXDProfileNames...
if errors.IsBadRequest(err) {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion core/lxdprofile/name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (*LXDProfileNameSuite) TestProfileNames(c *gc.C) {
}
for k, tc := range testCases {
c.Logf("running test %d with input %q", k, tc.input)
c.Assert(lxdprofile.LXDProfileNames(tc.input), gc.DeepEquals, tc.output)
c.Assert(lxdprofile.FilterLXDProfileNames(tc.input), gc.DeepEquals, tc.output)
}
}

Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/juju/juju
go 1.21

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3 v3.0.0-beta.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v2 v2.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.4.0
Expand Down Expand Up @@ -36,7 +36,7 @@ require (
github.com/google/go-querystring v1.1.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/gorilla/schema v1.2.1
github.com/gorilla/schema v1.4.1
github.com/gorilla/websocket v1.5.1
github.com/gosuri/uitable v0.0.4
github.com/hashicorp/vault/api v1.10.0
Expand Down Expand Up @@ -105,13 +105,13 @@ require (
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vmware/govmomi v0.34.1
go.uber.org/mock v0.4.0
golang.org/x/crypto v0.25.0
golang.org/x/net v0.27.0
golang.org/x/crypto v0.26.0
golang.org/x/net v0.28.0
golang.org/x/oauth2 v0.21.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.22.0
golang.org/x/time v0.5.0
golang.org/x/tools v0.23.0
golang.org/x/sync v0.8.0
golang.org/x/sys v0.24.0
golang.org/x/time v0.6.0
golang.org/x/tools v0.24.0
google.golang.org/api v0.154.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/httprequest.v1 v1.2.1
Expand All @@ -133,7 +133,7 @@ require (

require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
Expand Down Expand Up @@ -164,7 +164,7 @@ require (
github.com/distribution/reference v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down Expand Up @@ -194,7 +194,7 @@ require (
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.6.6 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
Expand Down Expand Up @@ -288,9 +288,9 @@ require (
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
Loading

0 comments on commit 08fdd25

Please sign in to comment.