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

Make ID_KEY configurable (again) #862

Open
nijel opened this issue Nov 29, 2023 · 0 comments
Open

Make ID_KEY configurable (again) #862

nijel opened this issue Nov 29, 2023 · 0 comments
Labels

Comments

@nijel
Copy link
Member

nijel commented Nov 29, 2023

Expected behaviour

ID_KEY should be configurable as that is needed by at least some services.

Actual behaviour

It is currently hardcoded for each backend.

Any other comments?

Seznam backend currently allows to configure this:

def get_user_id(self, details, response):
return response.get(self.setting("ID_KEY") or self.ID_KEY)

But it really doesn't work because of:

# Normally when resuming a pipeline, request_data will be empty. We
# only need to check for a uid match if new data was provided (i.e.
# if current request specifies the ID_KEY).
if backend.ID_KEY in request_data:
id_from_partial = partial.kwargs.get("uid")
id_from_request = request_data.get(backend.ID_KEY)
if id_from_partial != id_from_request:
partial_matches_request = False

See #854 for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant