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.14 to 2.15 #5899

Merged
merged 7 commits into from
Mar 2, 2023
Merged

Upgrade pants from 2.14 to 2.15 #5899

merged 7 commits into from
Mar 2, 2023

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Feb 10, 2023

Background

This is another part of introducing pants, as discussed in various TSC meetings.

Related PRs can be found in:

Overview of this PR

This updates to pants to 2.15.0 which requires:

  • regen the pants-plugins lockfile
  • several changes to our fmt and lint plugins in pants-plugins.

The required plugin updates are described in the pants Plugin upgrade guide.

Notes about updating to pants 2.15.0

Here are some links to learn more about pants v2.15:

NB: We must do updates 1 minor version of pants at a time so that pants update-build-files goal can handle any required updates before continuing. We want to go to 2.16, but the 2.15 update was significant enough that it deserves its own PR before jumping to 2.16.

Aside: As soon as the pants 2.16.0rc0 comes out, I want to switch to that one as we need some of the features in 2.16 like the new stevedore backend, and improvements to exporting virtualenvs based on lockfiles. That does not look like it will require extensive plugin upgrades like the 2.15 upgrade does.

The Fmt/Lint plugin API changed in pants 2.15

It now requires a Subsystem with a SkipOption. I took advantage of this to consolidate the constants and all the address and pex request definitions in the Subsystem subclass.

It now requires 2 rules instead of 1: to partition, then fmt/lint. That means the structure of the rule requests had to change slightly. The tests also had to account for the modified rules.

Refer to the Plugin upgrade guide for more details.

@cognifloyd cognifloyd added this to the pants milestone Feb 10, 2023
@cognifloyd cognifloyd self-assigned this Feb 10, 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 Feb 10, 2023
@cognifloyd cognifloyd marked this pull request as draft February 10, 2023 07:32
@cognifloyd

This comment was marked as outdated.

@cognifloyd cognifloyd force-pushed the pants-upgrade-2.15 branch 11 times, most recently from e1a2ed8 to 2ad24d3 Compare February 16, 2023 23:23
@cognifloyd cognifloyd force-pushed the pants-upgrade-2.15 branch 2 times, most recently from f05a11c to 2f5b886 Compare February 24, 2023 17:57
The Fmt/Lint plugin API changed in pants 2.15

It now requires a Subsystem with a SkipOption.
I took advantage of this to consolidate the constants and all
the address and pex request definitions in the Subsystem subclass.

It now requires 2 rules instead of 1: to partition, then fmt/lint.
That means the structure of the rule requests had to change
slightly. The tests also had to account for the modified rules.
The Fmt/Lint plugin API changed in pants 2.15

It now requires a Subsystem with a SkipOption.
I took advantage of this to consolidate the constants and all
the address and pex request definitions in the Subsystem subclass.

It now requires 2 rules instead of 1: to partition, then fmt/lint.
That means the structure of the rule requests had to change
slightly. The tests also had to account for the modified rules.
The Fmt/Lint plugin API changed in pants 2.15

It now requires a Subsystem with a SkipOption.
I took advantage of this to consolidate the constants and all
the address and pex request definitions in the Subsystem subclass.

It now requires 2 rules instead of 1: to partition, then fmt/lint.
That means the structure of the rule requests had to change
slightly. The tests also had to account for the modified rules.
@cognifloyd cognifloyd marked this pull request as ready for review February 26, 2023 03:25
pants-plugins/api_spec/rules.py Outdated Show resolved Hide resolved
pants-plugins/api_spec/rules.py Show resolved Hide resolved
pants-plugins/api_spec/rules.py Outdated Show resolved Hide resolved
pants-plugins/api_spec/rules.py Outdated Show resolved Hide resolved
pants-plugins/sample_conf/rules.py Show resolved Hide resolved
pants-plugins/schemas/rules.py Show resolved Hide resolved
@cognifloyd cognifloyd requested review from amanda11 and a team February 27, 2023 17:42
@cognifloyd
Copy link
Member Author

@amanda11. I adjusted the comments to hopefully clarify things. Look in the subsystem.py files to see where the script defintions moved.

@cognifloyd cognifloyd enabled auto-merge February 27, 2023 17:52
Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

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

Thanks for updating the comments

@cognifloyd cognifloyd requested a review from a team February 27, 2023 23:43
@cognifloyd cognifloyd merged commit 05ca9c5 into master Mar 2, 2023
@cognifloyd cognifloyd deleted the pants-upgrade-2.15 branch March 2, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 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.

3 participants