-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix: Improve error message for SQLitePersister #417 #418
fix: Improve error message for SQLitePersister #417 #418
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.
👍 Looks good to me! Reviewed everything up to 5e31502 in 39 seconds
More details
- Looked at
40
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. burr/core/application.py:2212
- Draft comment:
The error message could be more concise and consistent with other error messages in the codebase. Consider rephrasing it for clarity. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a check for the initialization of the persister before using it. This is a good practice to ensure that the persister is ready to be used. However, the error message could be improved for clarity and consistency.
Workflow ID: wflow_OXqUxnREvdXATx7U
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
on the right track, some more comments!
101b88b
to
f8e3145
Compare
Suggested changed added! |
So this makes the change more robust. We need to special case and ensure that 1. existing behavior doesn't break (not ImplementedError is the default) 2. new behavior works - added tests. I decided that redis and mongodb don't need this, but if it is an issue we can always add it.
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.
I think things look good. Asking @elijahbenizzy for review.
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.
Looking good! Thank you! Left a few comments -- should be easy to fix up.
Hi @elijahbenizzy and @skrawcz, I’ve reviewed the feedback and the discussions above, but I’m a bit unsure about the specific changes that still need to be made. Could you please clarify what needs to be updated or adjusted in the PR based on the comments so far? I want to make sure everything is aligned before moving forward with the changes. Thanks! |
After checking if the table exists we can probably safely assume things have been initialized properly, and we can then set the initialized flag appropriately.
They were very minor things -- you can see my commit for them; thought that would be easier than explaining. I think we should be good to go after these changes. |
Thanks for handling the updates @skrawcz ! Looks like we’re all set... 🤞 |
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.
Looks good!
[Short description explaining the high-level reason for the pull request]
Changes
How I tested this
Notes
Checklist
Important
Add initialization check for persisters in
with_state_persister
to prevent runtime errors with uninitialized persisters.with_state_persister
inapplication.py
to raiseRuntimeError
ifpersister
is not initialized._initialized
attribute andis_initialized()
method toSQLLitePersister
inpersistence.py
to track initialization state.This description was created by for 5e31502. It will automatically update as commits are pushed.