Skip to content

chore: Eliminate devstack integration#104

Merged
pwnage101 merged 1 commit intomainfrom
pwnage101/sever-from-devstack
Apr 8, 2026
Merged

chore: Eliminate devstack integration#104
pwnage101 merged 1 commit intomainfrom
pwnage101/sever-from-devstack

Conversation

@pwnage101
Copy link
Copy Markdown
Member

Note: This is a continuation of something I started in edx-enterprise: openedx/edx-enterprise#2538 but this is the first IDA to sever from devstack.


Transition away from the "remote devstack" model where IDAs implemented their own devstack integration. This is no longer necessary because all IDAs should now be directly integrated with devstack by adding make targets, provision scripts, and docker-compose services DIRECTLY within edx/devstack.

  • Overhaul docker-compose.yml to completely change the purpose of the app container to be exclusively for running tests.
  • Update a bunch of other files to reflect the new purpose of the testing-only app container.

Doing this first in enterprise-access to serve as a model we can test and iron out before exporting to the rest of enterprise IDAs.

@pwnage101 pwnage101 requested a review from a team as a code owner March 17, 2026 01:59
Copilot AI review requested due to automatic review settings March 17, 2026 01:59
@pwnage101 pwnage101 requested review from a team as code owners March 17, 2026 01:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the repo’s legacy “remote devstack” integration and reorients local Docker usage to a lightweight, test-only container, with full runtime (app/worker/DB/etc.) now expected to be managed directly by the central devstack repository.

Changes:

  • Deletes the repo-specific devstack provisioning script and removes/renames related Makefile targets.
  • Replaces the existing multi-service docker-compose.yml with a single, idle “test runner” container configured for enterprise_access.settings.test.
  • Updates project and agent documentation to reflect the new devstack-vs-local-tests split and new Docker usage patterns.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/README.md Updates troubleshooting guidance to assume the API server is run via devstack.
provision-enterprise-access.sh Removes repo-local provisioning logic (now owned by devstack).
docker-compose.yml Simplifies to a single test-only container (no DB/worker/etc.).
README.rst Reframes setup docs: devstack for full runtime; local compose for tests/quality only.
Makefile Removes old devstack integration targets; adds simplified dev.*/app-* docker-compose shortcuts.
CLAUDE.md Updates Docker development notes to match the new model.
.ralph/PROMPT.md Updates Docker development notes to match the new model.
.claude/skills/unit-tests/SKILL.md Updates container interaction commands to docker compose patterns and adds troubleshooting.
.claude/skills/quality-tests/SKILL.md Updates container interaction commands to docker compose patterns and adds troubleshooting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.28%. Comparing base (7e75ca8) to head (1a6f7e0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   84.28%   84.28%           
=======================================
  Files         144      144           
  Lines       12209    12209           
  Branches     1162     1162           
=======================================
  Hits        10290    10290           
  Misses       1598     1598           
  Partials      321      321           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from 28ec0bb to 74759b1 Compare March 17, 2026 02:18
Copilot AI review requested due to automatic review settings March 17, 2026 02:20
@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from 74759b1 to fd75d9e Compare March 17, 2026 02:20
$ make app-shell
# python ./manage.py migrate

Setting up openedx-events
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole section should be safe to remove because last year I spent a bunch of time ensuring edx/devstack sufficiently launches enterprise-specific consumers automatically.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes enterprise-access’s repo-local “remote devstack” integration in favor of devstack-managed services, and repurposes this repo’s docker-compose.yml to provide only a lightweight container for running tests/quality checks locally.

Changes:

  • Simplify docker-compose.yml to a single long-running app container intended for executing tests/quality commands only.
  • Remove the repo-local provisioning script and devstack-oriented Makefile targets; replace them with docker-compose v2 (docker compose) shortcuts for test/quality workflows.
  • Update docs/prompts/skills to reflect devstack as the source of truth for running the full service and to use docker compose exec ... for local test execution.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/README.md Updates troubleshooting guidance to assume the API runs via devstack.
provision-enterprise-access.sh Deletes legacy provisioning workflow now expected to live in devstack.
docs/customer-billing/billing-management-api.rst Updates test execution command to use docker compose exec.
docker-compose.yml Replaces multi-service devstack-style compose with a single test-only container.
README.rst Reframes setup instructions: full runtime via devstack; local compose only for tests/quality.
Makefile Removes devstack lifecycle targets; adds compose v2 shortcuts for local test container usage.
CLAUDE.md Updates “Docker Development” notes to reflect devstack ownership of full runtime.
.ralph/PROMPT.md Same as above for Ralph prompt guidance.
.claude/skills/unit-tests/SKILL.md Updates container discovery and test commands to docker compose + adds troubleshooting.
.claude/skills/quality-tests/SKILL.md Updates quality commands to docker compose + adds troubleshooting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from fd75d9e to 57cb236 Compare March 17, 2026 02:26
Copilot AI review requested due to automatic review settings March 17, 2026 18:05
@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from 57cb236 to ce10452 Compare March 17, 2026 18:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes this IDA’s “remote devstack” integration and reorients the repo’s Docker/Makefile workflow to support only a lightweight local test/quality container, with full runtime orchestration handled directly by the central devstack repository.

Changes:

  • Replace the repo’s docker-compose.yml with a single “test-only” app container (no DB/worker/etc.).
  • Remove local devstack provisioning/start targets and update Makefile shortcuts to use docker compose.
  • Update docs/skill prompts to reflect the new devstack-first runtime model and the test-container workflow.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/README.md Updates troubleshooting guidance to reference devstack instead of repo-local make dev.up.
provision-enterprise-access.sh Removes repo-local provisioning script for devstack integration.
docs/customer-billing/billing-management-api.rst Updates test execution instructions to use docker compose exec app.
docker-compose.yml Simplifies compose to a single, test-only app container.
README.rst Updates setup instructions to point runtime usage to devstack and local usage to test/quality container.
Makefile Removes old devstack integration targets and adds docker compose-based test-container shortcuts + aliases.
CLAUDE.md Updates Docker development notes to reflect devstack-first runtime model.
.ralph/PROMPT.md Updates Docker development notes to reflect devstack-first runtime model.
.claude/skills/unit-tests/SKILL.md Updates test-running commands to use docker compose and adds troubleshooting notes.
.claude/skills/quality-tests/SKILL.md Updates quality-running commands to use docker compose and adds troubleshooting notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from ce10452 to e890857 Compare March 17, 2026 18:14
Copilot AI review requested due to automatic review settings March 17, 2026 18:16
@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from e890857 to 2c41b84 Compare March 17, 2026 18:16
@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from 2c41b84 to f610b7e Compare March 17, 2026 18:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the “devstack integration removal” for enterprise-access by shifting local Docker usage in this repo to test/quality execution only, and pointing full runtime development (app/worker/DB/etc.) to be managed directly by the central devstack repository.

Changes:

  • Simplifies docker-compose.yml to a single long-lived app container intended only for running tests/quality commands.
  • Reworks Makefile Docker targets to use docker compose and to manage only the test/quality container lifecycle.
  • Updates documentation and internal “agent/skill” guidance to reflect the new devstack-first runtime model and the new test-container commands.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/README.md Updates troubleshooting guidance to assume the API server comes from devstack rather than repo-local compose.
provision-enterprise-access.sh Removes legacy repo-local provisioning script for remote-devstack model.
docs/customer-billing/billing-management-api.rst Updates test execution command to use docker compose exec app rather than docker exec with the old container name.
docker-compose.yml Replaces the full multi-service devstack-style compose setup with a minimal test-only container.
README.rst Reframes setup docs around devstack for full runtime and local compose for tests/quality only.
Makefile Removes devstack-integration targets and adds docker compose targets for managing the test/quality container.
CLAUDE.md Updates Docker development notes to match the new devstack-first model.
.ralph/PROMPT.md Updates Docker development notes to match the new devstack-first model.
.claude/skills/unit-tests/SKILL.md Updates commands to use docker compose, and adds colima troubleshooting guidance.
.claude/skills/quality-tests/SKILL.md Updates commands to use docker compose, and adds colima troubleshooting guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from f610b7e to ebd7514 Compare March 19, 2026 06:25
@pwnage101
Copy link
Copy Markdown
Member Author

Created this runbook to assist with migration: https://2u-internal.atlassian.net/wiki/x/J4CXy

Comment on lines -36 to -40
[pytest]
DJANGO_SETTINGS_MODULE = enterprise_access.settings.test
addopts = --cov enterprise_access --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements site-packages scripts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why get rid of this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's superseded by pytest.ini for better consistency with the other repositories. Not necessarily the best solution, but seemed logical given pytest.local.ini is sibling so it's easy to find both.

Transition away from the "remote devstack" model where IDAs implemented
their own devstack integration.  This is no longer necessary because all
IDAs should now be directly integrated with devstack by adding make
targets, provision scripts, and docker-compose services DIRECTLY within
edx/devstack.

- Overhaul docker-compose.yml to completely change the purpose of the
  `app` container to be exclusively for running tests.
- Update a bunch of other files to reflect the new purpose of the
  testing-only `app` container.

Doing this first in enterprise-access to serve as a model we can test
and iron out before exporting to the rest of enterprise IDAs.
Copilot AI review requested due to automatic review settings April 8, 2026 22:09
@pwnage101 pwnage101 force-pushed the pwnage101/sever-from-devstack branch from ebd7514 to 1a6f7e0 Compare April 8, 2026 22:09
@pwnage101 pwnage101 enabled auto-merge April 8, 2026 22:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes enterprise-access’s legacy “remote devstack” integration and re-scopes this repo’s local Docker usage to a lightweight, test/quality-only container, with full runtime managed directly by edx/devstack. No critical issues found.

Changes:

  • Simplifies docker-compose.yml to a single long-running container intended for executing tests/quality checks.
  • Removes devstack provisioning/start targets and scripts, updating documentation and internal agent/skill docs accordingly.
  • Updates Docker command examples to use docker compose and aligns settings for the test container.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tox.ini Removes embedded [pytest] config (now covered by pytest.ini).
scripts/README.md Updates troubleshooting guidance to reference devstack instead of local make dev.up.
README.rst Replaces devstack-workspace setup docs with pointers to devstack + local test container workflow.
provision-enterprise-access.sh Deletes legacy provisioning script used for remote devstack integration.
Makefile Removes devstack orchestration targets and adds docker compose-based shortcuts for the test container.
docs/customer-billing/billing-management-api.rst Updates test execution command to docker compose exec.
docker-compose.yml Replaces multi-service dev runtime with a single “test runner” container.
CLAUDE.md Updates Docker development notes to reflect devstack ownership + test-only compose usage.
.ralph/PROMPT.md Same: updates Docker development guidance for Ralph.
.claude/skills/unit-tests/SKILL.md Updates container commands to docker compose, adds colima troubleshooting.
.claude/skills/quality-tests/SKILL.md Updates container commands to docker compose, adds colima troubleshooting.

Comment on lines +1 to 2
# Docker in this repo is only supported for running tests locally.
services:
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header comment says Docker in this repo is only supported for running tests, but the Makefile/README/CLAUDE docs all describe this compose setup as supporting both tests and quality checks. Suggest updating this comment to match the intended scope so contributors don’t assume make quality/make validate aren’t supported in this container.

Copilot uses AI. Check for mistakes.
app-restart-devserver: # restart just the app Django dev server
docker-compose exec app bash -c 'kill $$(ps aux | egrep "manage.py ?\w* runserver" | egrep -v "while|grep" | awk "{print \$$2}")'
dev.makemigrations: ## Create migrations via the app container
docker compose exec app python manage.py makemigrations
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev.makemigrations runs manage.py makemigrations inside the docker-compose container, but the compose service sets DJANGO_SETTINGS_MODULE=enterprise_access.settings.test. That test settings module adds the enterprise_access.apps.workflow.tests app (with its own models/migrations), which can cause makemigrations to detect or generate migrations for test-only models. Consider overriding the settings module for this target (e.g., use the local settings module) so migration generation reflects the real app configuration.

Suggested change
docker compose exec app python manage.py makemigrations
docker compose exec -e DJANGO_SETTINGS_MODULE=enterprise_access.settings.local app python manage.py makemigrations

Copilot uses AI. Check for mistakes.
@pwnage101 pwnage101 merged commit 9b6e0ae into main Apr 8, 2026
7 checks passed
@pwnage101 pwnage101 deleted the pwnage101/sever-from-devstack branch April 8, 2026 22:16
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.

4 participants