Skip to content

Commit

Permalink
Merge branch '2.8' into merge-2.8-20210304
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyworld committed Mar 4, 2021
2 parents 014755c + 469e5d4 commit 272429e
Show file tree
Hide file tree
Showing 353 changed files with 836 additions and 706 deletions.
4 changes: 2 additions & 2 deletions acceptancetests/jujupy/k8s_provider/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ def patch_configmap(self, namespace, cm_name, key, value):
cm['data'] = data
self.kubectl_apply(json.dumps(cm))

def sh(self, *args, shell=False):
args = [quote(str(arg)) if shell else str(arg) for arg in args]
def sh(self, *args, shell=False, ignore_quote=False):
args = [quote(str(arg)) if shell and not ignore_quote else str(arg) for arg in args]
logger.debug('sh -> %s', ' '.join(args))
return subprocess.check_output(
# cmd should be a list of str.
Expand Down
4 changes: 2 additions & 2 deletions acceptancetests/jujupy/k8s_provider/eks.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _ensure_eksctl_bin(self):
else:
self.sh(
'''curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp && mv /tmp/eksctl %s
''' % self._eksctl_bin, shell=True)
''' % self._eksctl_bin, shell=True, ignore_quote=True)

def eksctl(self, *args):
return self.sh(self._eksctl_bin, *args)
Expand Down Expand Up @@ -172,6 +172,6 @@ def log_remaining(remaining, msg=''):
def is_404(err):
try:
err_msg = err.output.decode()
return '404' in err_msg or 'ResourceNotFoundException' in err_msg
return any([keyword in err_msg for keyword in ['404', 'does not exist', 'ResourceNotFoundException']])
except Exception:
return False
2 changes: 1 addition & 1 deletion agent/agentbootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/juju/clock"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/mgo/v2"
"github.com/juju/names/v4"
"github.com/juju/os/v2/series"
"github.com/juju/utils/v2"
"gopkg.in/mgo.v2"

"github.com/juju/juju/agent"
apiagent "github.com/juju/juju/api/agent"
Expand Down
2 changes: 1 addition & 1 deletion api/agent/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
stdtesting "testing"

"github.com/juju/errors"
"github.com/juju/mgo/v2"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"gopkg.in/mgo.v2"

"github.com/juju/juju/api"
apiagent "github.com/juju/juju/api/agent"
Expand Down
4 changes: 2 additions & 2 deletions api/apiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"sync/atomic"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/gorilla/websocket"
"github.com/juju/clock"
"github.com/juju/errors"
Expand All @@ -29,8 +31,6 @@ import (
"github.com/juju/utils/v2"
"github.com/juju/utils/v2/parallel"
"github.com/juju/version"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"
"gopkg.in/retry.v1"

Expand Down
2 changes: 1 addition & 1 deletion api/applicationoffers/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
package applicationoffers

import (
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/juju/charm/v8"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/names/v4"
"gopkg.in/macaroon-bakery.v2/bakery"

"github.com/juju/juju/api/base"
"github.com/juju/juju/apiserver/params"
Expand Down
4 changes: 2 additions & 2 deletions api/authentication/interactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"net/http"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery/form"
"github.com/juju/errors"
"gopkg.in/httprequest.v1"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon-bakery.v2/httpbakery/form"
)

const authMethod = "juju_userpass"
Expand Down
4 changes: 2 additions & 2 deletions api/authentication/interactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"net/http/httptest"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery/form"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"gopkg.in/httprequest.v1"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon-bakery.v2/httpbakery/form"

"github.com/juju/juju/api/authentication"
)
Expand Down
2 changes: 1 addition & 1 deletion api/base/caller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"net/http"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/juju/names/v4"
"gopkg.in/httprequest.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion api/crossmodelrelations/crossmodelrelations.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
package crossmodelrelations

import (
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/juju/clock"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/names/v4"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api/base"
Expand Down
2 changes: 1 addition & 1 deletion api/crossmodelrelations/crossmodelrelations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"fmt"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/juju/clock"
"github.com/juju/errors"
jujutesting "github.com/juju/testing"
jc "github.com/juju/testing/checkers"
"github.com/juju/worker/v2/workertest"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api/base"
Expand Down
2 changes: 1 addition & 1 deletion api/crossmodelrelations/macarooncache.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/juju/clock"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/charmstore"
Expand Down
2 changes: 1 addition & 1 deletion api/crossmodelrelations/macarooncache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
gc "gopkg.in/check.v1"
"gopkg.in/macaroon.v2"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/juju/juju/api/crossmodelrelations"
apitesting "github.com/juju/juju/api/testing"
coretesting "github.com/juju/juju/testing"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
)

const longerThanExpiryTime = 11 * time.Minute
Expand Down
2 changes: 1 addition & 1 deletion api/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"context"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/clock"
"github.com/juju/errors"
"github.com/juju/names/v4"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api/base"
Expand Down
4 changes: 2 additions & 2 deletions api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"net/http"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/errors"
"gopkg.in/httprequest.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/apiserver/params"
Expand Down
2 changes: 1 addition & 1 deletion api/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"net/http/httptest"
"reflect"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/errors"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"gopkg.in/httprequest.v1"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api"
Expand Down
2 changes: 1 addition & 1 deletion api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"net/url"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/clock"
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/version"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api/base"
Expand Down
4 changes: 2 additions & 2 deletions api/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"runtime/debug"
"strconv"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/errors"
"github.com/juju/featureflag"
"github.com/juju/names/v4"
"github.com/juju/utils/v2"
"github.com/juju/version"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api/base"
Expand Down
2 changes: 1 addition & 1 deletion api/state_macaroon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api"
Expand Down
6 changes: 3 additions & 3 deletions api/testing/macaroonsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"net/http/cookiejar"
"net/url"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakerytest"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/errors"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon-bakery.v2/bakerytest"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api"
Expand Down
4 changes: 2 additions & 2 deletions api/watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"context"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/v2"
"github.com/juju/worker/v2"
"github.com/juju/worker/v2/workertest"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/api"
Expand Down
4 changes: 2 additions & 2 deletions apiserver/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import (
"strconv"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/v2"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/httpbakery"

"github.com/juju/juju/api"
apimachiner "github.com/juju/juju/api/machiner"
Expand Down
8 changes: 4 additions & 4 deletions apiserver/authentication/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"net/http"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/identchecker"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/clock"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/names/v4"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon-bakery.v2/bakery/identchecker"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

apiservererrors "github.com/juju/juju/apiserver/errors"
Expand Down
10 changes: 5 additions & 5 deletions apiserver/authentication/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import (
"context"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/identchecker"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakerytest"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
"github.com/juju/clock/testclock"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/v2"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon-bakery.v2/bakery/identchecker"
"gopkg.in/macaroon-bakery.v2/bakerytest"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/apiserver/authentication"
Expand Down
4 changes: 2 additions & 2 deletions apiserver/bakeryutil/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"
"time"

"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/apiserver/authentication"
Expand Down
4 changes: 2 additions & 2 deletions apiserver/common/crossmodel/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"context"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/juju/clock"
"github.com/juju/errors"
"github.com/juju/names/v4"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon.v2"
"gopkg.in/yaml.v2"

Expand Down
4 changes: 2 additions & 2 deletions apiserver/common/crossmodel/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
"strings"
"time"

"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery/checkers"
"github.com/juju/clock/testclock"
"github.com/juju/errors"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/v2"
gc "gopkg.in/check.v1"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon.v2"

"github.com/juju/juju/apiserver/authentication"
Expand Down
Loading

0 comments on commit 272429e

Please sign in to comment.