Skip to content

CM-61550: Show upload progress and detect slow connections during scan#419

Open
mateusz-sterczewski wants to merge 2 commits intomainfrom
CM-61550-upload-progress
Open

CM-61550: Show upload progress and detect slow connections during scan#419
mateusz-sterczewski wants to merge 2 commits intomainfrom
CM-61550-upload-progress

Conversation

@mateusz-sterczewski
Copy link
Collaborator

  • Add _UploadProgressTracker to CycodeClientBase: a file-like wrapper that tracks bytes sent and fires a progress callback on each read
  • Add post_multipart() to CycodeClientBase with retry via @Retry decorator; detects mid-transfer connection drops and raises SlowUploadConnectionError for partial uploads
  • Add _UploadProgressAggregator to code_scanner: aggregates progress across parallel batch uploads and displays MB sent / MB total in the progress bar right-side label
  • Add SlowUploadConnectionError with a user-friendly CLI error message
  • Thread on_upload_progress callback through _perform_scan, _perform_scan_async, and _perform_scan_v4_async
  • Add test coverage for slow upload detection

- Add _UploadProgressTracker to CycodeClientBase: a file-like wrapper
  that tracks bytes sent and fires a progress callback on each read
- Add post_multipart() to CycodeClientBase with retry via @Retry
  decorator; detects mid-transfer connection drops and raises
  SlowUploadConnectionError for partial uploads
- Add _UploadProgressAggregator to code_scanner: aggregates progress
  across parallel batch uploads and displays MB sent / MB total in the
  progress bar right-side label
- Add SlowUploadConnectionError with a user-friendly CLI error message
- Thread on_upload_progress callback through _perform_scan,
  _perform_scan_async, and _perform_scan_v4_async
- Add test coverage for slow upload detection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
from cycode.cli.files_collector.models.in_memory_zip import InMemoryZip
from cycode.cyclient import models
from cycode.cyclient.cycode_client_base import CycodeClientBase
from cycode.cyclient.cycode_client_base import CycodeClientBase, _UploadProgressTracker
Copy link
Collaborator

Choose a reason for hiding this comment

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

importing _ named class here ie private

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