Skip to content

Make bind-mounted edx-platform setup idempotent on tutor dev launch #1554

Open

Description

@ahmed-arb

When edx-platform is bind-mounted, jobs/init/mounted-directories.sh runs on every tutor dev launch / do init:

pip install -e .
npm clean-install
npm run build-dev

npm clean-install deletes and reinstalls node_modules, and build-dev recompiles all assets, even when nothing in package-lock.json or the frontend sources changed since the last launch. This takes several minutes each time and is the main cost of relaunching a dev environment for core developers.

Proposal: make these steps idempotent by caching a fingerprint, e.g.

  • store sha256(package-lock.json) next to node_modules and skip npm clean-install when it matches;
  • skip build-dev when webpack-stats.json exists and is newer than the asset sources, or store a hash of the relevant inputs;
  • skip pip install -e . when Open_edX.egg-info exists and setup.py/pyproject.toml hasn't changed.

A --force path (or just deleting the fingerprint file) would keep the current behaviour available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AIIssue drafted with AI assistance

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions