opal icon indicating copy to clipboard operation
opal copied to clipboard

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

Open loan75 opened this issue 1 year ago • 1 comments

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 avatar Sep 23 '22 13:09 loan75

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 :)

asafc avatar Oct 03 '22 20:10 asafc