-
Notifications
You must be signed in to change notification settings - Fork 93
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
DB interface & safety improvements #5330
Conversation
- Do not create tables by default, only if specified via kwarg - Provide context manager functionality to automatically close DB connection - A WorkflowDatabaseManager should only be created by Scheduler; just use CylcWorkflowDAO elsewhere
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've learned a fair bit about SQLite this morning. It Looks sane - will wait for tests to pass on CI before downloading and playing with branch.
(Test failure is just linkcheck) |
if db_file.exists(): | ||
dao = CylcWorkflowDAO(db_file, is_public=False) |
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.
Huh, scan was reading private DBs in spite of the comment above? 😬
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.
It was reading the private DB until b338a91 when the comment was added. But the is_public
arg of CylcWorkflowDAO()
was not updated in that PR
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.
Co-authored-by: Tim Pillinger <26465611+wxtim@users.noreply.github.com>
Partially addresses same issue as #5313
WorkflowDatabaseManager
should only be created byScheduler
; just useCylcWorkflowDAO
elsewhere, or certain static methods onWorkflowDatabaseManager
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.?.?.x
branch.