UN-3578 [FIX] GDrive folder browser no longer breaks on Google Docs#2093
UN-3578 [FIX] GDrive folder browser no longer breaks on Google Docs#2093kirtimanmishrazipstack wants to merge 3 commits into
Conversation
…ile lacks a size Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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)
Summary by CodeRabbit
WalkthroughIn ChangesFile Size Backfill Error Handling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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 `@backend/file_management/file_management_helper.py`:
- Around line 89-92: The except block is catching too broad an Exception type
without logging the actual error, which can hide unexpected bugs. Replace the
generic Exception catch with more specific exception types related to fsspec or
connector operations (such as FileNotFoundError, PermissionError, or other
fsspec-specific exceptions), and modify the logger.warning call to include the
actual exception object as part of the log message so that the root cause is
captured while still applying the fallback metadata behavior for known issues.
🪄 Autofix (Beta)
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: c35df02b-54f9-4f14-bb99-b2efbfe381e1
📒 Files selected for processing (1)
backend/file_management/file_management_helper.py
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Unstract test resultsPer-group results
Critical paths
|
| file_name, | ||
| exc, | ||
| ) | ||
| file_info["size"] = 0 |
There was a problem hiding this comment.
@kirtimanmishrazipstack do check if we expect a valid file size anywhere. Will 0 B show up in the UI then? Leaving it null might be better
There was a problem hiding this comment.
@chandrasekharan-zipstack Checked — on this path size is display-only (serialized by FileInfoSerializer, rendered in the folder browser via formatBytes); nothing validates/sorts/gates selection on it. And null wouldn't change the display: formatBytes (GetStaticData.js:71) returns "0 B" for both 0 and null (if (!+bytes)). So 0 is harmless and keeps the size: int contract — only the stray Google-native doc shows "0 B", real files keep their size. Happy to switch to null if you'd rather the API say "unknown" explicitly, but the UI would still read "0 B" unless we also teach formatBytes to render unknown.
chandrasekharan-zipstack
left a comment
There was a problem hiding this comment.
I would still recommend leaving that size field blank rather than displaying 0 B. You can't distinguish between a failed file and one that is actually 0 B



What
Why
How
get_files()(backend/file_management/file_management_helper.py) wraps the per-filefs.info()size backfill in try/except. pydrive2'sinfo()runs an unguardedint(fileSize)→int(None)for Google-native files (nofileSize), which aborted the entire listing; on failure we now log a warning and keep thels()entry with size 0.Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
walk()/ls()).Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
Dependencies Versions
Notes on Testing
Screenshots
Checklist
I have read and understood the Contribution Guidelines.