slackapi / slackapi/python-slack-sdk
Disable historical_data_enabled in SQLAlchemyInstallationStore / SQLite3InstallationStore
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 4k
- Fork
- 857
- Merge medio
- 22h 21m
- PR unite (30g)
- 16
Descrizione
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: https://github.com/slackapi/python-slack-sdk/blob/cf225995b722739f11bc530cc6a9263a44bd4b7a/slack_sdk/oauth/installation_store/sqlalchemy/__init__.py#L148
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da slack_sdk/oauth/installation_store/sqlalchemy/init.py, intorno alla ricerca collegata di installed_at, quindi confronta la gestione dei record storici con FileInstallationStore e SQLite3InstallationStore. Determina in che modo historical_data_enabled dovrebbe influire sulla corrispondenza durante le reinstallazioni; il lavoro è completato quando le reinstallazioni seguono il comportamento non storico previsto senza richiedere un nuovo record.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, sqlalchemy, sqlite
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100