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

Update DB setup instructions for importer #49

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

kellnerd
Copy link
Contributor

Just a few documentation changes from my notes to get the importer UI working.

Pipe local SQL files into the container instead of copying them.
Without this migration, loading the page of an (imported) author failed.
@kellnerd kellnerd marked this pull request as draft July 15, 2024 15:23
@kellnerd
Copy link
Contributor Author

kellnerd commented Jul 15, 2024

I've marked this as draft until I am done with testing the importer UI because I just found another missing migration... This time it was even crashing the server:

Uncaught Exception:
bookbrainz-site  | error: SELECT 
bookbrainz-site  |                        editor_id,
bookbrainz-site  |                        service,
bookbrainz-site  |                        access_token,
bookbrainz-site  |                        refresh_token,
bookbrainz-site  |                        token_expires::text,
bookbrainz-site  |               scopes
bookbrainz-site  |               FROM bookbrainz.external_service_oauth 
bookbrainz-site  |              WHERE editor_id = 1879 
bookbrainz-site  |                AND service = 'critiquebrainz' - relation "bookbrainz.external_service_oauth" does not exist

As soon as I have tested my schema change to give imports BBIDs and combine the entity and import tables, I should probably abandon the minimal test DB and start using the full DB dump again, they should be much more reliable.

@kellnerd kellnerd marked this pull request as ready for review July 15, 2024 16:55
@kellnerd
Copy link
Contributor Author

Should be ready now that metabrainz/bookbrainz-site#1103 and metabrainz/bookbrainz-data-js#319 have been opened.

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Looks fine.
I will look into automatically generating a minimal test DB at the same time as we generate the regular DB dumps, that way we can have a ready-to-use, always up-to-date minimal DB for testing.

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Ideally we'll get rid of this mess soon and have up to date minimal DBs available somewhere

@MonkeyDo MonkeyDo merged commit 91b625e into metabrainz:master Jul 17, 2024
@kellnerd kellnerd deleted the importer-dev-setup branch July 17, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants