-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add upsert option to upload/update #199
Conversation
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 .pre-commit-config.yaml
file has been modified but the formatting of this shouldn't have changed. Also did you use the make build_sync
command to create the changes in the _sync/
directory? if not this is how you should do it and not make manual edits to the _sync/
directory.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
- Coverage 84.36% 83.85% -0.52%
==========================================
Files 12 12
Lines 467 477 +10
==========================================
+ Hits 394 400 +6
- Misses 73 77 +4 ☔ View full report in Codecov by Sentry. |
Okay, I updated my editor to not autosave on yaml (that was the problem there) and ran make build_sync to copy over the changes. I uploaded, but didn't squash. Let me know if we need to squash as well for this type of work. Let me know any additional feedback and if there is another issue to go after. |
@clefelhocz2 thanks for this, I'm going to ask for one more update, can you change the |
Thanks. Will start on updating the PR today and hopefully have it over soon. I agree with the assessment. When I looked at the library I wondered the same thing, but was also trying to follow guidance. It looks like something needs to change either on the backend or documentation based on what I saw (both in library and backend code if I'm looking in the right place). |
@silentworks I was able to update per your guidance. It looks different than the javascript code, but that's because the javascript code actually works differently. The options are copied into headers based on different filetypes, duplex, etc. It isn't a great implementation as adding a new default to DEFAULT_FILE_OPTIONS isn't going to add it to the headers based on my reading. Let me know any feedback and/or new issue I could tackle. I was looking at supabase/auth-py#320, but it looks involved. |
@clefelhocz2 thanks for this PR. The change will be out in the next release of the library. In regards to the other issue, lets move the conversation to the issue itself. It is involved but I can guide you through it a bit. |
What kind of change does this PR introduce?
This is to address issue supabase/supabase-py#693. Documentation said we could use the upsert option, but user would have to specify x-upsert.
I also updated pre-commit hooks as the version of autoflake is old enough to still require distutils which no longer exists in python 3.12.
What is the current behavior?
Old behavior code:
would not pass along the upsert option to server side.
New behavior:
Is passed along as x-upsert header option.
Please link any relevant issues here.
supabase/supabase-py#693
What is the new behavior?
See above
Feel free to include screenshots if it includes visual changes.
Additional context
This addresses the client side operation.
Add any other context or screenshots.