Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@johnfrancismccann
Copy link
Contributor

Jira Ticket: PXP-9503

Although access token polling runs at the top level with asyncio, the portion of the code syncing authz information to Arborist imports the synchronous gen3authz client and does not await the gen3authz methods used. Because gen3authz's @maybe_sync decorator infers whether a method should be synchronous vs asynchronous based on whether sniffio finds an asynchronous library, the result is that when running access token polling, the Fence sync code thinks it is calling a synchronous gen3authz method while gen3authz thinks the method being called is an async function. This means that access token polling fails to sync authz information to Arborist.

Logs are in the ticket.

Bug Fixes

  • Fix @maybe_sync decorator so that it honors synchronous clients
  • Fix synchronous unit tests not to await

@github-actions
Copy link

The style in this PR agrees with black. ✔️

This formatting comment was generated automatically by a script in uc-cdis/wool.

Copy link
Contributor

@BinamB BinamB left a comment

Choose a reason for hiding this comment

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

lgtm!

@johnfrancismccann johnfrancismccann merged commit 154e3e5 into master Feb 17, 2022
@johnfrancismccann johnfrancismccann deleted the fix/honor-sync-client-in-maybe-sync branch February 17, 2022 20:47
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.

3 participants