slackapi / slackapi/python-slack-sdk
Disable historical_data_enabled in SQLAlchemyInstallationStore / SQLite3InstallationStore
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 4k
- Forks
- 857
- Merge medio
- 22 h 21 min
- PR fusionados (30 d)
- 16
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en slack_sdk/oauth/installation_store/sqlalchemy/init.py, alrededor de la búsqueda vinculada de installed_at, y compara después el tratamiento de los registros históricos con FileInstallationStore y SQLite3InstallationStore. Determina cómo debería afectar historical_data_enabled a la coincidencia de las reinstalaciones; se considera terminado cuando las reinstalaciones siguen el comportamiento no histórico previsto sin requerir un nuevo registro.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python, sqlalchemy, sqlite
- Área
- databases
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100