-
Notifications
You must be signed in to change notification settings - Fork 70
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
bug: Cache SQL columns and schemas does not work with a shared connector #2325
Comments
As per @pnadolny13 request here, I opened an issue with this. I have been giving a thought to all of this and with the current version of the SDK I am not sure if we can optimize even more the calls to
And if there has been a schema change, I want to invalidate the cache. So I don't think that this process can be optimized any more, and therefore the caching cannot be done. Any thoughts? I am new to the Meltano SDK so maybe I am understanding the whole code wrong! |
cc @BuzzCutNorman in case you have thoughts about this |
@edgarrmondragon I don't have any initial thoughts. I will need to find a way to reproduce the issue. |
I agree with the the approach and reasoning of @BuzzCutNorman : from an OOD perspective, the way it was intended is for the I think then the But I wonder if the logic of caching is the connector's responsibility. In any case, I don't think any caching can be done as I exposed. Would it be OK if I just remove the caching implemented here? |
@raulbonet Thank you for creating the issue and starting the conversation. I understand what you are saying in theory I just have not gotten time to reproduce the issue you are describing. Once I can observe it and work with it in a testing scenario, then I can attempt to have a knowledgeable discussion on ways to resolve this. If you could provide the error that you are seeing or the traceback of the error that would be very helpful. My guess is you are running your PR version of meltanolabs target-postgres but I don't know if you are seeing the error when you run the testing or if the error occurs when you are giving target-postgres data from a particular tap. |
Hello @BuzzCutNorman and company, Sorry, I have been sick and not been able to follow up on this until now. In this PR I replaced (almost) all the custom overridden methods of the If you do:
You will see that 2 tests of the test suite fail: I am attaching the full log. It's interesting to note that they only fail once: if you re-execute the test, they will be successful: that's because the test fails but it is able to create the new column, so if the test is executed without restarting the Postgres instance, it is successful. If I remove the part of the code belonging to the caching, the tests are successful. |
Closed by mistake when merging to my personal fork, re-opened. |
Singer SDK Version
0.35.2
Is this a regression?
Python Version
3.9
Bug scope
Taps (catalog, state, etc.)
Operating System
Linux
Description
Meltano throws an exception whenever there is a schema change in the same run.
This feature does not seem to work after the release of this feature.
Whenever a schema is changed, the cache of the connector should no longer valid. But currently, upon sink initialization, the connector is reused.
Indeed, if you look at the
add_sqlsink()
method, the sink is initialized with the existing connectorCode
No response
The text was updated successfully, but these errors were encountered: