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: unbreak pip-compile-multi #17963

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

villebro
Copy link
Member

@villebro villebro commented Jan 7, 2022

SUMMARY

Currently there are a few conflicts in the python dependencies:

  • packaging==23.0 depends on pyparsing<3, which causes an error when runningpip-compile-multi. By upgrading pyparsing to the latest stable version we can also upgrade to the latest version of packaging.
  • wrapt<1.13 is required by the version of asteroid that our current version of pylint depends on. Until we bump pylint we need to pin wrapt=1.12.1.

After these changes running pip-compile-multi finishes successfully, and Superset appears to run smoothly. However, I decided not to commit the updated lock files in this PR, as this PR is just intended to fix the version conflicts (we can follow up with a full lock file bump later).

In addition, the dependency section in CONTRIBUTING.md is updated to reflect the workflows for 1) bumping a single python package 2) bumping all python deps.

AFTER

After the changes, bumping the lock files works correctly:

$ pip-compile-multi
Locking requirements/base.in to requirements/base.txt. References: []
Locking requirements/integration.in to requirements/integration.txt. References: []
Locking requirements/development.in to requirements/development.txt. References: ['requirements/base.in']
Locking requirements/docker.in to requirements/docker.txt. References: ['requirements/base.in']
Locking requirements/local.in to requirements/local.txt. References: ['requirements/base.in', 'requirements/development.in']
Locking requirements/testing.in to requirements/testing.txt. References: ['requirements/base.in', 'requirements/development.in', 'requirements/integration.in']
$

BEFORE

Previously running pip-compile-multi failed with an exception:

$ pip-compile-multi
Locking requirements/base.in to requirements/base.txt. References: []
Locking requirements/integration.in to requirements/integration.txt. References: []
Locking requirements/development.in to requirements/development.txt. References: ['requirements/base.in']
Locking requirements/docker.in to requirements/docker.txt. References: ['requirements/base.in']
Locking requirements/local.in to requirements/local.txt. References: ['requirements/base.in', 'requirements/development.in']
Package packaging was resolved to different versions in different environments: 21.3 and 21.0
Package pyparsing was resolved to different versions in different environments: 3.0.6 and 2.4.7
Traceback (most recent call last):
  File "/Users/ville/src/superset/venv/lib/python3.8/site-packages/pipcompilemulti/cli_v1.py", line 26, in cli
    recompile()
  File "/Users/ville/src/superset/venv/lib/python3.8/site-packages/pipcompilemulti/actions.py", line 30, in recompile
    compile_topologically(env_confs, deduplicator)
  File "/Users/ville/src/superset/venv/lib/python3.8/site-packages/pipcompilemulti/actions.py", line 38, in compile_topologically
    env = Environment(in_path=conf['in_path'], deduplicator=deduplicator)
  File "/Users/ville/src/superset/venv/lib/python3.8/site-packages/pipcompilemulti/environment.py", line 31, in __init__
    self.ignore = self._dedup.ignored_packages(in_path)
  File "/Users/ville/src/superset/venv/lib/python3.8/site-packages/pipcompilemulti/deduplicate.py", line 31, in ignored_packages
    return merged_packages(self.env_packages, rrefs)
  File "/Users/ville/src/superset/venv/lib/python3.8/site-packages/pipcompilemulti/utils.py", line 84, in merged_packages
    raise RuntimeError(
RuntimeError: Please add constraints for the package version listed above
$

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

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #17963 (6e87033) into master (3b5cee4) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17963   +/-   ##
=======================================
  Coverage   67.07%   67.07%           
=======================================
  Files        1609     1609           
  Lines       64905    64905           
  Branches     6868     6868           
=======================================
  Hits        43537    43537           
  Misses      19502    19502           
  Partials     1866     1866           
Flag Coverage Δ
hive 53.29% <ø> (ø)
mysql 82.19% <ø> (ø)
postgres 82.24% <ø> (ø)
presto 53.13% <ø> (ø)
python 82.68% <ø> (ø)
sqlite 81.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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 3b5cee4...6e87033. Read the comment docs.

@@ -19,3 +19,4 @@
pyrsistent>=0.16.1,<0.17
zipp==3.4.1
sasl==0.3.1
wrapt==1.12.1 # required by astroid<2.9 until we bump pylint
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be on testing.in then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch - As it turns out, wrapt is also required by deprecated, which in turn is pulled in by redis, so it appears we need this in base.in after all

@villebro villebro merged commit eeaa573 into apache:master Jan 7, 2022
@villebro villebro deleted the villebro/pip-compile-multi branch January 7, 2022 13:29
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
* chore: unbreak pip-compile-multi

* add docs
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
* chore: unbreak pip-compile-multi

* add docs
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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 size/M 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants