-
Notifications
You must be signed in to change notification settings - Fork 24
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
use_browser_authentication fails with "Connection is closed" #225
Comments
I'm not familiar with how browser authentication is by |
Connecting works. Just looking at the logs (I don't know how the target works under the hood), it seems like it's trying to operate on an already closed connection |
Ah I see. The pipeline seems to have exited cleanly and the error is logged but doesn't crash the target. It might help to look at the debug level logs for https://sdk.meltano.com/en/v0.38.0/implementation/logging.html#logging |
@edgarrmondragon @larsrinn , as I was the one introducing the browser authentication functionality in the connector and was also experiencing this issue myself, I took the liberty of opening a PR to fix it! |
Great @dlouseiro. Happy to see it's that easy. Would be great, if this was merged quickly, @edgarrmondragon |
…on (#257) The purpose of this PR is to solve the issue reported [here](#225). ## Root cause: There was one usage of `engine.connect` outside of a context manager (in `create_engine`), causing the connector to leave one connection "lying around". I did not dive too deep into the internals of the connector nor focused too much in understanding why is it different for the browser authentication mechanism, but mostly in ensuring all calls to `engine.connect()` were done within a context manager, ensuring SQL alchemy does its job in closing all connections when they should be closed. ## Implementation details: - Use a context manager when checking if the database exists (in the `create_engine` ) method.
Closed by #257 |
I have a pipeline working using username/password authentication. When I switch this to
use_browser_authentication: true
, it fails. It seems like the failure occurs at the very end. What happens is:Relevant log messages
The text was updated successfully, but these errors were encountered: