Repository navigation
fix: deployment script and test tooling bugs found in docs audit - #10264
Conversation
- swarm.sh: the action prompt only accepted 1-6, so "7) Exit" was rejected as an invalid selection - CLI docker-compose.yml: GUNICORN_WORKERS was hardcoded to 1 and AUTHENTICATION_RATE_LIMIT was never passed to the API, so both plane.env settings had no effect; pass them through with the same defaults. Drop the DOCKER_PLATFORM comment, which nothing reads - apps/api/run_tests.sh exec'd tests/run_tests.sh, which never existed; run run_tests.py through uv from apps/api instead - conftest_external.py fixtures were never loaded by pytest; import mock_redis and mock_celery into conftest.py and drop mock_elasticsearch (Elasticsearch is not a dependency). Add a test that both fixtures work
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
* docs: verify and refresh repo documentation against the code Audit every Markdown doc in the repo against the current code and config and fix what had drifted: - README, CONTRIBUTING, AGENTS, SECURITY: versions, setup steps, PR flow, i18n structure, private vulnerability reporting, Forum instead of GitHub Discussions, broken links - linting, copyright check, Copilot instructions: match oxlint/oxfmt config, the CI copyright check and the repo's TS settings - apps/api docs: test runner, fixtures, routes, openapi and exporters module contents; mark the Django 5.2 plan as done - deployments: CLI menu/backup/restore/env vars, AIO services, secrets, build and env precedence, Helm install steps - packages: decorators, logger, editor, codemods and tailwind-config docs rewritten from the real exports and tokens; skill docs updated * docs(api): describe mock_redis/mock_celery fixtures registered in #10264
Description
Fixes four bugs found while auditing the repo docs (docs PR: #10263):
deployments/swarm/community/swarm.shvalidated the action with^[1-6]$, so choosing7) Exitprinted "invalid selection". The regex now accepts 1-7.plane.envsettings had no effect. Indeployments/cli/community/docker-compose.yml:GUNICORN_WORKERSwas hardcoded to1.AUTHENTICATION_RATE_LIMIT, whichplane/authentication/rate_limit.pyreads for the sign-in/sign-up throttle, was never passed to the containers.1,10/minute), so existing installs behave the same unless they set the variables.DOCKER_PLATFORMhint fromvariables.env; nothing reads it.plane.env, so the fix covers it too.apps/api/run_tests.shwas broken. It exec'dtests/run_tests.sh, which has never existed in the repo's history. It nowcds toapps/apiand runsuv run python run_tests.py "$@".uv runsyncs inexactly, so it is safe inside the dev/test images.conftest_external.pyis not aconftest.py, so pytest never sawmock_redis,mock_elasticsearchormock_celery, even though the test docs advertise them.mock_redisandmock_celeryare now imported intoconftest.py, the same way it already importsdjango_db_setup.mock_elasticsearchis removed: Elasticsearch is not a dependency, so the fixture would fail whenever it was used.test_external_fixtures.pycovers both remaining fixtures.Type of Change
Screenshots and Media (if applicable)
Test Scenarios
pytest plane/tests/unit/test_external_fixtures.py(2 passed),pytest --collect-only(1563 collected, no errors),pytest -m unit(581 passed).docker compose -f deployments/cli/community/docker-compose.yml --env-file <plane.env with GUNICORN_WORKERS=3, AUTHENTICATION_RATE_LIMIT=20/minute> configrenders those values on the app services; without them it renders the defaults1and10/minute.apps/api/run_tests.sh --help, run from another directory, prints therun_tests.pyusage../setup.shfromswarm.shand choose7; the script now exits instead of re-prompting.References
Generated with Claude Code
Summary by CodeRabbit