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

POST /data/config on OPAL client ignore the field save_method. #301

Closed
loan75 opened this issue Sep 23, 2022 · 3 comments
Closed

POST /data/config on OPAL client ignore the field save_method. #301

loan75 opened this issue Sep 23, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@loan75
Copy link
Contributor

loan75 commented Sep 23, 2022

Describe the bug
Currently the field save_method in the OPAL server API 'POST /data/config' is unused.
No matter what we set, it will always perform the save_method PUT.
https://github.com/permitio/opal/blob/master/packages/opal-client/opal_client/data/updater.py#L396

Expected behavior
The field same_method should be used to determined how OPAL gonna push the data on OPA.
At least, i want to implement the PATCH method. In fact, it's already in the code, we just need to use it in the updater (select the method based on the field save_method received).
https://github.com/permitio/opal/blob/master/packages/opal-client/opal_client/policy_store/opa_client.py#L493

OPAL version

  • Version: latest
@loan75 loan75 added the bug Something isn't working label Sep 23, 2022
@asafc
Copy link
Contributor

asafc commented Oct 3, 2022

Hi @loan75, welcome to our community!

This feature was not yet implemented correctly, i know @orishavit has done some work in this direction, but this is still WIP.

We will be sure to prioritize this after the holiday.
If you can manage it, we welcome code contributions :)

@OancaAndrei
Copy link

Hi @asafc! I've stumbled upon this issue while experimenting with PATCH as save_method. Am I to understand that this issue is now resolved thanks to #483?

@orweis
Copy link
Contributor

orweis commented Sep 5, 2023

Hi @asafc! I've stumbled upon this issue while experimenting with PATCH as save_method. Am I to understand that this issue is now resolved thanks to #483?

Yes you understand correctly -this issue seems to be a duplicate and is closed by #483

@orweis orweis closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants