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

Pass DataStore Upsert Original pSQL Error Messages #188

Merged
merged 10 commits into from
Feb 10, 2025

Conversation

JVickery-TBS
Copy link

feat(logic): ds upsert info;

  • Include the original psql error message and code in the upsert errors.

This will allow Recombinant to parse the FK constraint error messages, without showing the pSQL error to the user still.

- Include the original psql error message and code in the upsert errors.
- Added change log file.
- Continued FK maps in datastore_info.
Copy link
Member

@wardi wardi left a comment

Choose a reason for hiding this comment

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

instead of maintaining this patch on our fork can we parse the FK errors here and return them in a way that would be useful for all API users? That kind of a change could go upstream eventually

@JVickery-TBS
Copy link
Author

@wardi like the REGEX parsing that I have done in Recombinant? Move it into the ckanext-datastore postgres.py ??

- Finalized foreign constraint info for datastore_info.
@JVickery-TBS JVickery-TBS requested a review from wardi January 31, 2025 19:58
@JVickery-TBS
Copy link
Author

@wardi I threw the Foreign Key info for datastore_info into this one too if your able to review that here as well??

- Query for constraint usage.
- Parse psql errors for foreign constraints.
- Use psql literal strings for ds info fks.
@JVickery-TBS
Copy link
Author

@wardi okay! should be handling the foreign constraint errors in here now. Will parse them and give an error message along with a dict of the parsed values (ref keys, ref values, ref table name).

@JVickery-TBS JVickery-TBS requested a review from wardi February 4, 2025 17:36
- Return list of strings.
JVickery-TBS and others added 3 commits February 7, 2025 11:22
- Fake gettext for babel extractions.
- Added comments for the parial string formatter.
@JVickery-TBS JVickery-TBS merged commit 55365e1 into canada-v2.10 Feb 10, 2025
@JVickery-TBS JVickery-TBS deleted the feature/ds-upsert-error-info branch February 10, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants