-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
BBIQ push command & JSON testdata #50
Conversation
Support for release events is generally limited to a single date so far.
I think this is ready now, I don't want to get this stuck with the failing approval of imported editions and series. All other entity types can be imported, viewed, edited and approved. For series imports, approval fails at the SQL level only, everything else should be working:
I have no clue what is wrong here, such an insert statement works for the views of all other entity types which I could test. Only for series it fails, via both code paths and directly in Solution: Triggers for series were missing in the minimal DB, creating them solves the issue: cat sql/scripts/create_triggers.sql | docker exec -i postgres psql -U bookbrainz -d bookbrainz_min For edition imports, the approval fails during the automatic creation of an edition group (for both the "Approve" and the "Edit & Approve" action):
Solution: cat sql/migrations/2021-author-credits/up.sql | docker exec -i postgres psql -U bookbrainz -d bookbrainz_min The below is outdated already, the remaining issues have been addressed in metabrainz/bookbrainz-site#1109
I didn't have the time to fully investigate that error so far, but my test import data definitely had a valid edition group BBID, so there should have been no need to create an EG automatically.
It doesn't show up in the edition editor though, so it might have been lost at an intermediate transformation step.
But this still doesn't explain why the automatic creation fails. |
I've enhanced the author testdata with identifiers and more aliases. With both of these working fine, I think I have reached the limit of what data is currently possible to import. P.S. We should replace the numeric IDs at the parsed entity level soon, it is cumbersome to obtain them in every producer implementation. Example: Try changing the author aliases language ID from 134 to 34 and see how the real issue is hidden by the following error message:
Rather than the last(?) statement of a failing transaction, the log should show the statement that caused the failure. I only discovered the real cause by gradually removing the newly added identifiers:
|
On this topic, I just found out (or forgot and found out again) about OL publishing JSON-schema files for their dumps, which could be used to cross-reference if we are missing any data point, perhaps even could be useful for parsing and validating OL imports and give us useful error messages?
That's a pickle. I'm trying to see if it's a know issue, but apart from 10-year-old issues related to |
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.
Thanks for making useful debugging commands!
Sure beats manually entering sample data in the database :)
Yeah, I am already aware of these, I had converted them into type definitions a month ago before I focussed on other tasks. |
The BBIQ CLI got a new command which allows you to directly push the contents of a JSON file into the queue, which is useful for testing and debugging.
Especially with the upcoming entity import schema change I wanted to make the current BB importer setup more battle-proofed before I am going break everything again.
So I've produced a few files with test data which cover all currently available properties of the following entity types:
I am going to mark this PR as a draft until I have tested the remaining entity types as much as possible (but without doing changes which would have to be redone after the schema change).
The main issue which I discovered with these tools was the lack of support for annotations on imported entities. See the following PRs for all issues: