TEST [AAP-72399] feat: add management job data models and migration#1
Draft
B-Whitt wants to merge 3 commits into
Draft
Conversation
Add ManagementJob, ManagementJobSchedule, and ManagementJobExecution models with ManagementJobType and ExecutionStatus enums. Includes migration 0071 and 16 integration tests covering model creation, relationships, constraints, and cascade deletes. Jira: AAP-72399 Assisted-By: Claude Opus
Assisted-By: Claude Opus
Assisted-By: Claude Opus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a test of the AAP-SDLC harness Skill [2026-04-21]. Do not merge.
What is being changed?
Adds three new Django models for the management job framework:
Also adds
ManagementJobTypeandExecutionStatusenums tocore/enums.py, exports/registers models inmodels/__init__.py, and includes migration0071_management_jobs.Why is this change needed?
EDA currently lacks management job capabilities. This is Phase 1 of the management job framework (Epic AAP-72387) — delivering the data layer that the API endpoints (AAP-72400) and concrete job implementations (AAP-72401) will build upon.
Jira: AAP-72399
How does this change address the issue?
Implements all acceptance criteria for AAP-72399:
cleanup_audit_logsandcleanup_stale_activations✅django.contrib.admin(API-first architecture, same as AWX)Does this change introduce any new dependencies, blockers or breaking changes?
No new dependencies. No breaking changes. Models follow existing EDA patterns (BaseOrgModel, UniqueNamedModel, DjangoStrEnum).
How it can be tested?
All 16 tests pass (verified locally against PostgreSQL).
Intent Adherence: 95/100
The implementation closely matches the story intent. Deductions: (-5) AC ansible#6 (Django admin) flagged as N/A since EDA deliberately excludes
django.contrib.admin.Changeset
src/aap_eda/core/enums.pysrc/aap_eda/core/models/management_job.pysrc/aap_eda/core/models/__init__.pysrc/aap_eda/core/migrations/0071_management_jobs.pytests/integration/core/test_management_job.pyAssisted-By: Claude Opus