Skip to content

chore: clean up test_root/data/ and ignore generated artifacts#38805

Open
feanil wants to merge 1 commit into
masterfrom
feanil/gitignore-test-course-locator-dirs
Open

chore: clean up test_root/data/ and ignore generated artifacts#38805
feanil wants to merge 1 commit into
masterfrom
feanil/gitignore-test-course-locator-dirs

Conversation

@feanil

@feanil feanil commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

test_root/data/ is settings.GITHUB_REPO_ROOT in test settings, so course-import code (cms/djangoapps/contentstore/.../tasks.py::import_olx) writes per-course subdirectories there named urlsafe_b64encode(repr(course_key)) whenever an import test runs. Nothing cleans them up, and at some point output from one of those test runs got accidentally checked in (in c1b701309b — an unrelated 2023 video-editor feature PR), which made it hard to fully gitignore the rest of the generated artifacts that land there.

This PR:

  • Deletes the orphan files (test_root/data/Q291.../good.tar.gz × 2 + the now-redundant test_root/data/.gitkeep). The import tests build their own good.tar.gz in a tempfile.mkdtemp() at setup time and don't reference any path under test_root/data/, so the orphans aren't used.
  • Switches the directory to allow-list mode in .gitignore: ignore everything in test_root/data/ by default and explicitly re-include video/ (the fixture set we want to keep). New fixture additions need an extra ! line.

At some point output from a test run got accidentally checked into
test_root/data/, which made it hard to fully gitignore the other
test-run artifacts that land there. Delete the orphan files and
switch the directory to allow-list mode: ignore everything by
default and re-include the video/ fixtures we want to keep on
purpose.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@feanil feanil marked this pull request as ready for review June 25, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants