Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ B=\033[1m
# Normal
N=\033[0m

bundle = static/build/main.bundle.js
rspack = npx rspack

# NOTE: These targets are meant to be *included* in the parent app
Expand All @@ -35,7 +34,7 @@ rspack = npx rspack
.PHONY: stop status test_headless test test_report check-js-updates lint-install
.PHONY: lint lint-unix lint-githook baselayer_doc_reqs html
.PHONY: system_setup service_setup
.PHONY: $(bundle) bundle bundle-watch
.PHONY: bundle bundle-watch

help:
@python ./baselayer/tools/makefile_to_help.py $(MAKEFILE_LIST)
Expand All @@ -55,11 +54,9 @@ db_clear: ## Delete all data from the database.
db_clear: dependencies
@$(PYTHON) ./baselayer/tools/silent_monitor.py ./baselayer/tools/db_init.py -f $(FLAGS)

$(bundle): rspack.config.js package.json
bundle:
@$(rspack)

bundle: $(bundle)

bundle-watch:
$(rspack) -w

Expand Down Expand Up @@ -126,7 +123,7 @@ attach: ## Attach to terminal of running webserver; useful to, e.g., use pdb.
@echo "$(SUPERVISORCTL) fg app:app_NN"

clean:
rm -f $(bundle)
rm -rf static/build

stop: ## Stop all running services.
$(SUPERVISORCTL) stop all
Expand Down
2 changes: 1 addition & 1 deletion tools/setup_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def initialize_external_services() -> list:
plugins_path = cfg["services.paths"][-1]
os.makedirs(plugins_path, exist_ok=True)

plugins = cfg.get("services.external", {})
plugins = cfg.get("services.external") or {}
Comment thread
Theodlz marked this conversation as resolved.
external_services = []

for plugin_name, plugin_info in plugins.items():
Expand Down
7 changes: 3 additions & 4 deletions tools/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def verify_server_availability(url, timeout=180):
f"Expected status 200, got {response.status_code} for URL {url}. Retrying."
)

response = requests.get(url + "/static/build/main.bundle.js")
assert response.status_code == 200, (
"Javascript bundle not found, did packing fail?"
bundle_dir = pathlib.Path("static/build")
assert bundle_dir.exists() and any(bundle_dir.glob("main*.bundle.js")), (
"Javascript bundle not found in static/build/, did packing fail?"
)

return True # all checks passed
Expand Down Expand Up @@ -132,7 +132,6 @@ def verify_server_availability(url, timeout=180):
)

server_url = f"http://localhost:{cfg['ports.app']}"
print()
log(f"Waiting for server to appear at {server_url}...")

exit_status = (0, "OK")
Expand Down
Loading