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

Drop ORDER BY clause from copy step when adding a limit #4382

Merged
merged 3 commits into from
May 27, 2024

Conversation

krysal
Copy link
Member

@krysal krysal commented May 24, 2024

Fixes

Fixes #4381 by @krysal

Description

As explained in the issue, we're ditching this clause here.

Testing Instructions

  1. Set the environment variable for the limit to a number lower than 5000. Eg.:
DATA_REFRESH_LIMIT=1000
  1. Start a data refresh
just api/up && just docker/es/delete-index image-init && \
just ingestion_server/ingest-upstream
  1. Wait for the process to finish; locally, it is very quick (less than a minute), and promote the table.
just ingestion_server/promote
  1. Verify the number of images is correct with just api/pgcli and
SELECT COUNT(*) FROM image;

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (just catalog/generate-docs for catalog
    PRs) or the media properties generator (just catalog/generate-docs media-props
    for the catalog or just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@krysal krysal requested a review from a team as a code owner May 24, 2024 18:05
@krysal krysal requested review from obulat and sarayourfriend May 24, 2024 18:05
@github-actions github-actions bot added the 🧱 stack: ingestion server Related to the ingestion/data refresh server label May 24, 2024
@openverse-bot openverse-bot added 🟧 priority: high Stalls work on the project or its dependents 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels May 24, 2024
Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

The code looks right, and thanks for the testing steps! I was able to verify it works locally, LGTM 🚀

Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

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

The changeset looks fine so I don't want to block. LGTM! I am having an issue locally that must be unrelated. I am unable to get anything other than 5000 from SELECT COUNT(*) from image;. Is that confirmed to be working locally for you @krysal and @AetherUnbound?

@krysal
Copy link
Member Author

krysal commented May 24, 2024

@zackkrida It works for me, where did you set DATA_REFRESH_LIMIT? I forgot to add that it should go in the ingestion_server/.env file.

@krysal krysal mentioned this pull request May 24, 2024
@krysal krysal merged commit b4ab20c into main May 27, 2024
44 checks passed
@krysal krysal deleted the fix/data_refresh_limit branch May 27, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: ingestion server Related to the ingestion/data refresh server
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Drop ORDER BY clause from copy step of image data refresh when adding a limit
4 participants