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

Add catalog/init just command #2915

Merged
merged 3 commits into from
Aug 31, 2023
Merged

Add catalog/init just command #2915

merged 3 commits into from
Aug 31, 2023

Conversation

krysal
Copy link
Member

@krysal krysal commented Aug 29, 2023

Fixes

An inconvenience of having to turn up the whole stack for testing catalog-only changes.

Description

This PR adapts the load_sample_data.sh script to accept an option for only loading the upstream DB data. Luckily the script was modular enough to make this a pretty easy change. Kudos to @dhruvkb here! This way the API command can continue working as usual.

Testing Instructions

Run the new command and try querying the upstream DB to see it's filled. This process returns zero results in main.

just down -v && just  catalog/init
# or
just catalog/recreate

# then verify with...
just catalog/pgcli
SELECT COUNT(*) FROM image;
-- Result must be:
+-------+
| count |
|-------|
| 5000  |
+-------+
SELECT 1

Also, confirms the just recreate and just api/recreate commands continue working as expected.

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.
  • [N/A] 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.
  • [n/a] I ran the DAG documentation generator (if 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 added 🟩 priority: low Low priority and doesn't need to be rushed 🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: catalog Related to the catalog and Airflow DAGs labels Aug 29, 2023
@krysal krysal requested review from a team as code owners August 29, 2023 16:35
@github-actions github-actions bot added 🧱 stack: api Related to the Django API 🧱 stack: ingestion server Related to the ingestion/data refresh server labels Aug 29, 2023
@krysal krysal mentioned this pull request Aug 29, 2023
6 tasks
Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

LGTM, same as before. I have one suggestion about waiting for the containers to be up but I won't block on it.

catalog/justfile Show resolved Hide resolved
@krysal krysal removed 🧱 stack: api Related to the Django API 🧱 stack: ingestion server Related to the ingestion/data refresh server labels Aug 31, 2023
@krysal krysal force-pushed the add/catalog-init-cmd-v2 branch from 6cecc0c to e6de8cd Compare August 31, 2023 17:13
@github-actions github-actions bot added 🧱 stack: api Related to the Django API 🧱 stack: ingestion server Related to the ingestion/data refresh server labels Aug 31, 2023
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.

LGTM and works with just catalog/init on its own!

@krysal krysal merged commit 4c6c41c into main Aug 31, 2023
@krysal krysal deleted the add/catalog-init-cmd-v2 branch August 31, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: api Related to the Django API 🧱 stack: catalog Related to the catalog and Airflow DAGs 🧱 stack: ingestion server Related to the ingestion/data refresh server
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants