Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Update all usages of `just` recipes

Dhruv Bhanushalif2c152892356
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index 8b7f61a4a..816583b57 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -121,7 +121,7 @@ jobs:
docker load --input /tmp/ingestion_server/ingestion_server.tar
- name: collectstatic
- run: just collectstatic
+ run: just api/collectstatic
env:
STATIC_ROOT: ./static
DC_USER: root
@@ -182,7 +182,7 @@ jobs:
run: |
pip install -U pip
pip install pipenv
- just _ing-install
+ just ingestion_server/install
- name: Download image `ingestion_server`
uses: actions/download-artifact@v3
@@ -193,7 +193,7 @@ jobs:
run: docker load --input /tmp/ingestion_server.tar
- name: Run ingestion-server tests
- run: just ing-testlocal
+ run: just ingestion_server/test-local
- name: Upload ingestion test logs
if: always()
@@ -235,7 +235,7 @@ jobs:
run: just init
- name: Run API tests
- run: just api-test
+ run: just api/test
- name: Print API test logs
if: always()
@@ -275,7 +275,7 @@ jobs:
docker load --input /tmp/ingestion_server/ingestion_server.tar
- name: Test ReDoc site
- run: just api-doctest
+ run: just api/doc-test
validate-openapi-spec:
name: Validate Open API spec
@@ -301,7 +301,7 @@ jobs:
docker load --input /tmp/ingestion_server/ingestion_server.tar
- name: Run check
- run: just dj validateopenapischema
+ run: just api/dj validateopenapischema
env:
DC_USER: root
@@ -337,7 +337,7 @@ jobs:
docker load --input /tmp/ingestion_server/ingestion_server.tar
- name: Run check
- run: just dj check
+ run: just api/dj check
check-migrations:
name: Check for uncommited Django migrations
@@ -364,7 +364,7 @@ jobs:
docker load --input /tmp/ingestion_server/ingestion_server.tar
- name: Run makemigrations
- run: just dj makemigrations --check --noinput --merge
+ run: just api/dj makemigrations --check --noinput --merge
push:
name: Publish Docker images
@@ -456,7 +456,7 @@ jobs:
- name: Make developer docs
run: |
- just sphinx-make
+ just api/sphinx-make
sudo chown "$USER:$USER" -R ./api
mv ./api/build/html /tmp/gh-pages
env:
@@ -533,7 +533,7 @@ jobs:
- name: Build docs
run: |
- just sphinx-make
+ just api/sphinx-make
sudo chown "$USER:$USER" -R ./api
mv ./api/build/html /tmp/preview
env:
diff --git a/ingestion_server/test/integration_test.py b/ingestion_server/test/integration_test.py
index e270ceda1..26a1e93b9 100644
--- a/ingestion_server/test/integration_test.py
+++ b/ingestion_server/test/integration_test.py
@@ -126,7 +126,8 @@ class TestIngestion(unittest.TestCase):
logging.info("Waiting for ES to be ready...")
port = service_ports["es"]
- cls._wait(["just", "wait-for-es", f"localhost:{port}"])
+ # Point to the root `justfile` to avoid automatic resolution to the nearest.
+ cls._wait(["just", "../../wait-for-es", f"localhost:{port}"])
logging.info("Connected to ES")
@classmethod
@@ -135,7 +136,8 @@ class TestIngestion(unittest.TestCase):
logging.info("Waiting for ingestion-server to be ready...")
port = service_ports["ingestion_server"]
- cls._wait(["just", "wait-for-ing", f"localhost:{port}"])
+ # Automatically resolves to the nearest `justfile`.
+ cls._wait(["just", "wait", f"localhost:{port}"])
logging.info("Connected to ingestion-server")
@classmethod
diff --git a/load_sample_data.sh b/load_sample_data.sh
index 9e50aee2d..2f46e023b 100755
--- a/load_sample_data.sh
+++ b/load_sample_data.sh
@@ -96,22 +96,22 @@ docker-compose exec -T "$UPSTREAM_DB_SERVICE_NAME" /bin/bash -c "psql -U deploy
EOF"
# Load search quality assurance data.
-just load-test-data "audio"
+just ingestion_server/load-test-data "audio"
sleep 2
-just load-test-data "image"
+just ingestion_server/load-test-data "image"
sleep 2
# Ingest and index the data
-just ingest-upstream "audio" "init"
+just ingestion_server/ingest-upstream "audio" "init"
just wait-for-index "audio-init"
-just promote "audio" "init" "audio"
+just ingestion_server/promote "audio" "init" "audio"
just wait-for-index "audio"
# Image ingestion is flaky; but usually works on the next attempt
set +e
while true; do
- just ingest-upstream "image" "init"
+ just ingestion_server/ingest-upstream "image" "init"
if just wait-for-index "image-init"
then
break
@@ -120,7 +120,7 @@ while true; do
done
set -e
-just promote "image" "init" "image"
+just ingestion_server/promote "image" "init" "image"
just wait-for-index "image"
# Clear source cache since it's out of date after data has been loaded