Skip to content
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

state: Make GetOwnerTag return names.UserTag #713

Closed
wants to merge 1 commit into from

Conversation

waigani
Copy link
Contributor

@waigani waigani commented Sep 9, 2014

Update service.GetOwnerTag() to return a names.UserTag instead of a
string.

owner := s.doc.OwnerTag
if owner == "" {
// We know that if there was no owner, it was created with an early
// version of juju, and that admin was the only user.
owner = names.NewUserTag("admin").String()
owner = "admin"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return names.NewUserTag("admin")

Update service.GetOwnerTag() to return a names.UserTag instead of a
string.
@waigani
Copy link
Contributor Author

waigani commented Sep 9, 2014

PTAL

@cmars
Copy link
Contributor

cmars commented Sep 9, 2014

LGTM, pending mentor approval @fwereade

@@ -620,14 +620,18 @@ func (s *Service) addUnitOps(principalName string, asserts bson.D) (string, []tx

// SCHEMACHANGE
// TODO(mattyw) remove when schema upgrades are possible
func (s *Service) GetOwnerTag() string {
func (s *Service) GetOwnerTag() (names.UserTag, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the comment on this method

make the method return names.Tag, error

@davecheney
Copy link
Contributor

LGTM with minor comments

@waigani
Copy link
Contributor Author

waigani commented Sep 11, 2014

@howbazaar was in two minds whether to land this or remove GetOwnerTag altogether. @fwereade can you make the call please?

@dimitern
Copy link

dimitern commented Mar 5, 2015

No activity for a long time and no corresponding ReviewBoard diff. Closing.

@dimitern dimitern closed this Mar 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants