Skip to content

DOG-6526: Removed system managed properties#491

Merged
Hmnt39 merged 3 commits intomasterfrom
hemant/cdm_file_properties
Nov 27, 2025
Merged

DOG-6526: Removed system managed properties#491
Hmnt39 merged 3 commits intomasterfrom
hemant/cdm_file_properties

Conversation

@Hmnt39
Copy link
Copy Markdown
Contributor

@Hmnt39 Hmnt39 commented Nov 26, 2025

This PR remove the manual updation of CogniteExtractorFileApply is_uploaded properties allow SDK to handle system-managed props.

Need to merge once this is done https://cognitedata.atlassian.net/browse/DM-3366
https://github.com/cognitedata/cognite-sdk-python/pull/2414/files

@Hmnt39 Hmnt39 requested a review from a team as a code owner November 26, 2025 14:46
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @Hmnt39, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the file upload mechanism by removing the explicit setting of the is_uploaded property for CogniteExtractorFileApply objects. This change ensures that system-managed properties are handled directly by the SDK, reducing potential for errors and simplifying the upload logic. It aligns the extractor utility with the SDK's intended behavior for managing file upload statuses, specifically addressing an issue where manual updates were redundant or problematic.

Highlights

  • File Upload Logic: Eliminated the manual setting of the is_uploaded property on CogniteExtractorFileApply objects during file uploads, enabling the SDK to automatically manage this system-controlled property.
  • Version Update: The package version has been incremented from 7.10.0 to 7.11.0 across relevant configuration and source files.
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 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@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 correctly removes the manual setting of the is_uploaded property on CogniteExtractorFileApply objects, delegating this responsibility to the Cognite SDK. The version is bumped to 7.11.0, and the changelog and project files are updated accordingly. The changes are straightforward and improve maintainability. I have identified a related high-severity issue where the object passed to the post-upload callback is stale, which is made more apparent by this change.

@Hmnt39 Hmnt39 changed the title Removed system managed properties DOG-6526: Removed system managed properties Nov 26, 2025
Copy link
Copy Markdown
Contributor

@einarmo einarmo left a comment

Choose a reason for hiding this comment

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

Could you write a test for this? I'm assuming there aren't any since nothing was failing in this repo.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.88%. Comparing base (3e215b7) to head (b8a2115).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #491      +/-   ##
==========================================
+ Coverage   80.65%   80.88%   +0.22%     
==========================================
  Files          43       43              
  Lines        4203     4201       -2     
==========================================
+ Hits         3390     3398       +8     
+ Misses        813      803      -10     
Files with missing lines Coverage Δ
cognite/extractorutils/__init__.py 100.00% <100.00%> (ø)
cognite/extractorutils/uploader/files.py 90.03% <ø> (+3.23%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hmnt39 Hmnt39 requested a review from einarmo November 27, 2025 11:27
@Hmnt39
Copy link
Copy Markdown
Contributor Author

Hmnt39 commented Nov 27, 2025

Could you write a test for this? I'm assuming there aren't any since nothing was failing in this repo.

Added the test case to check if is_uploaded is changing.

pyproject.toml Outdated
[project]
name = "cognite-extractor-utils"
version = "7.10.0"
version = "7.11.0"
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.

This should be a patch version, 7.10.1

Copy link
Copy Markdown
Contributor

@einarmo einarmo left a comment

Choose a reason for hiding this comment

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

🦄

@Hmnt39 Hmnt39 merged commit b5a160f into master Nov 27, 2025
6 checks passed
@Hmnt39 Hmnt39 deleted the hemant/cdm_file_properties branch November 27, 2025 12:32
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