slackapi / slackapi/python-slack-sdk
Disable historical_data_enabled in SQLAlchemyInstallationStore / SQLite3InstallationStore
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 4k
- Fork
- 857
- Merge trung bình
- 22 giờ 21 phút
- Pull request đã merge (30 ngày)
- 16
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu tại slack_sdk/oauth/installation_store/sqlalchemy/init.py, xung quanh phần tra cứu installed_at liên quan, sau đó so sánh cách xử lý các bản ghi lịch sử với FileInstallationStore và SQLite3InstallationStore. Xác định historical_data_enabled nên ảnh hưởng như thế nào đến việc khớp các lần cài đặt lại; hoàn thành có nghĩa là các lần cài đặt lại tuân theo hành vi không lưu lịch sử như dự kiến mà không yêu cầu một bản ghi mới.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, sqlalchemy, sqlite
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100