Skip to content

Commit 2fd10f4

Browse files
authored
Merge pull request #14050 from wallyworld/merge-2.9-20220519
#14050 Merge 2.9, but revert the commit which deleted secrets from 2.9 #13996 [JUJU-1019] Bug 1969929 bundle revision only #14019 [JUJU-1082] Fix inst filtering to avoid arch mismatches #14020 [JUJU-1069] CI improvements #14021 [JUJU-1079] Update volumes if statefulset spec changed; #13684 [JUJU-544] Remove redundant ifCredentialValid wrappers from model manifolds #14002 [JUJU-1054] Ensure to convert pod status to juju status consistent across operators #14024 Juju 1061 add machine private key #14026 [JUJU-1077] Refactor unit tests #14033 [JUJU-1103] Add --cert option to microk8s refresh-cert #13546 [JUJU-299] Store unit CharmURL as a string reference #14025 [JUJU-1089] Deprecated note for --no-download flag in create-backup #14023 [JUJU-1070] Fix/lp 1971560 #14027 Fix K8s application removal in pre-initialized error state #14030 [JUJU-1099] Restore "Store unit CharmURL as a string reference" #14037 [JUJU-1109] Fix encoding for interfaceAddressDisplay, used by the network-get hook tool #14028 [JUJU-1091] Cloud-init wait for IP #14029 [JUJU-1070] Use first 6 digits for short model UUID; #14034 [JUJU-1070] Use first 6 digits for short model UUID; #14042 Use default arch when provisioning a machine #14045 Update references to jujucharms.com #14046 Address consistency in use of id/Id/ID in command line output #14047 Adjust the default log level for installing/starting a service ``` # Conflicts: # apiserver/facades/controller/firewaller/firewaller.go # apiserver/facades/controller/firewaller/firewaller_test.go # apiserver/facades/controller/firewaller/firewaller_unit_test.go # apiserver/facades/controller/remoterelations/mock_test.go # apiserver/facades/controller/remoterelations/remoterelations_test.go # caas/kubernetes/provider/application/application_test.go # caas/kubernetes/provider/k8s.go # go.mod # go.sum # mongo/mongo_test.go # rpc/params/apierror.go # snap/snapcraft.yaml # version/version.go # worker/uniter/operation/interface.go # worker/uniter/operation/runhook_test.go # worker/uniter/secrets/rotatesecrets.go # worker/uniter/secrets/rotatesecrets_test.go ``` ## QA steps See PRs [JUJU-1019]: https://warthogs.atlassian.net/browse/JUJU-1019?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1082]: https://warthogs.atlassian.net/browse/JUJU-1082?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1069]: https://warthogs.atlassian.net/browse/JUJU-1069?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1079]: https://warthogs.atlassian.net/browse/JUJU-1079?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-544]: https://warthogs.atlassian.net/browse/JUJU-544?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1054]: https://warthogs.atlassian.net/browse/JUJU-1054?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1077]: https://warthogs.atlassian.net/browse/JUJU-1077?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1103]: https://warthogs.atlassian.net/browse/JUJU-1103?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-299]: https://warthogs.atlassian.net/browse/JUJU-299?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1089]: https://warthogs.atlassian.net/browse/JUJU-1089?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1070]: https://warthogs.atlassian.net/browse/JUJU-1070?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1099]: https://warthogs.atlassian.net/browse/JUJU-1099?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1109]: https://warthogs.atlassian.net/browse/JUJU-1109?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [JUJU-1091]: https://warthogs.atlassian.net/browse/JUJU-1091?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2 parents a64f334 + 13199c4 commit 2fd10f4

File tree

204 files changed

+3743
-2238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+3743
-2238
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ on:
99
- 'testing/**'
1010
- 'tests/**'
1111
pull_request:
12+
types: [opened, synchronize, reopened, ready_for_review]
1213
paths-ignore:
1314
- 'acceptancetests/**'
1415
- 'doc/**'
1516
- 'snap/**'
1617
- 'testcharms/**'
1718
- 'testing/**'
1819
- 'tests/**'
20+
workflow_dispatch:
1921

2022
permissions:
2123
contents: read

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "CLA check"
2-
on: [pull_request]
2+
on: [pull_request, workflow_dispatch]
33
permissions:
44
contents: read
55

.github/workflows/client-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ on:
99
- 'testing/**'
1010
- 'tests/**'
1111
pull_request:
12+
types: [opened, synchronize, reopened, ready_for_review]
1213
paths-ignore:
1314
- 'acceptancetests/**'
1415
- 'doc/**'
1516
- 'snap/**'
1617
- 'testcharms/**'
1718
- 'testing/**'
1819
- 'tests/**'
20+
workflow_dispatch:
1921

2022
permissions:
2123
contents: read

.github/workflows/microk8s-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test Kubeflow
22

33
# The small `edge` bundle has been deprecated, `lite` bundle takes 40mins to run which is too slow for gh action.
44
# Disable this one for now, please check `nw-deploy-kubeflow` on Jenkins.
5-
on: {}
5+
on: workflow_dispatch
66

77
env:
88
DOCKER_USERNAME: jujuqabot

.github/workflows/smoke.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: "Smoke"
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
workflow_dispatch:
7+
38
jobs:
49

510
smoke:
@@ -159,7 +164,7 @@ jobs:
159164
sg microk8s "microk8s kubectl create -f .github/reg.yml"
160165
161166
# TODO:(jack-w-shaw) Figure out why we need this and do something nicer
162-
sudo microk8s refresh-certs
167+
sudo microk8s refresh-certs --cert ca.crt
163168
164169
# Wait for registry
165170
sg microk8s "microk8s kubectl wait --for condition=available deployment registry -n container-registry --timeout 180s" || true

.github/workflows/snap.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Snapcraft"
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
workflow_dispatch:
37
permissions:
48
contents: read
59

.github/workflows/static-analysis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Static Analysis"
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
workflow_dispatch:
37
permissions:
48
contents: read
59

.github/workflows/update-brew-formulae.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
types: [published]
55
schedule:
66
- cron: '0 */12 * * *'
7+
workflow_dispatch:
78
permissions:
89
contents: read
910

CONTRIBUTING.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ Documentation:
2121
* [source tree docs](doc/)
2222

