-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Add SQLite3TokenManager and associated example #1692
Conversation
9a1e622
to
31ef0c4
Compare
There are legit issues only affecting Windows currently because it seems Windows in the GitHub actions environment does not permit the database file to be opened twice. Perhaps the Windows VM relies on NFS thus resulting in the problem as indicated in the following link: https://www.sqlite.org/faq.html#q5
Before getting the error with opening the file a second time, I tried using |
I feel like any SQLite3 Token Manager should integrate with an existing file instead of making an entirely new database file. I feel like the class should therefore get the Sqlite3 connection object and the name of a table to use for storing the token. Edit: It seems to make a table, so the second part is invalid. I still feel that accepting the Connection object directly is the best way to go, since you don't need to open the file multiple times. |
Thanks for the feedback, and welcome back!
I think the more common case is that users aren't already working with a SQLite database. If someone wants to integrate with an existing database, they are free to make their own subclass. The intent behind
While that would resolve Windows the issue for the tests as written, that doesn't help if the same SQLite file is opened by separate programs, which is desirable. I think passing a I think the solution to the Windows issue might be opening the connection only when necessary, and having a built-in retry if the file is locked, but that still needs to be investigated more. |
This PR is stale because it has been open for 20 days with no activity. Remove the Stale label or comment or this will be closed in 10 days. |
This PR is stale because it has been open for 20 days with no activity. Remove the Stale label or comment or this will be closed in 10 days. |
I think I'll just exclude Windows from this example and the test. That should be better than simply dropping it altogether. |
65199c5
to
bb0e000
Compare
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 great! Just a few minor things.
f21b050
to
bb0e004
Compare
Thanks for the review and catching all those issues. I'd incorporated all your suggested changes. |
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.
Two tiny things to make the checks happy. Also, you'll need to resolve conflicts.
bb0e002
to
bb0e008
Compare
bb0e008
to
bb0e000
Compare
No description provided.