You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating from FileInstallationStore to SQLAlchemyInstallationStore for storing credentials and don't want to store old installation records when the app is reinstalled.
With FileInstallationStore I used the flag for disabling historical records to do this. I'm trying to accomplish the same with SQLAlchemyInstallationStore and the SDK does check if a previous installation for the team exists and updates the existing record if so. However, in determining if a previous installation exists it requires an exact match on installed_at:
This guarantees that reinstalls always create a new record instead of updating the existing one since the install dates will always be different. I'm wondering if this is a bug or if its expected behaviour and there's some other way we're supposed to handle reinstalls.
The text was updated successfully, but these errors were encountered:
seratch
changed the title
(Question) Handling reinstalls with SQLAlchemyInstallationStore
Add historical_data_enabled option to SQLAlchemyInstallationStore / SQLite3InstallationStore
Nov 14, 2021
Hi @olestourko, thanks for taking the time to write in here!
Indeed, the historical_data_enabled flag option is not available in the relational database based Installation Store implementation (specifically, SQLAlchemyInstallationStore and SQLite3InstallationStore).
We're open to the idea of adding the feature in the future but it won't be a short-term priority. If you operate production-grade apps, we recommend having all the installation history data for safety and for easier troubleshooting.
To disable historical data management right now, please go with your workaround or implement your own InstallationStore for it.
seratch
changed the title
Add historical_data_enabled option to SQLAlchemyInstallationStore / SQLite3InstallationStore
Disable historical_data_enabled in SQLAlchemyInstallationStore / SQLite3InstallationStore
Feb 11, 2022
I'm migrating from
FileInstallationStore
toSQLAlchemyInstallationStore
for storing credentials and don't want to store old installation records when the app is reinstalled.With
FileInstallationStore
I used the flag for disabling historical records to do this. I'm trying to accomplish the same withSQLAlchemyInstallationStore
and the SDK does check if a previous installation for the team exists and updates the existing record if so. However, in determining if a previous installation exists it requires an exact match oninstalled_at
:python-slack-sdk/slack_sdk/oauth/installation_store/sqlalchemy/__init__.py
Line 148 in cf22599
This guarantees that reinstalls always create a new record instead of updating the existing one since the install dates will always be different. I'm wondering if this is a bug or if its expected behaviour and there's some other way we're supposed to handle reinstalls.
The text was updated successfully, but these errors were encountered: