Skip to content

Commit

Permalink
Merge pull request #14050 from wallyworld/merge-2.9-20220519
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
jujubot committed May 19, 2022
2 parents a64f334 + 13199c4 commit 2fd10f4
Show file tree
Hide file tree
Showing 204 changed files with 3,743 additions and 2,238 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -9,13 +9,15 @@ on:
- 'testing/**'
- 'tests/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
workflow_dispatch:

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
@@ -1,5 +1,5 @@
name: "CLA check"
on: [pull_request]
on: [pull_request, workflow_dispatch]
permissions:
contents: read

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/client-tests.yml
Expand Up @@ -9,13 +9,15 @@ on:
- 'testing/**'
- 'tests/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
workflow_dispatch:

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/microk8s-tests.yml
Expand Up @@ -2,7 +2,7 @@ name: Test Kubeflow

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

env:
DOCKER_USERNAME: jujuqabot
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/smoke.yml
@@ -1,5 +1,10 @@
name: "Smoke"
on: [push, pull_request]
on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

jobs:

smoke:
Expand Down Expand Up @@ -159,7 +164,7 @@ jobs:
sg microk8s "microk8s kubectl create -f .github/reg.yml"
# TODO:(jack-w-shaw) Figure out why we need this and do something nicer
sudo microk8s refresh-certs
sudo microk8s refresh-certs --cert ca.crt
# Wait for registry
sg microk8s "microk8s kubectl wait --for condition=available deployment registry -n container-registry --timeout 180s" || true
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/snap.yml
@@ -1,5 +1,9 @@
name: "Snapcraft"
on: [push, pull_request]
on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
permissions:
contents: read

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/static-analysis.yml
@@ -1,5 +1,9 @@
name: "Static Analysis"
on: [push, pull_request]
on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
permissions:
contents: read

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-brew-formulae.yml
Expand Up @@ -4,6 +4,7 @@ on:
types: [published]
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
permissions:
contents: read

Expand Down
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Expand Up @@ -21,9 +21,8 @@ Documentation:
* [source tree docs](doc/)

Community:
* https://jujucharms.com/community/
* https://discourse.jujucharms.com/
* [#juju on freenode](http://webchat.freenode.net/?channels=juju)
* https://chat.charmhub.io
* https://discourse.charmhub.io/

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

Use the following links to contact the community:

- Community page: https://jujucharms.com/community/
- IRC channel on freenode: `#juju`
- Discourse forum: [https://discourse.jujucharms.com/](https://discourse.jujucharms.com/)
- Mattermost chat: [https://chat.charmhub.io/](https://chat.charmhub.io/)
- Discourse forum: [https://discourse.charmhub.io/](https://discourse.charmhub.io/)
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Expand Up @@ -6,7 +6,7 @@

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

## QA steps
Expand Down
4 changes: 2 additions & 2 deletions acceptancetests/README.md
Expand Up @@ -58,8 +58,8 @@ The script is parameter-rich and should be able to accept any tweaks that you wa

Further description can be found here in discourse:

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

### Quick run using LXD
To run a test locally with lxd and locally complied juju:
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/charms/mediawiki/README.md
Expand Up @@ -118,7 +118,7 @@ When set to true this option will enable the following MediaWiki options: `$wgDe

[1]: https://juju.ubuntu.com/docs/getting-started.html
[2]: https://juju.ubuntu.com/docs/getting-started.html#installation
[3]: http://jujucharms.com/charms/precise/mysql
[3]: http://charmhub.io/mysql
[4]: http://www.mediawiki.org/wiki/Manual:$wgDefaultSkin
[5]: http://packages.ubuntu.com/precise/mediawiki
[6]: http://www.mediawiki.org/wiki/Download_from_Git
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/charms/mysql/README.md
Expand Up @@ -45,7 +45,7 @@ You can add further slaves with:

## Monitoring

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.
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.

# Configuration

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/charms/statusstresser/README.md
Expand Up @@ -48,5 +48,5 @@ This charm has no configuration options.

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

2 changes: 1 addition & 1 deletion acceptancetests/repository/charms/ubuntu/README.md
Expand Up @@ -48,5 +48,5 @@ This charm has no configuration options.

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

2 changes: 1 addition & 1 deletion acceptancetests/repository/trusty/mysql/README.md
Expand Up @@ -45,7 +45,7 @@ You can add further slaves with:

## Monitoring

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.
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.

# Configuration

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/trusty/statusstresser/README.md
Expand Up @@ -48,5 +48,5 @@ This charm has no configuration options.

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

2 changes: 1 addition & 1 deletion acceptancetests/repository/trusty/ubuntu/README.md
Expand Up @@ -48,5 +48,5 @@ This charm has no configuration options.

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

2 changes: 1 addition & 1 deletion acceptancetests/repository/xenial/mysql/README.md
Expand Up @@ -45,7 +45,7 @@ You can add further slaves with:

## Monitoring

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.
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.

# Configuration

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/xenial/ubuntu/README.md
Expand Up @@ -48,5 +48,5 @@ This charm has no configuration options.

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

3 changes: 0 additions & 3 deletions api/agent/uniter/unit.go
Expand Up @@ -493,9 +493,6 @@ func (u *Unit) ClosePorts(protocol string, fromPort, toPort int) error {
var ErrNoCharmURLSet = errors.New("unit has no charm url set")

// CharmURL returns the charm URL this unit is currently using.
//
// NOTE: This differs from state.Unit.CharmURL() by returning
// an error instead of a bool, because it needs to make an API call.
func (u *Unit) CharmURL() (*charm.URL, error) {
var results params.StringBoolResults
args := params.Entities{
Expand Down
5 changes: 3 additions & 2 deletions api/client/charms/client.go
Expand Up @@ -14,6 +14,7 @@ import (
api "github.com/juju/juju/api/client/resources"
apicharm "github.com/juju/juju/api/common/charm"
commoncharms "github.com/juju/juju/api/common/charms"
apiservererrors "github.com/juju/juju/apiserver/errors"
"github.com/juju/juju/rpc/params"
)

Expand Down Expand Up @@ -73,12 +74,12 @@ func (c *Client) ResolveCharms(charms []CharmToResolve) ([]ResolvedCharm, error)
}
var result params.ResolveCharmWithChannelResults
if err := c.facade.FacadeCall("ResolveCharms", args, &result); err != nil {
return nil, errors.Trace(err)
return nil, errors.Trace(apiservererrors.RestoreError(err))
}
resolvedCharms := make([]ResolvedCharm, len(charms))
for i, r := range result.Results {
if r.Error != nil {
resolvedCharms[i] = ResolvedCharm{Error: r.Error}
resolvedCharms[i] = ResolvedCharm{Error: apiservererrors.RestoreError(r.Error)}
continue
}
curl, err := charm.ParseURL(r.URL)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/apiserver_test.go
Expand Up @@ -429,7 +429,7 @@ func (s *apiserverSuite) TestEmbeddedCommandInvalidUser(c *gc.C) {
User: "123@",
Commands: []string{"status --color"},
}
s.assertEmbeddedCommand(c, cmdArgs, "", &params.Error{Message: `user name "123@" not valid`})
s.assertEmbeddedCommand(c, cmdArgs, "", &params.Error{Message: `user name "123@" not valid`, Code: params.CodeNotValid})
}

func (s *apiserverSuite) TestEmbeddedCommandInvalidMacaroon(c *gc.C) {
Expand Down
6 changes: 0 additions & 6 deletions apiserver/common/common_test.go
Expand Up @@ -5,21 +5,15 @@ package common_test

import (
"fmt"
stdtesting "testing"

"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/v3"
gc "gopkg.in/check.v1"

"github.com/juju/juju/apiserver/common"
coretesting "github.com/juju/juju/testing"
)

func TestAll(t *stdtesting.T) {
coretesting.MgoTestPackage(t)
}

type commonSuite struct{}

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

0 comments on commit 2fd10f4

Please sign in to comment.