Skip to content

[CDF-28563] 🪧Remove resource worker - #3220

Merged
doctrino merged 13 commits into
mainfrom
remove-resource-worker
Sep 8, 2026
Merged

[CDF-28563] 🪧Remove resource worker#3220
doctrino merged 13 commits into
mainfrom
remove-resource-worker

Conversation

@doctrino

@doctrino doctrino commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Resource worker was used in deploy v1, and is no longer necessary. It is replaced by DeployV2Command.categorize_resources

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
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 counterproductive. 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.

@doctrino
doctrino force-pushed the remove-resource-worker branch from faefa8b to cf14380 Compare September 8, 2026 09:52
@doctrino
doctrino marked this pull request as ready for review September 8, 2026 10:37
@doctrino
doctrino requested review from a team as code owners September 8, 2026 10:37
@doctrino

doctrino commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 refactors the deployment process by removing the ResourceWorker class and moving the resource categorization logic to DeployV2Command.categorize_resources. It also updates the create method in FunctionScheduleLoader to manually set the data attribute from the request. Feedback on the changes suggests using loader.get_id(resource) instead of resource.as_id() in the test utilities and integration tests to ensure consistency and prevent potential AttributeErrors.

Comment thread tests/utils.py Outdated
Comment thread tests/test_unit/test_cdf_tk/test_cruds/test_externaldata.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
42780 36614 86% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/commands/deploy_v2/command.py 86% 🟢
cognite_toolkit/_cdf_tk/resource_ios/init.py 75% 🟢
cognite_toolkit/_cdf_tk/resource_ios/_resource_ios/function.py 89% 🟢
TOTAL 83% 🟢

updated for commit: 66c6e51 by action🐍

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@doctrino
doctrino enabled auto-merge (squash) September 8, 2026 10:44
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.58%. Comparing base (e2809bd) to head (66c6e51).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...nite_toolkit/_cdf_tk/commands/deploy_v2/command.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3220      +/-   ##
==========================================
- Coverage   85.61%   85.58%   -0.03%     
==========================================
  Files         460      459       -1     
  Lines       42872    42780      -92     
==========================================
- Hits        36704    36614      -90     
+ Misses       6168     6166       -2     
Files with missing lines Coverage Δ
cognite_toolkit/_cdf_tk/resource_ios/__init__.py 75.40% <ø> (-0.40%) ⬇️
...kit/_cdf_tk/resource_ios/_resource_ios/function.py 88.80% <100.00%> (+0.02%) ⬆️
...nite_toolkit/_cdf_tk/commands/deploy_v2/command.py 85.78% <80.00%> (-0.09%) ⬇️

... and 6 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 merged commit 65fd8a1 into main Sep 8, 2026
13 checks passed
@doctrino
doctrino deleted the remove-resource-worker branch September 8, 2026 13:16
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