Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Upgrade flask package to 3.0.0 #65

Closed
2 tasks done
Sachinbisht27 opened this issue Jan 2, 2024 · 3 comments
Closed
2 tasks done

[FEATURE] Upgrade flask package to 3.0.0 #65

Sachinbisht27 opened this issue Jan 2, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Sachinbisht27
Copy link
Member

Sachinbisht27 commented Jan 2, 2024

Is your feature request related to a problem? Please describe.
We are currently using Flask 1.1.2, which is getting older, and the latest version Flask 3.0.0 was upgraded on Sep 30, 2023. Within these releases, there are many minor and major releases, including breaking changes. It is recommended to upgrade the application dependencies timely to avoid any security vulnerability with the older versions.

Describe the solution you'd like

  • Upgrade the Flask version from Flask 1.2.2 to Flask 3.0.0

Describe alternatives you've considered
NA

Additional context
Here is the list of changes mentioned in official documentation - Flask version upgrade change logs

Acceptance Criteria

  • The upgraded package versions and dependencies should work fine.

Documentation
Add whatever documentation will be required here.

@Sachinbisht27 Sachinbisht27 added the enhancement New feature or request label Jan 2, 2024
@Sachinbisht27 Sachinbisht27 self-assigned this Jan 9, 2024
@Sachinbisht27
Copy link
Member Author

Closing the issue as completed and released on production.

@Sachinbisht27
Copy link
Member Author

Sachinbisht27 commented Jun 5, 2024

Details on over-effort spending in this issue:

This ticket concerns upgrading the Flask package to 3.0.0 and its dependencies with maximum compatibility. We worked on this because the system is running on an older version of Flask 1.1.2.

We worked on upgrading the Flask package from 1.1.2 to 3.0.0 one by one and tested the application in every upgrade. We found some changes happened at the declaring level of the query class in the Flask-SQLalchemy and did some fixes for that. We removed the configuration of the SQLALCHEMY_TRACK_MODIFICATIONS because getting an error for the use of this after upgrading Flask-SQLalchemy.

Work done to complete this issue:

  1. To upgrade the Flask - we followed the following steps - 4 hours

    • Upgraded the Flask package from 1.1.2 to 3.0.0 one by one with the major upgrades.
  2. To fix the errors and add the latest flask-supported changes - we followed the following steps - 4 hours

    • Did the fix for the pre-commit failure issue.
    • Fixed the error for the SQLALCHEMY_TRACK_MODIFICATIONS configuration because getting an error for the use of this after upgrading.
    • Did flask supported change: BaseQuery class has been renamed as query now and is situated within the query module.

The trail is added as a PR in this Github story on 9th Jan. Sharing the link here as well - #68

@Sachinbisht27
Copy link
Member Author

Sachinbisht27 commented Jun 5, 2024

Explanation of efforts spent -

  1. We estimated 4 hours for this task because we have done the package upgrade tasks for other services and had a fair idea of the expected area of impact. The flask and its dependencies upgrade was done within the estimated 4 hours.
  2. There were unexpected issues on upgrading the flask which took an additional 4 hours to get fixed, including linting packages.
  3. The trail of those unexpected issues is in GitHub through PR on the 9th of Jan.
  4. We tracked these hours on the same day in the CC timesheet but missed updating it in GitHub. I verified the same date entry in the CC timesheet via Google Sheets history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants