Skip to content

Conversation

@angstwad
Copy link
Member

@angstwad angstwad commented Dec 4, 2025

Okay, so this is a massive PR, so apologies.

To make it easier to review, I guess, you can trust the tests a little bit. Or not. I think they're decent. But I made you a "verify the behavior of the API" doc that is in this PR at docs/verification-walkthrough.md. There is also a new user-guide.md there, too, that should help.

Also, I'd suggest you walk through some of the flows in the UI as well... Check out the API endpoints in the OpenAPI page when running locally at http://localhost:8000/api/v1/docs.

And in the UI, you can verify the actions do what they're supposed to do.

I added a ton of documentation on this and in the code to help make review a bit easier.

Summary:
This PR introduces a comprehensive ChangeSet system to the Parameter Store API, enabling atomic, versioned updates to Groups and Clusters. It transitions the API from direct "live" modifications to a staged workflow where changes are drafted, reviewed, and committed as cohesive units.

Key Changes:

  • API Architecture:
    • Implemented ChangeSet lifecycle management: creation, metadata updates, abandonment, and atomic committing.
    • Refactored Group and Cluster CRUD endpoints to strictly require a changeset_id for all state-changing operations (POST, PUT, DELETE).
    • Standardized ID-based lookups (/id/{id}) to use stable shared_entity_id (UUID) rather than ephemeral database row IDs.
    • Added a ChangeSet Summary endpoint (GET /changeset/{id}/changes) providing a categorized breakdown (Create/Update/Delete) of all pending modifications.
    • Added History endpoints (/.../history) for Groups and Clusters to browse the version trail of an entity.
  • Django Admin Integration:
    • Enhanced the Admin UI with updated custom actions for committing, abandoning, and coalescing ChangeSets.
    • Implemented interception logic to ensure deletions from the Admin UI correctly stage changes into the active ChangeSet.
  • Documentation:
    • Created a new docs/user-guide.md providing a clear, approachable walkthrough of the ChangeSet system for both UI and API users.
    • Thoroughly documented the codebase with Google-style docstrings and descriptive Pydantic field definitions for improved OpenAPI/Swagger visibility.
  • Testing:
    • Supplemented with an extensive test suite (84+ tests) covering the full lifecycle of ChangeSets, entity versioning, and administrative workflows.

@angstwad angstwad force-pushed the api-changesets branch 3 times, most recently from 6ffe932 to fd368fb Compare December 5, 2025 20:42
@angstwad angstwad changed the title feat: add changeset API endpoint feat: add changeset capabilites to API Dec 17, 2025
feat(api): use entity UUID to uniquely idenfity a record within the API

feat(api): add historical record visibility for a given entity within the API
  intentionally missing screenshots that will come later
@angstwad angstwad requested a review from Ben-Chapman December 18, 2025 21:54
@angstwad angstwad changed the title feat: add changeset capabilites to API feat!: add changeset capabilites to API Dec 18, 2025
@angstwad angstwad marked this pull request as ready for review December 18, 2025 22:08
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.

1 participant