Skip to content

[CDF-26674] 😃Extraction pipeline crud#2521

Merged
doctrino merged 20 commits intomainfrom
extraction-pipeline-crud
Feb 16, 2026
Merged

[CDF-26674] 😃Extraction pipeline crud#2521
doctrino merged 20 commits intomainfrom
extraction-pipeline-crud

Conversation

@doctrino
Copy link
Collaborator

Description

Please describe the change you have made.

Bump

  • Patch
  • Skip

Changelog

Improved

  • Serialization of extraction pipeline and extraction pipeline configs.

@gemini-code-assist
Copy link
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

github-actions bot commented Feb 15, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
34053 29243 86% 80% 🟢

New Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/api/extraction_pipeline_config.py 61% 🟢
cognite_toolkit/_cdf_tk/client/resource_classes/extraction_pipeline_config.py 94% 🟢
TOTAL 77% 🟢

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/api/extraction_pipelines.py 92% 🟢
cognite_toolkit/_cdf_tk/client/resource_classes/identifiers.py 94% 🟢
cognite_toolkit/_cdf_tk/client/testing.py 100% 🟢
cognite_toolkit/_cdf_tk/commands/dump_resource.py 76% 🟢
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/extraction_pipeline.py 88% 🟢
TOTAL 90% 🟢

updated for commit: be12850 by action🐍

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

❌ Patch coverage is 80.95238% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.87%. Comparing base (3ae3e6a) to head (be12850).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...t/_cdf_tk/client/api/extraction_pipeline_config.py 60.97% 16 Missing ⚠️
...df_tk/cruds/_resource_cruds/extraction_pipeline.py 87.67% 9 Missing ⚠️
...ent/resource_classes/extraction_pipeline_config.py 93.75% 1 Missing ⚠️
...kit/_cdf_tk/client/resource_classes/identifiers.py 80.00% 1 Missing ⚠️
cognite_toolkit/_cdf_tk/commands/dump_resource.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2521   +/-   ##
=======================================
  Coverage   85.87%   85.87%           
=======================================
  Files         408      410    +2     
  Lines       34021    34053   +32     
=======================================
+ Hits        29215    29243   +28     
- Misses       4806     4810    +4     
Files with missing lines Coverage Δ
...toolkit/_cdf_tk/client/api/extraction_pipelines.py 91.89% <100.00%> (+0.46%) ⬆️
cognite_toolkit/_cdf_tk/client/testing.py 100.00% <100.00%> (ø)
...ent/resource_classes/extraction_pipeline_config.py 93.75% <93.75%> (ø)
...kit/_cdf_tk/client/resource_classes/identifiers.py 93.58% <80.00%> (-0.94%) ⬇️
cognite_toolkit/_cdf_tk/commands/dump_resource.py 76.25% <85.71%> (-0.52%) ⬇️
...df_tk/cruds/_resource_cruds/extraction_pipeline.py 88.28% <87.67%> (+6.18%) ⬆️
...t/_cdf_tk/client/api/extraction_pipeline_config.py 60.97% <60.97%> (ø)

... and 2 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 changed the title [CDF-26674] Extraction pipeline crud [CDF-26674] 😃Extraction pipeline crud Feb 15, 2026
@doctrino doctrino marked this pull request as ready for review February 15, 2026 20:55
@doctrino doctrino requested review from a team as code owners February 15, 2026 20:55
@doctrino
Copy link
Collaborator Author

/gemini review

Copy link
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 refactors the extraction pipeline and its configuration CRUD logic to use the new tool client and Pydantic models. This is a positive change that improves code consistency, readability, and maintainability by aligning with the new client architecture. The code is now cleaner and more straightforward.

However, I've identified a critical issue with the delete method for ExtractionPipelineConfigCRUD, which is misleading as it doesn't perform any deletion. I've also noted a significant change in the behavior of the retrieve method for the same class, which now fetches all revisions instead of just the latest one. Please see my detailed comments.

@doctrino doctrino force-pushed the extraction-pipeline-crud branch from cf332ef to 2ae88f5 Compare February 16, 2026 06:56
Comment on lines 85 to 106
def delete(self, items: Sequence[ExtractionPipelineConfigId]) -> list[ExtractionPipelineConfigResponse]:
"""Delete configuration revisions. This is called revert in the CDF API, as it reverts
the configuration to a previous revision.

Args:
items: List of ExtractionPipelineConfigId objects to delete.

Returns:
List of the latest configuration revisions after the revert.

"""
endpoint = self._method_endpoint_map["delete"]
latest_new_configurations: list[ExtractionPipelineConfigResponse] = []
for item in items:
request = RequestMessage(
endpoint_url=self._make_url(endpoint.path),
method=endpoint.method,
body_content=item.dump(),
)
response = self._http_client.request_single_retries(request).get_success_or_raise()
latest_new_configurations.append(ExtractionPipelineConfigResponse.model_validate_json(response.body))
return latest_new_configurations
Copy link
Collaborator

@ronpal ronpal Feb 16, 2026

Choose a reason for hiding this comment

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

To make sure: the API returns the list of revisions remaining after delete?

I'm not sure I follow the connection between delete and revert here. Revisions are immutable, right? So we (the API that is), implicitly takes the newest (one) that was not part of the delete request?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it returns the latest active one. I call it delete to have a standardize interface on all API methods.

@doctrino doctrino requested a review from ronpal February 16, 2026 14:22
@doctrino doctrino merged commit 89a54fd into main Feb 16, 2026
13 of 14 checks passed
@doctrino doctrino deleted the extraction-pipeline-crud branch February 16, 2026 14:27
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