2323
Community:
24-
* https://jujucharms.com/community/
25-
* https://discourse.jujucharms.com/
26-
* [#juju on freenode](http://webchat.freenode.net/?channels=juju)
24+
* https://chat.charmhub.io
25+
* https://discourse.charmhub.io/
2726

2827
Building Juju
2928
=============
@@ -408,6 +407,5 @@ beyond the workflow and the [issue tracker](https://bugs.launchpad.net/juju/+bug
408407

409408
Use the following links to contact the community:
410409

411-
- Community page: https://jujucharms.com/community/
412-
- IRC channel on freenode: `#juju`
413-
- Discourse forum: [https://discourse.jujucharms.com/](https://discourse.jujucharms.com/)
410+
- Mattermost chat: [https://chat.charmhub.io/](https://chat.charmhub.io/)
411+
- Discourse forum: [https://discourse.charmhub.io/](https://discourse.charmhub.io/)

PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
- [ ] Requires a [pylibjuju](https://github.com/juju/python-libjuju) change
88
- [ ] Added [integration tests](https://github.com/juju/juju/tree/develop/tests) for the PR
9-
- [ ] Added or updated [doc.go](https://discourse.jujucharms.com/t/readme-in-packages/451) related to packages changed
9+
- [ ] Added or updated [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) related to packages changed
1010
- [ ] Comments answer the question of why design decisions were made
1111

1212
## QA steps

acceptancetests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ The script is parameter-rich and should be able to accept any tweaks that you wa
5858

5959
Further description can be found here in discourse:
6060

61-
here: [discourse-link](https://discourse.jujucharms.com/t/call-for-testing-running-acceptance-tests-locally-and-easily/1449)
62-
and here: [discourse-link](https://discourse.jujucharms.com/t/wip-juju-acceptance-testing-primer/1482)
61+
here: [discourse-link](https://discourse.charmhub.io/t/call-for-testing-running-acceptance-tests-locally-and-easily/1449)
62+
and here: [discourse-link](https://discourse.charmhub.io/t/wip-juju-acceptance-testing-primer/1482)
6363

6464
### Quick run using LXD
6565
To run a test locally with lxd and locally complied juju:

acceptancetests/repository/charms/mediawiki/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ When set to true this option will enable the following MediaWiki options: `$wgDe
118118

119119
[1]: https://juju.ubuntu.com/docs/getting-started.html
120120
[2]: https://juju.ubuntu.com/docs/getting-started.html#installation
121-
[3]: http://jujucharms.com/charms/precise/mysql
121+
[3]: http://charmhub.io/mysql
122122
[4]: http://www.mediawiki.org/wiki/Manual:$wgDefaultSkin
123123
[5]: http://packages.ubuntu.com/precise/mediawiki
124124
[6]: http://www.mediawiki.org/wiki/Download_from_Git

acceptancetests/repository/charms/mysql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can add further slaves with:
4545

4646
## Monitoring
4747

48-
This charm provides relations that support monitoring via either [Nagios](https://jujucharms.com/precise/nagios) or [Munin](https://jujucharms.com/precise/munin/). Refer to the appropriate charm for usage.
48+
This charm provides relations that support monitoring via either [Nagios](https://charmhub.io/nagios) or [Munin](https://charmhub.io/munin/). Refer to the appropriate charm for usage.
4949

5050
# Configuration
5151

acceptancetests/repository/charms/statusstresser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ This charm has no configuration options.
4848

4949
- Author: Juju Charm Community
5050
- Report bugs at: [http://bugs.launchpad.net/charms/+source/ubuntu](http://bugs.launchpad.net/charms/+source/ubuntu)
51-
- Location: [http://jujucharms.com/charms/precise/ubuntu](http://jujucharms.com/charms/precise/ubuntu)
51+
- Location: [http://charmhub.io/ubuntu](http://charmhub.io/ubuntu)
5252

acceptancetests/repository/charms/ubuntu/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ This charm has no configuration options.
4848

4949
- Author: Juju Charm Community
5050
- Report bugs at: [http://bugs.launchpad.net/charms/+source/ubuntu](http://bugs.launchpad.net/charms/+source/ubuntu)
51-
- Location: [http://jujucharms.com/charms/precise/ubuntu](http://jujucharms.com/charms/precise/ubuntu)
51+
- Location: [http://charmhub.io/ubuntu](http://charmhub.io/ubuntu)
5252

acceptancetests/repository/trusty/mysql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can add further slaves with:
4545

4646
## Monitoring
4747

48-
This charm provides relations that support monitoring via either [Nagios](https://jujucharms.com/precise/nagios) or [Munin](https://jujucharms.com/precise/munin/). Refer to the appropriate charm for usage.
48+
This charm provides relations that support monitoring via either [Nagios](https://charmhub.io/nagios) or [Munin](https://charmhub.io/munin/). Refer to the appropriate charm for usage.
4949

5050
# Configuration
5151

acceptancetests/repository/trusty/statusstresser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ This charm has no configuration options.
4848

4949
- Author: Juju Charm Community
5050
- Report bugs at: [http://bugs.launchpad.net/charms/+source/ubuntu](http://bugs.launchpad.net/charms/+source/ubuntu)
51-
- Location: [http://jujucharms.com/charms/precise/ubuntu](http://jujucharms.com/charms/precise/ubuntu)
51+
- Location: [http://charmhub.io/ubuntu](http://charmhub.io/ubuntu)
5252

acceptancetests/repository/trusty/ubuntu/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ This charm has no configuration options.
4848

4949
- Author: Juju Charm Community
5050
- Report bugs at: [http://bugs.launchpad.net/charms/+source/ubuntu](http://bugs.launchpad.net/charms/+source/ubuntu)
51-
- Location: [http://jujucharms.com/charms/precise/ubuntu](http://jujucharms.com/charms/precise/ubuntu)
51+
- Location: [http://charmhub.io/ubuntu](http://charmhub.io/ubuntu)
5252

acceptancetests/repository/xenial/mysql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can add further slaves with:
4545

4646
## Monitoring
4747

48-
This charm provides relations that support monitoring via either [Nagios](https://jujucharms.com/precise/nagios) or [Munin](https://jujucharms.com/precise/munin/). Refer to the appropriate charm for usage.
48+
This charm provides relations that support monitoring via either [Nagios](https://charmhub.io/nagios) or [Munin](https://charmhub.io/munin/). Refer to the appropriate charm for usage.
4949

5050
# Configuration
5151

acceptancetests/repository/xenial/ubuntu/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ This charm has no configuration options.
4848

4949
- Author: Juju Charm Community
5050
- Report bugs at: [http://bugs.launchpad.net/charms/+source/ubuntu](http://bugs.launchpad.net/charms/+source/ubuntu)
51-
- Location: [http://jujucharms.com/charms/precise/ubuntu](http://jujucharms.com/charms/precise/ubuntu)
51+
- Location: [http://charmhub.io/ubuntu](http://charmhub.io/ubuntu)
5252

api/agent/uniter/unit.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,6 @@ func (u *Unit) ClosePorts(protocol string, fromPort, toPort int) error {
493493
var ErrNoCharmURLSet = errors.New("unit has no charm url set")
494494

495495
// CharmURL returns the charm URL this unit is currently using.
496-
//
497-
// NOTE: This differs from state.Unit.CharmURL() by returning
498-
// an error instead of a bool, because it needs to make an API call.
499496
func (u *Unit) CharmURL() (*charm.URL, error) {
500497
var results params.StringBoolResults
501498
args := params.Entities{

api/client/charms/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
api "github.com/juju/juju/api/client/resources"
1515
apicharm "github.com/juju/juju/api/common/charm"
1616
commoncharms "github.com/juju/juju/api/common/charms"
17+
apiservererrors "github.com/juju/juju/apiserver/errors"
1718
"github.com/juju/juju/rpc/params"
1819
)
1920

@@ -73,12 +74,12 @@ func (c *Client) ResolveCharms(charms []CharmToResolve) ([]ResolvedCharm, error)
7374
}
7475
var result params.ResolveCharmWithChannelResults
7576
if err := c.facade.FacadeCall("ResolveCharms", args, &result); err != nil {
76-
return nil, errors.Trace(err)
77+
return nil, errors.Trace(apiservererrors.RestoreError(err))
7778
}
7879
resolvedCharms := make([]ResolvedCharm, len(charms))
7980
for i, r := range result.Results {
8081
if r.Error != nil {
81-
resolvedCharms[i] = ResolvedCharm{Error: r.Error}
82+
resolvedCharms[i] = ResolvedCharm{Error: apiservererrors.RestoreError(r.Error)}
8283
continue
8384
}
8485
curl, err := charm.ParseURL(r.URL)

apiserver/apiserver_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func (s *apiserverSuite) TestEmbeddedCommandInvalidUser(c *gc.C) {
429429
User: "123@",
430430
Commands: []string{"status --color"},
431431
}
432-
s.assertEmbeddedCommand(c, cmdArgs, "", &params.Error{Message: `user name "123@" not valid`})
432+
s.assertEmbeddedCommand(c, cmdArgs, "", &params.Error{Message: `user name "123@" not valid`, Code: params.CodeNotValid})
433433
}
434434

435435
func (s *apiserverSuite) TestEmbeddedCommandInvalidMacaroon(c *gc.C) {

apiserver/common/common_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,15 @@ package common_test
55

66
import (
77
"fmt"
8-
stdtesting "testing"
98

109
"github.com/juju/names/v4"
1110
jc "github.com/juju/testing/checkers"
1211
"github.com/juju/utils/v3"
1312
gc "gopkg.in/check.v1"
1413

1514
"github.com/juju/juju/apiserver/common"
16-
coretesting "github.com/juju/juju/testing"
1715
)
1816

19-
func TestAll(t *stdtesting.T) {
20-
coretesting.MgoTestPackage(t)
21-
}
22-
2317
type commonSuite struct{}
2418

2519
var _ = gc.Suite(&commonSuite{})

0 commit comments

Comments
 (0)