Skip to content

Commit

Permalink
chore: merge 2.9 into 3.1
Browse files Browse the repository at this point in the history
Conflicts:
- go.mod
- go.sum
- scripts/win-installer/setup.iss
- snap/snapcraft.yaml
- version/version.go
  • Loading branch information
hpidcock committed Aug 9, 2024
2 parents c40d13d + 7258009 commit b52e86e
Show file tree
Hide file tree
Showing 17 changed files with 255 additions and 103 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
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
sudo DEBIAN_FRONTEND=noninteractive apt install -y expect
Expand All @@ -58,27 +59,23 @@ jobs:
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)"
STATIC_ANALYSIS_JOB=test_static_analysis_go make static-analysis
shell: bash

- 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 @@ -51,6 +51,12 @@ jobs:
if: env.RUN_TEST == 'RUN'
uses: actions/checkout@v3

- name: Remove LXD
if: env.RUN_TEST == 'RUN'
run: |
set -euxo pipefail
sudo snap remove lxd --purge
- name: Setup LXD
if: env.RUN_TEST == 'RUN' && matrix.cloud == 'localhost'
uses: canonical/setup-lxd@90d76101915da56a42a562ba766b1a77019242fd
Expand Down
10 changes: 5 additions & 5 deletions acceptancetests/jujupy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ def backup(self):
raise
log.info('backup file {}'.format(output))
backup_file_pattern = re.compile(
'(juju-backup-[0-9-]+\.(t|tar.)gz)'.encode('ascii'))
'(juju-backup-[0-9-]+\\.(t|tar.)gz)'.encode('ascii'))
match = backup_file_pattern.search(output)
if match is None:
raise Exception("The backup file was not found in output: %s" %
Expand Down Expand Up @@ -2280,7 +2280,7 @@ def handle_openstack(self, child, cloud):
child.expect(self.REGION_ENDPOINT_PROMPT)
child.sendline(values['endpoint'])
match = child.expect([
u"Enter another region\? \([yY]/[nN]\):",
u"Enter another region\\? \\([yY]/[nN]\\):",
u"Can't validate endpoint"
])
if match == 1:
Expand All @@ -2292,7 +2292,7 @@ def handle_openstack(self, child, cloud):

def handle_vsphere(self, child, cloud):
match = child.expect([u"Enter a name for your .* cloud:",
u'Enter the (vCenter address or URL|API endpoint url for the cloud \[\]):'])
u'Enter the (vCenter address or URL|API endpoint url for the cloud \\[\\]):'])
if match == 0:
raise NameNotAccepted('Cloud name not accepted.')
if match == 1:
Expand All @@ -2308,7 +2308,7 @@ def handle_vsphere(self, child, cloud):
raise InvalidEndpoint()
child.sendline(name)
child.expect(
u'Enter another (datacenter|region)\? \([yY]/[nN]\):')
u'Enter another (datacenter|region)\\? \\([yY]/[nN]\\):')
if num + 1 < len(cloud['regions']):
child.sendline('y')
else:
Expand Down Expand Up @@ -2417,7 +2417,7 @@ def register_user_interactively(client, token, controller_name):
child.sendline(password)
child.expect(u'Confirm password:')
child.sendline(password)
child.expect(u'Enter a name for this controller( \[.*\])?:')
child.expect(u'Enter a name for this controller( \\[.*\\])?:')
child.sendline(controller_name)

def login_if_need(session):
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/jujupy/tests/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_to_exception_stuck_allocating(self):
current='allocating', message='foo')
with self.assertRaisesRegexp(
StuckAllocatingError,
"\('0', 'Stuck allocating. Last message: foo'\)"):
"\\('0', 'Stuck allocating. Last message: foo'\\)"):
raise item.to_exception()

def test_to_exception_allocating_unit(self):
Expand Down
4 changes: 2 additions & 2 deletions acceptancetests/repository/trusty/haproxy/cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_branch_config(config_file):
line = line.split('#')[0].strip()
bzr_match = re.match(r'(\S+)\s+'
'lp:([^;]+)'
'(?:;revno=(\d+))?', line)
'(?:;revno=(\\d+))?', line)
if bzr_match:
name, branch, revno = bzr_match.group(1, 2, 3)
if revno is None:
Expand All @@ -42,7 +42,7 @@ def get_branch_config(config_file):
branches[name] = (branch, revspec)
continue
dir_match = re.match(r'(\S+)\s+'
'\(directory\)', line)
'\\(directory\\)', line)
if dir_match:
name = dir_match.group(1)
branches[name] = None
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/tests/test_jujucharm.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_ensure_valid_name(self):
self.assertIsNone(Charm.NAME_REGEX.match(charm.metadata['name']))
self.assertRaisesRegexp(
JujuAssertionError,
'Invalid Juju Charm Name, "BAD_NAME" does not match ".*"\.',
'Invalid Juju Charm Name, "BAD_NAME" does not match ".*"\\.',
Charm, 'BAD_NAME', 'A charm with a checked bad name')

def test_ensure_valid_name_anchoring(self):
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
40 changes: 20 additions & 20 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.9.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0
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 @@ -34,8 +34,8 @@ require (
github.com/gofrs/uuid v4.2.0+incompatible
github.com/google/gnostic-models v0.6.8
github.com/google/go-querystring v1.1.0
github.com/google/uuid v1.4.0
github.com/gorilla/schema v1.2.0
github.com/google/uuid v1.6.0
github.com/gorilla/schema v1.4.1
github.com/gorilla/websocket v1.5.0
github.com/gosuri/uitable v0.0.1
github.com/hashicorp/go-hclog v1.2.0
Expand Down Expand Up @@ -105,13 +105,13 @@ require (
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vmware/govmomi v0.21.1-0.20191008161538-40aebf13ba45
go.uber.org/mock v0.2.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.152.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/httprequest.v1 v1.2.1
Expand All @@ -133,10 +133,10 @@ require (

require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // 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.1.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/adrg/xdg v0.3.3 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect
Expand Down Expand Up @@ -171,7 +171,7 @@ require (
github.com/gobwas/glob v0.2.3 // indirect
github.com/godbus/dbus/v5 v5.0.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand Down Expand Up @@ -250,7 +250,7 @@ require (
github.com/pborman/uuid v1.2.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/pkg/xattr v0.4.9 // indirect
Expand All @@ -261,7 +261,7 @@ require (
github.com/rivo/uniseg v0.4.4 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/fastuuid v1.2.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
Expand All @@ -271,7 +271,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.47 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
Expand All @@ -283,12 +283,12 @@ require (
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/atomic v1.9.0 // 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-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/errgo.v1 v1.0.1 // indirect
gopkg.in/gobwas/glob.v0 v0.2.3 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit b52e86e

Please sign in to comment.