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

chore: bump celery and Flask #19168

Merged
merged 21 commits into from
Mar 24, 2022
Merged

chore: bump celery and Flask #19168

merged 21 commits into from
Mar 24, 2022

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Mar 16, 2022

SUMMARY

This PR bumps major versions on the following main packages:

Celery from 4.X to 5.X:

Breaking changes: https://docs.celeryq.dev/en/stable/history/whatsnew-5.0.html#step-5-upgrade-to-celery-5-0

Relevant CLI breaking changes, and a final "warning" to migrate configuration keys to the new standard introduced on celery 4:

https://docs.celeryq.dev/en/stable/userguide/configuration.html#conf-old-settings-map

Note: Celery is at 5.2.2 and not 5.2.3 because of celery/celery#7194 this can cause problems on newer OSes forcing setup's to pin down setuptools

Flask-AppBuilder 3.X to 4.X

  • Drops python 3.6 support
  • Removed config key AUTH_STRICT_RESPONSE_CODES, it's always strict now
  • Removes Flask-OpenID dependency (extra dependency now)
  • Major version bump on the packages bellow

Flask from 1.X to 2.X

Breaking changes: https://flask.palletsprojects.com/en/2.0.x/changes/#version-2-0-0

Relevant:

  • JSON support no longer uses simplejson. To use another JSON module, override app.json_encoder and json_decoder. #3555

  • send_file() raises a ValueError when passed an io object in text mode. Previously, it would respond with 200 OK and an empty file. #3358

No relevant changes for our users, unless using a customised/extended Superset.

flask-jwt-extended 3.X to 4.X:

Breaking changes: https://flask-jwt-extended.readthedocs.io/en/stable/v4_upgrade_guide/

No relevant changes for our users, unless using a customised Security Manager that uses this extension JWT claims or using JWT_CSRF_HEADER_NAME configuration key.

pyJWT 1.X to 2.X:

Breaking changes: https://pyjwt.readthedocs.io/en/stable/changelog.html#v2-0-0

No relevant changes for our users, unless using a customised/extended Superset.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dpgaspar dpgaspar changed the title chore: bump celery and Flask [WIP] chore: bump celery and Flask Mar 16, 2022
@dpgaspar dpgaspar changed the title [WIP] chore: bump celery and Flask chore: bump celery and Flask Mar 16, 2022
@dpgaspar dpgaspar changed the title chore: bump celery and Flask [WIP] chore: bump celery and Flask Mar 16, 2022
@dpgaspar dpgaspar marked this pull request as ready for review March 16, 2022 13:03
@etr2460 etr2460 added risk:breaking-change Issues or PRs that will introduce breaking changes v2.0 labels Mar 16, 2022
response = send_file(
buf,
mimetype="application/zip",
as_attachment=True,
attachment_filename=filename,
download_name=filename,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -64,7 +74,7 @@ dnspython==2.1.0
# via email-validator
email-validator==1.1.3
# via flask-appbuilder
flask==1.1.4
flask==2.0.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the changelog the only breaking change which may impact us is pallets/flask#3555.

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #19168 (add9a2b) into master (a08f83b) will increase coverage by 0.03%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master   #19168      +/-   ##
==========================================
+ Coverage   66.64%   66.67%   +0.03%     
==========================================
  Files        1674     1675       +1     
  Lines       64614    64612       -2     
  Branches     6502     6501       -1     
==========================================
+ Hits        43061    43080      +19     
+ Misses      19868    19848      -20     
+ Partials     1685     1684       -1     
Flag Coverage Δ
hive 52.70% <55.55%> (+0.03%) ⬆️
mysql 81.65% <88.88%> (-0.01%) ⬇️
postgres 81.70% <88.88%> (-0.01%) ⬇️
presto 52.55% <55.55%> (+0.03%) ⬆️
python 82.11% <88.88%> (-0.01%) ⬇️
sqlite 81.47% <88.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/cli/importexport.py 80.00% <50.00%> (ø)
superset/config.py 91.69% <100.00%> (-0.03%) ⬇️
superset/tasks/async_queries.py 91.02% <100.00%> (ø)
superset/utils/async_query_manager.py 81.18% <100.00%> (-1.06%) ⬇️
superset/views/core.py 75.87% <100.00%> (ø)
...et-frontend/src/dashboard/actions/dashboardInfo.ts 52.17% <0.00%> (-9.37%) ⬇️
superset-frontend/src/components/Select/utils.ts 52.94% <0.00%> (-4.96%) ⬇️
...erset-frontend/src/SqlLab/components/App/index.jsx 52.38% <0.00%> (-3.18%) ⬇️
...perset-frontend/src/dashboard/containers/Chart.jsx 72.72% <0.00%> (-2.28%) ⬇️
...src/BigNumber/BigNumberWithTrendline/buildQuery.ts 9.09% <0.00%> (-2.03%) ⬇️
... and 115 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a08f83b...add9a2b. Read the comment docs.

@dpgaspar dpgaspar changed the title [WIP] chore: bump celery and Flask chore: bump celery and Flask Mar 17, 2022
@craig-rueda
Copy link
Member

Should we be merging this into a 2.0 branch or something? This is gonna break a lot of folks :)

Copy link
Member

@craig-rueda craig-rueda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor leftover from a merge conflict, other than that LGTM and looking forward to getting this in!

UPDATING.md Outdated Show resolved Hide resolved
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@villebro villebro closed this Mar 24, 2022
@villebro villebro reopened this Mar 24, 2022
@dpgaspar dpgaspar merged commit f37fc1a into apache:master Mar 24, 2022
@dpgaspar dpgaspar deleted the chore/celery-5 branch March 24, 2022 09:16
@garyng
Copy link
Contributor

garyng commented Mar 25, 2022

@dpgaspar
Copy link
Member Author

@garyng yes it's intentional, that dependency is optional on FAB 4.0.0: https://flask-appbuilder.readthedocs.io/en/latest/breaking.html#version-4-0-0

@garyng
Copy link
Contributor

garyng commented Mar 25, 2022

@dpgaspar okay, thanks!

@dpgaspar dpgaspar mentioned this pull request May 10, 2022
@dpgaspar dpgaspar mentioned this pull request May 25, 2022
1 task
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* chore: bump celery, Flask, flask-jwt-extended, pyJWT

* fix pyJWT breaking change

* fix pyJWT breaking change 2

* test

* fixed test

* fixed test

* fixed test

* revert since mypy won't pick the correct signature

* lint 1

* fix test

* fix test

* docs and celery config migration

* bump FAB to 4.0.0rc3, remove AUTH_STRICT_RESPONSE_CODES

* update docs for new celery config keys

* downgrade celery to 5.2.2

* ref FAB to final 4.0.0 release

* remove conflict left over
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset-io risk:breaking-change Issues or PRs that will introduce breaking changes size/L 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants