Skip to content

feat: Add certificate retirement API for individual users and implement related helper functions#1202

Open
ttak-apphelix wants to merge 4 commits into
mainfrom
ttak-apphelix/BOMS-488-retirement_pipeline
Open

feat: Add certificate retirement API for individual users and implement related helper functions#1202
ttak-apphelix wants to merge 4 commits into
mainfrom
ttak-apphelix/BOMS-488-retirement_pipeline

Conversation

@ttak-apphelix
Copy link
Copy Markdown
Member

@ttak-apphelix ttak-apphelix commented May 11, 2026

Description

Adds a per-user certificate retirement endpoint to support the retirement pipeline, and refactors the existing batch endpoint to reuse shared deletion logic while adding standalone unit tests for the certificate retirement views.

Changes:

  • Added POST /api/certificates/v1/retire_certs_s3_for_user to retire certificates for a single (retired) username.
  • Introduced _retire_single_cert helper and refactored the batch retirement view to use it.
  • Added standalone unit tests for S3 key derivation, per-cert retirement, and both endpoints.

Merge checklist:
Check off if complete or not applicable:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

Related Private repo PR :

Private Jira ticket:

Copilot AI review requested due to automatic review settings May 11, 2026 08:25
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

Adds a per-user certificate retirement endpoint to support the retirement pipeline, and refactors the existing batch endpoint to reuse shared deletion logic while adding standalone unit tests for the certificate retirement views.

Changes:

  • Added POST /api/certificates/v1/retire_certs_s3_for_user to retire certificates for a single (retired) username.
  • Introduced _retire_single_cert helper and refactored the batch retirement view to use it.
  • Added standalone unit tests for S3 key derivation, per-cert retirement, and both endpoints.

Reviewed changes

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

File Description
edx_arch_experiments/certificates/views.py Adds per-user retirement API + shared helper; refactors batch flow to reuse helper.
edx_arch_experiments/certificates/urls.py Registers the new per-user endpoint route.
edx_arch_experiments/certificates/tests/test_views.py Adds unit tests with LMS-module stubbing to run without edx-platform.
edx_arch_experiments/certificates/tests/__init__.py Initializes the certificates test package.

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

Comment thread edx_arch_experiments/certificates/views.py
Comment thread edx_arch_experiments/certificates/views.py
Comment thread edx_arch_experiments/certificates/tests/test_views.py Outdated
Comment thread edx_arch_experiments/certificates/tests/test_views.py
Copilot AI review requested due to automatic review settings May 11, 2026 08:56
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

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

Comment thread edx_arch_experiments/certificates/views.py
Comment thread edx_arch_experiments/certificates/tests/test_views.py
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