File tags - #191
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis change adds file tag management through REST and client resource APIs. It adds tag normalization and validation for uploads, supports tags across upload modes, includes file tags in file resources, and adds documentation, examples, and tests. ChangesFile tag support
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/uploadcare/api/upload/files.rb`:
- Around line 202-203: Remove tags from the URL-upload request and its related
API surface: in lib/uploadcare/api/upload/files.rb:202-203, stop merging tags
into /from_url/ parameters; update lib/uploadcare/api/upload/files.rb:66,
lib/uploadcare/operations/upload_router.rb:84, and README.md:439 to no longer
document or expose URL-upload tags. Replace the mock-only coverage in
spec/uploadcare/api/upload/files_spec.rb:206-218 with behavior verifying tags
are not sent; apply URL tags only through client.file_tags after status returns
a UUID. Update FileTagNormalizer and its tests to discard blank tags instead of
rejecting them.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5f1e405f-273f-44bb-a7fe-2fec455931ba
📒 Files selected for processing (30)
CHANGELOG.mdREADME.mdapi_examples/README.mdapi_examples/rest_api/get_files_uuid_tags.rbapi_examples/rest_api/patch_files_uuid_tags.rbapi_examples/rest_api/put_files_uuid_tags.rbapi_examples/support/run_rest_example.rblib/uploadcare.rblib/uploadcare/api/rest.rblib/uploadcare/api/rest/file_tags.rblib/uploadcare/api/upload/files.rblib/uploadcare/client.rblib/uploadcare/client/file_tags_accessor.rblib/uploadcare/internal/file_tag_normalizer.rblib/uploadcare/internal/upload_params_generator.rblib/uploadcare/operations/multipart_upload.rblib/uploadcare/operations/upload_router.rblib/uploadcare/resources/file.rblib/uploadcare/resources/file_tags.rbspec/uploadcare/api/rest/file_tags_spec.rbspec/uploadcare/api/rest_spec.rbspec/uploadcare/api/upload/files_spec.rbspec/uploadcare/client_spec.rbspec/uploadcare/coverage_boost_spec.rbspec/uploadcare/internal/file_tag_normalizer_spec.rbspec/uploadcare/internal/upload_params_generator_spec.rbspec/uploadcare/multi_account_spec.rbspec/uploadcare/resources/file_spec.rbspec/uploadcare/resources/file_tags_spec.rbspec/uploadcare_spec.rb
The "sequential upload (threads <= 1)" and progress-callback contexts never passed `threads:`, so `normalize_upload_options` fell back to `config.upload_threads`, which defaults to 2. Both contexts therefore ran the parallel path with two workers while asserting strict part ordering, failing intermittently on loaded CI runners. Pin `upload_threads: 1` in those contexts so the sequential path is actually exercised — it had no coverage before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Tags are now supported by Upload and REST APIs https://uploadcare.com/docs/api/
Summary by CodeRabbit
New Features
Documentation