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

Link new IA accounts to existing, previously linked OL account #8980

Merged

Conversation

jimchamp
Copy link
Collaborator

@jimchamp jimchamp commented Mar 27, 2024

Closes #8696

Re-establishes linkage between existing Open Library account and an IA account that has been deleted but later recreated using the same email address.

Publishes an "IA <-> OL itemname mismatch" event to sentry, which includes the old and new itemnames in the "Additional Details" section (as ol_itemname and ia_itemname, respectively).

Technical

logger.error calls automatically publish events to Sentry (details here). Such event, however, do not contain the entire stacktrace. Additional data that is included in the extra dict will appear in the event's "Additional Data" section.

Important

I've only included the old and new itemname in these Sentry events. Will this be enough to determine if we're only entering the if ol_account and ol_account.itemname code block when 2 existing accounts become unlinked?

An "IA <-> OL itemname mismatch" Sentry event can be found here.
The extra data can be found in this section.

Testing

I've tested this by doing the following:

  1. Creating a new IA account with Google Sign-in.
  2. Logging into OL using Google Sign-in.
  3. Deleting the account on IA.
  4. Creating a new IA account with Google Sign-in, using the same Google account that was used in step 1.
  5. Logging into OL again using Google Sign-in.

On success, I was redirected to the My Books page.
When this fails, the login page is reloaded without an error message.

Screenshot

Stakeholders

@mekarpeles
@seabelis

@jimchamp jimchamp force-pushed the 8696/bug/fix-acct-linkage-issue branch from 5a570f5 to 49c1963 Compare March 29, 2024 22:54
@jimchamp jimchamp force-pushed the 8696/bug/fix-acct-linkage-issue branch from 8d4fdd5 to 0143094 Compare March 29, 2024 23:02
@jimchamp jimchamp force-pushed the 8696/bug/fix-acct-linkage-issue branch from 7aab662 to 0fa9f7a Compare March 29, 2024 23:28
@jimchamp jimchamp added the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Mar 29, 2024
@jimchamp jimchamp marked this pull request as ready for review March 29, 2024 23:52
@jimchamp jimchamp changed the title [WIP] Link new IA accounts to existing OL account Link new IA accounts to existing OL account Mar 29, 2024
@jimchamp jimchamp changed the title Link new IA accounts to existing OL account Link new IA accounts to existing, previously linked OL account Mar 29, 2024
@jimchamp
Copy link
Collaborator Author

Squash on merge.

@mekarpeles mekarpeles self-assigned this Apr 1, 2024
@mekarpeles mekarpeles added the Priority: 2 Important, as time permits. [managed] label Apr 1, 2024
@jimchamp
Copy link
Collaborator Author

jimchamp commented Apr 2, 2024

No error message is displayed when/if Google sign-in fails. In order to debug, removing this branch from testing for now.

@jimchamp jimchamp removed the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Apr 3, 2024
Copy link
Member

@mekarpeles mekarpeles left a comment

Choose a reason for hiding this comment

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

lgtm

@mekarpeles mekarpeles merged commit b69f4b1 into internetarchive:master Apr 4, 2024
3 checks passed
This was referenced Apr 10, 2024
Achorn pushed a commit to Achorn/openlibrary that referenced this pull request Apr 12, 2024
…netarchive#8980)

* Link new IA accounts to existing OL account
* Log account linkage event in Sentry
* Update linkage comment strings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mek <michael.karpeles@gmail.com>
@jimchamp jimchamp deleted the 8696/bug/fix-acct-linkage-issue branch April 24, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to link an existing account silently fails
2 participants