Skip to content

[CDF-27471, CDF-27573] 🪠 Clean v2#2796

Open
doctrino wants to merge 11 commits intomainfrom
deploy-drop
Open

[CDF-27471, CDF-27573] 🪠 Clean v2#2796
doctrino wants to merge 11 commits intomainfrom
deploy-drop

Conversation

@doctrino
Copy link
Copy Markdown
Contributor

@doctrino doctrino commented Mar 27, 2026

Description

Reusing the deploy v2 command for clean v2.

image

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 Mar 27, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
39455 33391 85% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/commands/deploy_v2/command.py 56% 🟢
TOTAL 56% 🟢

updated for commit: 245f7f0 by action🐍

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 44.06780% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.63%. Comparing base (5b3dcd7) to head (245f7f0).

Files with missing lines Patch % Lines
...nite_toolkit/_cdf_tk/commands/deploy_v2/command.py 44.06% 33 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2796      +/-   ##
==========================================
- Coverage   84.66%   84.63%   -0.04%     
==========================================
  Files         447      447              
  Lines       39428    39455      +27     
==========================================
+ Hits        33383    33391       +8     
- Misses       6045     6064      +19     
Files with missing lines Coverage Δ
...nite_toolkit/_cdf_tk/commands/deploy_v2/command.py 55.55% <44.06%> (-1.78%) ⬇️

... 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.

@doctrino doctrino marked this pull request as ready for review March 27, 2026 08:37
@doctrino doctrino requested review from a team as code owners March 27, 2026 08:37
@doctrino
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

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

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 the clean command (v2) to the toolkit, allowing users to delete resources based on build configurations by extending the existing deployment logic. Feedback was provided regarding the suppression of skipped resource information during the result merging process, which may obscure important details like data-loss prevention warnings from the final summary.

for result in results:
if other_result := other_by_name.get(result.resource_name):
# We do not include skipped from the clean results.
other_result.skipped.clear()
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.

high

Clearing skipped items from the clean phase can hide important information from the user. For example, when using deploy --drop without --drop-data, data resources are not dropped but are instead skipped with a HAS-DATA reason. The current implementation clears this skipped information, and the final report only shows the resource as 'updated' or 'unchanged', which can be misleading as the user might incorrectly assume that the resource was dropped and recreated.

To provide more transparency, consider removing this line. This will ensure that skipped items from the clean phase are included in the final summary, giving the user a complete picture of the operation.

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.

1 participant