launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #00339
Re: EmailAddressAlreadyTaken: account and person split
On August 11, 2009, Danilo Šegan wrote:
> У пон, 10. 08 2009. у 16:56 -0300, Christian Robottom Reis пише:
> > On Mon, Aug 10, 2009 at 06:29:43PM +0200, Danilo Šegan wrote:
> > > I've just noticed a problem in our person creation code:
> > >
> > > https://bugs.edge.launchpad.net/rosetta/+bug/411514
> > >
> > > We are trying to create a Person record to attribute translations to,
> > > however, since account for the email already exists,
> > > createPersonAndEmail fails with EmailAddressAlreadyTaken exception.
> >
> > Won't this happen in a wide range of situations -- essentially anywhere
> > where we are attempting to create Persons lazily where there are
> > existing Accounts?
>
> It will, and we've already seen it happen with soyuz. I can imagine it
> happening with bug and code imports as well (if code imports credit
> revision authors for anything by their email addresses).
>
> > Uhm.. I think I understand -- essentially because Rosetta wants to
> > credit a translation to a Person, and in this case we need to create one
> > and match it with an Account that already exists. But this is a curious
> > situation to me:
> >
> > - The Account itself has already been created, so it should already
> > have its own creation rationale, right?
>
> That's right.
>
> > - Why does recording the Person's creation rationale matter? Or is
> > the issue more that if there is a Person record then we assume
> > that the person uses Launchpad?
>
> It's actually the opposite (I misunderstood it myself): entire Launchpad
> uses Person records to deal with any attribution. If there is a Person
> record *and* an attached Account, then that person uses Launchpad.
>
> Person records are created for different reasons from why Accounts are
> created. I.e. Person record can be created due to:
> - account registration
> - build import
> - po file import
> - bug import
> ...
>
> Account record could be created because of:
> - shipit registration
> - landscape registration
> - launchpad registration
> ...
>
> The problem is that we haven't had this split from the beginning, so
> many of the rationales are actually overlapping (they've been copied
> from Person records to Accounts, I guess). And what we need right now
> is a Person record which has an appropriate creation rationale, and an
> Account with a creation rationale which is not 'launchpad registration',
> and we want that Person/Account combo not to be treated as
> 'uses_launchpad'.
>
> What's more, this might even not need to be a DB field, if we can figure
> out how would a transition from not using LP to using LP work, and if we
> can figure out which of the existing AccountCreationRationales indicates
> that a person has 'registered in LP'.
>
Again, why do we care? Is really important to know where the users created
their account?
The account has a creation rationale and so does the person record.
But in the end, I think the real indicator if somebody is using Launchpad or
not is whether they have karma or not.
--
Francis J. Lacoste
francis.lacoste@xxxxxxxxxxxxx
Attachment:
signature.asc
Description: This is a digitally signed message part.
References