Skip to content

POC: Support file versioning for sharepoint - #566

Draft
mohammad-arif662 wants to merge 3 commits into
masterfrom
file-versioning-poc
Draft

POC: Support file versioning for sharepoint#566
mohammad-arif662 wants to merge 3 commits into
masterfrom
file-versioning-poc

Conversation

@mohammad-arif662

Copy link
Copy Markdown
Contributor

No description provided.

@mohammad-arif662 mohammad-arif662 changed the title upload file version from queue to cdf POC: Support file versioning Aug 12, 2026

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

Copy link
Copy Markdown

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 support for uploading file content as a new, named version of a file using the alpha CDF file-versioning API via add_io_to_upload_queue_as_version. It refactors the existing upload logic to share common retry and threading plumbing through a new _submit_upload helper. Feedback on these changes suggests wrapping the on_version_uploaded callback in a try-except block to prevent callback exceptions from triggering broken upload retries, and adding a defensive check to ensure upload_urls is not empty before accessing it.

Comment thread cognite/extractorutils/uploader/files.py Outdated
Comment thread cognite/extractorutils/uploader/files.py
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.27273% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.42%. Comparing base (94d29c3) to head (d6bb311).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cognite/extractorutils/uploader/files.py 27.27% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #566      +/-   ##
==========================================
- Coverage   83.97%   83.42%   -0.55%     
==========================================
  Files          46       46              
  Lines        4686     4725      +39     
==========================================
+ Hits         3935     3942       +7     
- Misses        751      783      +32     
Files with missing lines Coverage Δ
cognite/extractorutils/uploader/files.py 82.26% <27.27%> (-8.23%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mohammad-arif662 mohammad-arif662 changed the title POC: Support file versioning POC: Support file versioning for sharepoint Aug 13, 2026
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