Skip to content

delete model after creating - #1069

Merged
ebhills merged 3 commits into
devfrom
1049-tests-creating-large-number-of-actual-wrangles
Aug 3, 2026
Merged

delete model after creating#1069
ebhills merged 3 commits into
devfrom
1049-tests-creating-large-number-of-actual-wrangles

Conversation

@mborodii-prog

Copy link
Copy Markdown
Contributor

Summary

Integration tests for train.classify, train.extract, train.lookup, and train.standardize create real models on the WrangleWorks platform but never clean them up, leaving a growing number of orphaned test models in the account. This adds a wrangles.train.delete() method and updates the affected tests to delete the models they create.

  • Add wrangles.train.delete(model_id), which calls the DELETE /model/delete API endpoint and raises RuntimeError on a non-OK response.
  • Wrap model-creation tests in try/finally so the created model is deleted after the test runs, regardless of pass/fail.
  • Add _delete_model_from_log() helper to tests/connectors/test_train.py to extract a model ID from a logged message (e.g. "New classify model created :: <id>") and delete it, tolerating failure while cleaning up.
  • Add TestTrainDelete test class covering create-then-delete for classify, extract, lookup, and standardize models, plus a test that a non-OK delete response raises RuntimeError.

@mborodii-prog mborodii-prog linked an issue Jul 14, 2026 that may be closed by this pull request
@ebhills

ebhills commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

@mborodii-prog

@ebhills ebhills left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Add ability to call delete from recipe. Add confirm: delete parameter that requires writer to type delete
  • How is this different from PR #997 ?

@ebhills
ebhills marked this pull request as draft July 27, 2026 14:03
@ebhills
ebhills removed the request for review from thomasstvr July 27, 2026 14:04

ebhills commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Queue triage (2026-07-27)

GitHub is the status record; update this PR rather than the external spreadsheet.

@ebhills

ebhills commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved. I merged origin/main into this branch and fixed the conflict state in commit 7cf8015.

Copilot AI requested a review from ebhills August 3, 2026 02:39
@ebhills
ebhills changed the base branch from main to dev August 3, 2026 02:39
@ebhills
ebhills marked this pull request as ready for review August 3, 2026 02:40
@ebhills
ebhills merged commit e5e434d into dev Aug 3, 2026
@ebhills ebhills added the in-dev PR branch merged into dev for integration testing label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-dev PR branch merged into dev for integration testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests Creating Large Number of Actual Wrangles

3 participants