This is a cloud function based webhook processing service that is being using to get webhook calls from RapidPro to capture different analytical data point.
GNU Affero General Public License v3.0
4
stars
1
forks
source link
[BUG] Fix the dependency and upgradation issues #461
Describe the bug
After upgrading the flask and dependent packages to the latest version. there are some issues with the latest changes. We need to fix these issues to make the system work fine.
Issues Fixed
[x] Some packages were dependent on the Flask upgraded version ie. Flask 3.0.0 so we upgraded the following packages to their required versions
click 8.1.3
Flask-SQLAlchemy 3.1.1
greenlet 3.0.3
itsdangerous 2.1.2
Jinja2 3.1.2
MarkupSafe 2.1.1
psycopg2 2.9.9
SQLAlchemy 2.0.23
Werkzeug 3.0.0
Flask-Migrate 4.0.5
[x] After the package upgraded the DB initialization was throwing error RuntimeError: A 'SQLAlchemy' instance has already been registered on this Flask app. Import and use that instance instead. Which needed some changes in the sequence of the imports
[x] The DB migrations were also not working, that is fixed
[x] Error related to SQLALCHEMY_TRACK_MODIFICATIONS were fixed
[x] The prompts mapping were not working because of the ._decl_class_registry was not available in the latest version of flask sqlalchemy, so updated the logic according to the latest modifications
[x] The BaseQuery used with each database model is also removed in the latest version, so updated the logic accordingly
Expected behavior
[x] All the functionality should work fine without any errors
Screenshots
NA
Additional context
We have upgraded Flask and related packages to the latest version. There are some issues related to the DB operations. We need to fix them
Acceptance Criteria
[x] All the errors are fixed
Documentation
Add whatever documentation will be required here.
Describe the bug After upgrading the flask and dependent packages to the latest version. there are some issues with the latest changes. We need to fix these issues to make the system work fine.
Issues Fixed
RuntimeError: A 'SQLAlchemy' instance has already been registered on this Flask app. Import and use that instance instead.
Which needed some changes in the sequence of the imports._decl_class_registry
was not available in the latest version of flask sqlalchemy, so updated the logic according to the latest modificationsExpected behavior
Screenshots NA
Additional context We have upgraded Flask and related packages to the latest version. There are some issues related to the DB operations. We need to fix them
Acceptance Criteria
Documentation Add whatever documentation will be required here.