New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce rootkey storage from bakeryv2 upstream #11082
Conversation
bakery, err := bakery.NewService(bakery.NewServiceParams{ | ||
Location: "juju model " + s.State.ModelUUID(), | ||
Store: store, | ||
b := bakery.New(bakery.BakeryParams{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Suggestion), give the b object a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only used a couple of lines below and "bakery" clashes with the package name. "bkry" or something seems worse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice thanks!
build failed: seems one more file needs to be changed apiserver/bakeryutil/service.go
;
c.Assert(err, jc.ErrorIsNil) | ||
|
||
// The background thread that removes records runs every 60s. | ||
// Give a little bit of leeway for loaded systems. | ||
for i := 0; i < 90; i++ { | ||
_, err = s.service.CheckAny([]macaroon.Slice{{mac}}, nil, nil) | ||
_, _, err = s.bakery.Oven.VerifyMacaroon(context.TODO(), macaroon.Slice{mac.M()}) | ||
if err == nil { | ||
time.Sleep(time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to current pr, but not sure if we can inject clock and mock for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly the clock is hard wired in the upstream repo
d15d038
to
dcffc56
Compare
|
|
cc48db1
to
e4170af
Compare
|
e4170af
to
7d5f80c
Compare
|
Description of change
More progress on moving off bakeryv2-unstable.
Some tests are updated to use bakeryv2 and the mongo backed root key storage is also ported across.
QA steps
bootstrap a controller
clear local cookies
login