fix: Corrected vertex AI's JSON schema#197
Conversation
…s() error handling
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughRemoved the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Caller
participant FS as FileStorage.exists
participant LC as LocalCache
participant P as Provider FS
rect rgba(230,240,255,0.5)
note over FS: New flow (after removing @skip_local_cache)
C->>FS: exists(path)
FS->>LC: check cached existence
alt cache hit
LC-->>FS: cached result
FS-->>C: result
else cache miss
FS->>P: exists(path)
P-->>FS: result
FS->>LC: update cache
FS-->>C: result
end
end
sequenceDiagram
autonumber
participant C as Caller
participant FS as FileStorage.exists
participant P as Provider FS
rect rgba(255,240,230,0.5)
note over FS: Previous flow (with @skip_local_cache)
C->>FS: exists(path)
FS->>P: exists(path) // cache bypassed
P-->>FS: result
FS-->>C: result
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to Reviews > Disable Cache setting Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/unstract/sdk/file_storage/helper.py (1)
81-87: Wrapper drops return value on FileNotFoundError retryIf the first call raises FileNotFoundError, the retry result isn’t returned, causing callers to receive None.
def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except FileNotFoundError: - _handle_file_not_found(func, *args, **kwargs) + return _handle_file_not_found(func, *args, **kwargs) except Exception as e: raise FileOperationError(str(e)) from e
🧹 Nitpick comments (1)
src/unstract/sdk/file_storage/helper.py (1)
48-49: Prefer exc_info for full trace in error logsUse structured logging with exc_info to capture the stack trace instead of interpolating the exception into the message.
- logger.error(f"Error in initialising {provider.value} file system {e}") + logger.error("Error in initialising %s file system", provider.value, exc_info=True)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting
📒 Files selected for processing (3)
src/unstract/sdk/adapters/llm/vertex_ai/src/static/json_schema.json(0 hunks)src/unstract/sdk/file_storage/helper.py(2 hunks)src/unstract/sdk/file_storage/impl.py(0 hunks)
💤 Files with no reviewable changes (2)
- src/unstract/sdk/file_storage/impl.py
- src/unstract/sdk/adapters/llm/vertex_ai/src/static/json_schema.json
|
@chandrasekharan-zipstack Do we know what might have caused this issue with vertex AI adapter? Was wondering if this was caused by any dependency update since we did not face this issue earlier. |
We fixed the frontend validation for the JSON schema form which led to this coming up |
What
Why
Notes on Testing
Screenshots
...
Checklist
I have read and understood the Contribution Guidelines.