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

Upgrade pants from 2.16.0a0 to 2.16.0rc0 #5950

Merged
merged 6 commits into from
Apr 13, 2023
Merged

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Mar 31, 2023

This depends on:

This is a follow-up for:

See that issue for details about other changes that we have already adjusted to in pants 2.16.

A significant change landed between 2.16.0a0 and 2.16.0rc0: tool (black, flake8, pytest, etc) lockfiles were refactored so that and some of the old options used to populate them were deprecated. We could use 2.16 without regenerating the lockfiles, but the deprecation notices are noisy and using the refactored lockfiles feels more consistent.

Now, instead of defining tool versions in pants.toml, where we had to duplicate those versions in some BUILD files like pylint_plugins/BUILD, we can now have a use BUILD files as the single source of truth for all tool versions. To keep the root BUILD file from getting large and unweildy, I used a new BUILD.tools lockfile to store all of these tool versions.

Another benefit of this upgrade is: There is no difference between "tool" and "user" lockfiles now. That means we only have one pylint resolve+lockfile instead of pylint (for the tool) and pylint_plugins (for our in-repo plugin code).

Summary of lockfile changes

copied from the commit descriptions

Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  importlib-metadata             6.0.0        -->   6.1.0
  pantsbuild-pants               2.16.0a0     -->   2.16.0rc0
  pantsbuild-pants-testutil      2.16.0a0     -->   2.16.0rc0
  pex                            2.1.126      -->   2.1.130
  • drop unused lockfiles/pylint_plugins.lock
Lockfile diff: lockfiles/black.lock [black]

==                    Upgraded dependencies                     ==

  mypy-extensions                0.4.3        -->   1.0.0

Lockfile diff: lockfiles/bandit.lock [bandit]

==                    Upgraded dependencies                     ==

  pbr                            5.11         -->   5.11.1

Lockfile diff: lockfiles/twine.lock [twine]

==                    Upgraded dependencies                     ==

  cryptography                   38.0.4       -->   40.0.1
  pkginfo                        1.9.2        -->   1.9.6
  pygments                       2.13         -->   2.14.0
  urllib3                        1.26.13      -->   1.26.15

==                !! Downgraded dependencies !!                 ==

  bleach                         5.0.1        -->   4.1.0
  charset-normalizer             2.1.1        -->   2.0.12
  colorama                       0.4.6        -->   0.4.5
  docutils                       0.19         -->   0.18.1
  importlib-metadata             5.1          -->   4.8.3
  jeepney                        0.8          -->   0.7.1
  keyring                        23.11        -->   23.4.1
  readme-renderer                37.3         -->   34.0
  requests                       2.28.1       -->   2.27.1
  rfc3986                        2            -->   1.5.0
  typing-extensions              4.4          -->   4.1.1
  zipp                           3.11         -->   3.6.0

==                      Added dependencies                      ==

  importlib-resources            5.4.0
  packaging                      21.3
  pyparsing                      3.0.7

==                     Removed dependencies                     ==

  jaraco-classes                 3.2.3
  more-itertools                 9

Lockfile diff: lockfiles/pytest.lock [pytest]

==                    Upgraded dependencies                     ==

  attrs                          22.1         -->   22.2.0
  icdiff                         2.0.5        -->   2.0.6
  pygments                       2.13         -->   2.14.0

@cognifloyd cognifloyd added this to the pants milestone Mar 31, 2023
@cognifloyd cognifloyd self-assigned this Mar 31, 2023
@pull-request-size pull-request-size bot added the size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several. label Mar 31, 2023
Copy link
Member Author

Choose a reason for hiding this comment

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

We are using BUILD, and as a general rule using only that is good. Pants supports BUILD.*, and I think it helped to cleanly separate concerns between BUILD (for our code) and BUILD.tools (for the tools resolves/requirements).

@cognifloyd cognifloyd force-pushed the pants-upgrade-2.16 branch 2 times, most recently from 5b5ee7e to 4026143 Compare April 1, 2023 19:02
@cognifloyd cognifloyd changed the title Upgrade pants from 2.16.0a0 to 2.16.0a1 Upgrade pants from 2.16.0a0 to 2.16.0rc0 Apr 1, 2023
Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  importlib-metadata             6.0.0        -->   6.1.0
  pantsbuild-pants               2.16.0a0     -->   2.16.0rc0
  pantsbuild-pants-testutil      2.16.0a0     -->   2.16.0rc0
  pex                            2.1.126      -->   2.1.130
We create new resolves for each tool instead of using the implicit
tool resolve which has been deprecated. Now all of the tool requirements
are defined in //BUILD.tools instead of //pants.toml

lockfile regen will go in the next commit.
Lockfile diff: lockfiles/black.lock [black]

==                    Upgraded dependencies                     ==

  mypy-extensions                0.4.3        -->   1.0.0

Lockfile diff: lockfiles/bandit.lock [bandit]

==                    Upgraded dependencies                     ==

  pbr                            5.11         -->   5.11.1

Lockfile diff: lockfiles/twine.lock [twine]

==                    Upgraded dependencies                     ==

  cryptography                   38.0.4       -->   40.0.1
  pkginfo                        1.9.2        -->   1.9.6
  pygments                       2.13         -->   2.14.0
  urllib3                        1.26.13      -->   1.26.15

==                !! Downgraded dependencies !!                 ==

  bleach                         5.0.1        -->   4.1.0
  charset-normalizer             2.1.1        -->   2.0.12
  colorama                       0.4.6        -->   0.4.5
  docutils                       0.19         -->   0.18.1
  importlib-metadata             5.1          -->   4.8.3
  jeepney                        0.8          -->   0.7.1
  keyring                        23.11        -->   23.4.1
  readme-renderer                37.3         -->   34.0
  requests                       2.28.1       -->   2.27.1
  rfc3986                        2            -->   1.5.0
  typing-extensions              4.4          -->   4.1.1
  zipp                           3.11         -->   3.6.0

==                      Added dependencies                      ==

  importlib-resources            5.4.0
  packaging                      21.3
  pyparsing                      3.0.7

==                     Removed dependencies                     ==

  jaraco-classes                 3.2.3
  more-itertools                 9

Lockfile diff: lockfiles/pytest.lock [pytest]

==                    Upgraded dependencies                     ==

  attrs                          22.1         -->   22.2.0
  icdiff                         2.0.5        -->   2.0.6
  pygments                       2.13         -->   2.14.0
@cognifloyd cognifloyd marked this pull request as ready for review April 11, 2023 18:34
@cognifloyd cognifloyd requested a review from a team April 13, 2023 18:34
@cognifloyd cognifloyd merged commit b9aec99 into master Apr 13, 2023
@cognifloyd cognifloyd deleted the pants-upgrade-2.16 branch April 13, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependency pantsbuild size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants