Skip to content

test(simint): clean up stale test models to prevent hitting limit#2704

Merged
mohammad-arif662 merged 4 commits into
masterfrom
simulator-model-cleanup
Jun 25, 2026
Merged

test(simint): clean up stale test models to prevent hitting limit#2704
mohammad-arif662 merged 4 commits into
masterfrom
simulator-model-cleanup

Conversation

@mohammad-arif662

@mohammad-arif662 mohammad-arif662 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a cleanup step in the seed_simulator_models fixture to delete leftover models from prior CI runs before creating a new one. It is to prevent it from hitting limit.

Checklist:

  • Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • The PR title follows the Conventional Commit spec.

@mohammad-arif662 mohammad-arif662 changed the title clean up stale test models to prevent hitting 1000 model limit test(simint): clean up stale test models to prevent hitting limit Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.65%. Comparing base (e2152c0) to head (068aad9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...s_integration/test_api/test_simulators/conftest.py 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2704      +/-   ##
==========================================
- Coverage   93.68%   93.65%   -0.03%     
==========================================
  Files         503      503              
  Lines       50696    50704       +8     
==========================================
- Hits        47494    47488       -6     
- Misses       3202     3216      +14     
Files with missing lines Coverage Δ
...s_integration/test_api/test_simulators/conftest.py 86.36% <50.00%> (-2.86%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mohammad-arif662 mohammad-arif662 marked this pull request as ready for review June 25, 2026 09:22
@mohammad-arif662 mohammad-arif662 requested review from a team as code owners June 25, 2026 09:22

@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 adds a cleanup mechanism to delete stale simulator models created more than two hours ago during integration tests. Feedback was provided to ensure type safety and prevent potential runtime errors by checking that created_time is not None before comparing it.

Comment thread tests/tests_integration/test_api/test_simulators/conftest.py
@mohammad-arif662 mohammad-arif662 added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Jun 25, 2026
@vincent-cognite vincent-cognite self-assigned this Jun 25, 2026
@vincent-cognite vincent-cognite added risk-review-ongoing Risk review is in progress and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Jun 25, 2026
@vincent-cognite

Copy link
Copy Markdown
Contributor

🦄

@mohammad-arif662 mohammad-arif662 added this pull request to the merge queue Jun 25, 2026
Merged via the queue into master with commit 2de6405 Jun 25, 2026
35 of 36 checks passed
@mohammad-arif662 mohammad-arif662 deleted the simulator-model-cleanup branch June 25, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants