Skip to content

feat(api): add delete model run endpoint#268

Open
mrmaloof wants to merge 7 commits into
developfrom
feature/delete-model-run
Open

feat(api): add delete model run endpoint#268
mrmaloof wants to merge 7 commits into
developfrom
feature/delete-model-run

Conversation

@mrmaloof

Copy link
Copy Markdown
Collaborator

Description

  • Add DELETE /institutions/{inst_id}/models/{model_name}/run/{run_id} to remove a completed model run
  • Extend local dev institution seeding to load optional models and runs from local_inst_data.json

Asana Task

EDVISEBUILD-5001 - Add delete option to "model run history" page for DataKinders

Deployment Readiness*

Testing

Describe or check:

  • Created or updated unit, feature, and/or integration tests
  • Typical manual testing in the local env browser, dev pipeline, etc.

Deployment Notes

Describe or check:

  • No special deployment steps required

Rollback Plan

Describe or check:

  • Standard revert is sufficient (git revert)

Reviewer Guidance / Questions*

Screenshots / Testing Evidence*

SOC 2 Change Management Checklist

  • None of the below are true in this code
  • New roles/permissions are introduced without review and approval by the product manager
  • Hardcoded credentials, secrets, or API keys are present in this code
  • Secrets are being managed outside of the approved secrets management process (e.g., GitHub Secrets, environment variables)
  • PII or sensitive data handling is introduced or changed without being reviewed against our data classification policy
  • Sensitive data is written to logs
  • Input validation and sanitization is missing
  • An unnecessary attack surface has been introduced (e.g., unused endpoints, open ports, debug modes left enabled)
  • Common vulnerabilities have been introduced in the code (inc. any dependencies added or updated)
  • No review for common vulnerabilities has been conducted
  • Not tested in a non-production environment
  • Breaking changes to existing APIs or integrations with downstream consumers being notified
  • Performance impact has not been considered or acceptable
  • Appropriate audit logging is missing for any security-relevant actions introduced by this change
  • Log entries contain sensitive or PII data
  • All existing tests do not pass locally (./vendor/bin/pest)

Provide justification if you are submitting a PR with any boxes checked other than the first.


Reminder for Reviewers: By approving this PR you are confirming that you have reviewed the code for correctness, security, and compliance with our engineering and SOC 2 standards. Do not approve PRs where SOC 2 checklist items are checked without documented justification.

*Optional

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vishpillai123

Copy link
Copy Markdown
Collaborator

hey guys @kaylawilding @mrmaloof, I was under the impression that we were just archiving these models, not deleting them completely from the DB. I'm also seeing here that we're deleting files as well from the backend? I don't think we want to do either. What's the behavioral spec say?

Comment thread src/webapp/routers/models.py
@vishpillai123

Copy link
Copy Markdown
Collaborator

hey guys @kaylawilding @mrmaloof, I was under the impression that we were just archiving these models, not deleting them completely from the DB. I'm also seeing here that we're deleting files as well from the backend? I don't think we want to do either. What's the behavioral spec say?

We're deleting model runs, not models my mistake. We're good.

@vishpillai123

vishpillai123 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

@kaylawilding @mrmaloof Okay I looked more into this, we're only deleting the inference output files. So I think we're safe here. Though I would feel more comfortable that we tested this on dev properly and made sure the cleanup looks good (we're not missing anything or deleting anything we shouldn't). I can test this.

@vishpillai123

Copy link
Copy Markdown
Collaborator

@mrmaloof heads up, tested the endpoint, and it works well. I'm patching the "run_id" naming issue, since this is a "job_run_id" and could be confused with "model_run_id". We have several other endpoints here that need this fixed. I'll chat about this in our team meeting.

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