-
-
Notifications
You must be signed in to change notification settings - Fork 975
Fix AttributeError for removed DocumentStorage.connection in 4.5.0 #3244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
- Add defensive @Property to DocumentStorage that raises helpful error when old code tries to access .connection - Update v4.5.1 changelog with fix for issue #3191 - The .connection attribute was removed in 4.5.0 refactor; this provides clear error message for users with cached bytecode or outdated plugins Co-authored-by: LIghtJUNction <[email protected]>
- Add specific instructions for plugin developers (use self.engine and get_session()) - Improve shell command with proper command chaining and error handling - Make error message more actionable with concrete examples Co-authored-by: LIghtJUNction <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
After upgrading to 4.5.0, users see
'DocumentStorage' object has no attribute 'connection'errors in logs when using knowledge base features. This occurs because the 4.5.0 refactor migrated DocumentStorage from synchronous (self.connection) to asynchronous operations (self.engine), but cached bytecode or outdated plugins still reference the old attribute.Changes
Add defensive
@property connectionto DocumentStorage that raisesAttributeErrorwith migration guidance:self.connectionwithself.engineand useasync with self.get_session()Update v4.5.1 changelog with fix reference
Example
Old code attempting to access the removed attribute now gets actionable feedback:
The fix is defensive only—no functional changes to DocumentStorage operations.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.