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

Include "Submitter" Column in Auto-Loaded Data for Local Environment #10295

Open
2 tasks
ananyakaligal opened this issue Jan 8, 2025 · 3 comments · May be fixed by #10312
Open
2 tasks

Include "Submitter" Column in Auto-Loaded Data for Local Environment #10295

ananyakaligal opened this issue Jan 8, 2025 · 3 comments · May be fixed by #10312
Assignees
Labels
Affects: Developers Good First Issue Easy issue. Good for newcomers. [managed] Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 4 An issue, but should be worked on when no other pressing work can be done. [managed] Type: Bug Something isn't working. [managed]

Comments

@ananyakaligal
Copy link
Contributor

ananyakaligal commented Jan 8, 2025

Problem

The local environment setup does not include the Submitter column in the auto-loaded data. This leads to errors when running queries or features that depend on this column, making local testing unreliable.

Reproducing the bug

Context

  • Browser (Chrome, Safari, Firefox, etc): CHrome
  • OS (Windows, Mac, etc): Linux
  • Logged in (Y/N): Y
  • Environment (prod, dev, local): Dev

Breakdown

Proposed Solution:
Add the Submitter column to the database schema that is auto-loaded during local environment setup.

Temporary Workaround:
Manually add the Submitter column to the local database schema as a workaround.
ALTER TABLE <table_name> ADD COLUMN submitter VARCHAR(<length>);

Additional Notes:

Requirements Checklist

  • Identify tables missing the submitter column
  • Add the submitter column to missing tables in the database schema

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
@ananyakaligal ananyakaligal added Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed] labels Jan 8, 2025
@jimchamp jimchamp added Priority: 4 An issue, but should be worked on when no other pressing work can be done. [managed] Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Affects: Developers and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jan 8, 2025
@jimchamp
Copy link
Collaborator

jimchamp commented Jan 8, 2025

The import_item table was recently altered to add a submitter column in production, but not in local development environments.

Databases in local instances are initially populated by running the queries in dev_db.pg_dump. To fix this issue, update the import_item DDL, adding a new text column named submitter.

To test if this has worked, stop the application, remove the openlibrary_ol-postgres volume, bring the application back up, then visit http://localhost:8080/import/batch/pending. If the page renders without error, the submitter column was added to import_item.

@jimchamp jimchamp added Good First Issue Easy issue. Good for newcomers. [managed] and removed Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] labels Jan 8, 2025
@ananyakaligal
Copy link
Contributor Author

@jimchamp can i get this assigned?

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Jan 9, 2025
@jimchamp
Copy link
Collaborator

jimchamp commented Jan 9, 2025

Go for it, @ananyakaligal.

@jimchamp jimchamp removed the Needs: Response Issues which require feedback from lead label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Developers Good First Issue Easy issue. Good for newcomers. [managed] Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 4 An issue, but should be worked on when no other pressing work can be done. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants