-
Notifications
You must be signed in to change notification settings - Fork 47
(PXP-8994): Populate mapping table for existing users #995
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&rd 8000 quo;, 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
(PXP-8994): Populate mapping table for existing users #995
Conversation
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
Pull Request Test Coverage Report for Build 12162
💛 - Coveralls |
fence/__init__.py
Outdated
from fence.config import config, DEFAULT_CFG_PATH | ||
from fence.settings import CONFIG_SEARCH_FOLDERS | ||
|
||
try: |
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.
what prompted this, did you run into a specific issue?
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.
the gen3config library should handle all this complexity with this call
Lines 328 to 332 in 57672f2
config.load( | |
config_path=config_path, | |
search_folders=CONFIG_SEARCH_FOLDERS, | |
file_name=file_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.
Yeah so the issue with not loading the config here was that oidc = config.get("OPENID_CONNECT", {})
in _get_issuer_to_idp
evaluated to an empty dictionary since _get_issuer_to_idp
is called when fence/models.py
is imported (which happens before app_config runs).
The if os.environ.get("FENCE_CONFIG_PATH"):
check is to handle loading test-fence-config.yaml
when the tests are being run.
Like you're saying, though, I think this can be simplified by putting:
config.load(
config_path=os.environ.get("FENCE_CONFIG_PATH"),
search_folders=CONFIG_SEARCH_FOLDERS
)
in place of the whole try/except.
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.
Gotcha, yeah I'd rather contain this logic within the gen3config library, so changing to that .load call would make me feel better
Co-authored-by: Alexander VanTol <Avantol13@users.noreply.github.com>
Jira Ticket: PXP-8994
Populate
iss_sub_pair_to_user
table usingUser
table'sid_from_idp
column. Population ofUser
table'sid_from_idp
column began with the2021.12
release, which included this related PR.New Features
iss_sub_pair_to_user
table usingUser
table'sid_from_idp
column