Skip to content

fix(data workflow tests): cancel running workflow executions before delete#2703

Open
vincent-cognite wants to merge 5 commits into
masterfrom
CDF-28136-fix-workflow-integration-test-teardown-2
Open

fix(data workflow tests): cancel running workflow executions before delete#2703
vincent-cognite wants to merge 5 commits into
masterfrom
CDF-28136-fix-workflow-integration-test-teardown-2

Conversation

@vincent-cognite

@vincent-cognite vincent-cognite commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Fixes flaky teardown in the workflow simulator integration test by waiting for and cancelling running executions before deleting the workflow version and workflow. The API rejects deletes while executions are still running (jazz-api#2424), which caused intermittent cleanup failures in test_upsert_run_delete_with_simulation_task.

@vincent-cognite vincent-cognite marked this pull request as ready for review June 24, 2026 14:18
@vincent-cognite vincent-cognite requested review from a team as code owners June 24, 2026 14:18

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a helper function _delete_workflow_after_executions_finish to clean up workflows and their versions by cancelling running executions and retrying deletion. Feedback suggests optimizing the cleanup process by tracking already cancelled execution IDs to avoid duplicate API requests and simplifying the workflow version ID parameter.

Comment thread tests/tests_integration/test_api/test_workflows.py
VerstraeteBert
VerstraeteBert previously approved these changes Jun 24, 2026

@VerstraeteBert VerstraeteBert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a nit, CI is not passing though. Concurrency

Comment thread tests/tests_integration/test_api/test_workflows.py Outdated
@vincent-cognite

Copy link
Copy Markdown
Contributor Author

Left a nit, CI is not passing though. Concurrency

simint issues it seems

TestSimulatorRoutines::test_list_routines - cognite.client.exceptions.CogniteAPIError: Resource limit exceeded for simulator model. Max 1000

I've been hammering CI a bit and their clean up routines might not be catching all situations...

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