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

fix MPP-3805: get FxA SocialApp from DB at startup #4634

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

groovecoder
Copy link
Member

@groovecoder groovecoder commented Apr 22, 2024

This PR fixes #MPP-3805.

How to test:

  1. Run pytest
    • It should pass
  • l10n changes have been submitted to the l10n repository, if any.
  • I've added a unit test to test for potential regressions of this bug.
  • I've added or updated relevant docs in the docs/ directory.
  • All UI revisions follow the coding standards, and use Protocol tokens where applicable (see /frontend/src/styles/tokens.scss).
  • Commits in this PR are minimal and have descriptive commit messages.

@@ -93,3 +94,9 @@ def fxa_verifying_keys(self) -> list[dict[str, Any]]:
keys: list[dict[str, Any]] = resp.json()["keys"]
return keys
return []

@cached_property
def fxa_social_app(self) -> Any:
Copy link
Member Author

Choose a reason for hiding this comment

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

note: I couldn't quite figure out how to annotate this with -> SocialApp because Django kept complaining that I couldn't load the SocialApp model until the app registry was full.

Copy link
Member

Choose a reason for hiding this comment

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

Please take a look at https://mypy.readthedocs.io/en/stable/runtime_troubles.html#annotation-issues-at-runtime and pick one of those solutions (that isn't # type)

Copy link
Member Author

Choose a reason for hiding this comment

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

How about 06661e9 ? (I tried from __future__ import annotations first, but it didn't work. 😢

Copy link
Member

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Thanks @groovecoder, looks good to me.

@groovecoder groovecoder added this pull request to the merge queue Apr 23, 2024
Merged via the queue into main with commit 3358c86 Apr 23, 2024
28 checks passed
@groovecoder groovecoder deleted the get-fxa-socialapp-from-config branch April 23, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants