Skip to content

😅Fix failing smoke test on greenfield#2956

Merged
doctrino merged 4 commits into
mainfrom
fix-failing-smoke-test-on-greenfield
Apr 27, 2026
Merged

😅Fix failing smoke test on greenfield#2956
doctrino merged 4 commits into
mainfrom
fix-failing-smoke-test-on-greenfield

Conversation

@doctrino
Copy link
Copy Markdown
Contributor

Description

Please describe the change you have made.

Bump

  • Patch
  • Skip

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
42293 36257 86% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/api/instances.py 89% 🟢
TOTAL 89% 🟢

updated for commit: f323b0e by action🐍

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.72%. Comparing base (2b49443) to head (f323b0e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2956      +/-   ##
==========================================
- Coverage   85.73%   85.72%   -0.01%     
==========================================
  Files         461      461              
  Lines       42293    42293              
==========================================
- Hits        36261    36257       -4     
- Misses       6032     6036       +4     
Files with missing lines Coverage Δ
cognite_toolkit/_cdf_tk/client/api/instances.py 89.01% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@doctrino doctrino marked this pull request as ready for review April 26, 2026 07:59
@doctrino doctrino requested review from a team as code owners April 26, 2026 07:59
@doctrino doctrino changed the title Fix failing smoke test on greenfield 😅Fix failing smoke test on greenfield Apr 26, 2026
@@ -1,6 +1,5 @@
instances:
- createdTime: 1772711569310
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

createdTime now change for each run.

Comment on lines +358 to +360
# Cleanup for next run.
destination_node_ids = [node_id for node_ids in destination_by_view_id.values() for node_id in node_ids]
toolkit_client.tool.instances.delete(destination_node_ids)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The smoke tests currently failed because, this PR changed the destination data. Since the destination data is not cleaned up, only added to, then, the test started failing.

Comment on lines -203 to +210
_ = client.tool.instances.create(instance_batch)
_ = client.tool.instances.create(instance_batch, replace=True)
except ToolkitAPIError as e:
raise AssertionError(
f"Failed to create instance batch for view {view_id!s}. Error: {e}. Batch: {[item.as_id() for item in instance_batch]}"
) from e
if edges:
try:
_ = client.tool.instances.create(edges)
_ = client.tool.instances.create(edges, replace=True)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is strictly not necessary, but I added it as it make the set up more robust. Legacy InField is set up exactly the same way each time, it it pre-exist it will be overwritten.

@doctrino doctrino enabled auto-merge (squash) April 26, 2026 09:44
@doctrino doctrino merged commit 0ed6ac9 into main Apr 27, 2026
13 of 14 checks passed
@doctrino doctrino deleted the fix-failing-smoke-test-on-greenfield branch April 27, 2026 06:03
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