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

Add release notes for 2.21.x #20894

Merged
merged 27 commits into from
May 15, 2024
Merged

Add release notes for 2.21.x #20894

merged 27 commits into from
May 15, 2024

Conversation

huonw
Copy link
Contributor

@huonw huonw commented May 9, 2024

This writes out release notes for the 2.21.x branch, up to and including 54a36ea

#20846

@huonw huonw force-pushed the huonw/2.21-release-notes branch from 48c1e1e to f463812 Compare May 9, 2024 12:23
Comment on lines 13 to 17
### Highlights

- Automatic retries of tests for all built-in backends.
- Significant speed-ups when manipulating Python dependencies, especially huge ones like PyTorch.
- When a `pants test ...` run in CI fails, the summary now includes suggested invocation to copy-paste and re-run locally.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please suggest more highlights!

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm personally very excited for the buildx/cacheing work and the defaults fix, but I'm not sure they quiet qualify as global highlights.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the __defaults__ handling of target generators probably does, good call-out!

@huonw huonw marked this pull request as ready for review May 9, 2024 12:23
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
@huonw huonw requested a review from tdyas May 9, 2024 23:49
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
Comment on lines 13 to 17
### Highlights

- Automatic retries of tests for all built-in backends.
- Significant speed-ups when manipulating Python dependencies, especially huge ones like PyTorch.
- When a `pants test ...` run in CI fails, the summary now includes suggested invocation to copy-paste and re-run locally.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm personally very excited for the buildx/cacheing work and the defaults fix, but I'm not sure they quiet qualify as global highlights.

docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
docs/notes/2.21.x.md Outdated Show resolved Hide resolved
- All built-in backends now support the `[test].attempts_default` option to automatically retry tests.
- Significant speed-ups when manipulating Python dependencies, especially huge ones like PyTorch.
- When a `pants test ...` run in CI fails, the summary now includes suggested invocation to copy-paste and re-run locally.
- The `__defaults__` symbol now applies to targets generated by a target generator, in addition to targets written literally in BUILD files.
Copy link
Contributor

@grihabor grihabor May 14, 2024

Choose a reason for hiding this comment

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

I've just tried 2.21.0a0 and it slightly broke our expectations. We had

__defaults__(
    extend=True,
    all=dict(
        # This will set PYTHON_IMAGE build arg in all docker images by default.
        extra_build_args=["PYTHON_IMAGE=python:3.11"],
        # This will tell pants that all python sources need to use python 3.11 by default.
        interpreter_constraints=["==3.11.*"],
    ),
)

and the error message was kinda weird:

stderr:
<string> line 1:
PYTHON_IMAGE=python:3.11
Problem parsing 'PYTHON_IMAGE=python:3.11' as a requirement: Expected end or semicolon (after name and no valid version specifier)
    PYTHON_IMAGE=python:3.11
                ^

now we have to do

__defaults__(
    {
        (docker_image,): dict(
            # This will set PYTHON_IMAGE build arg in all docker images by default.
            extra_build_args=["PYTHON_IMAGE=python:3.11"],
        )
    },
    all=dict(
        # This will tell pants that all python sources need to use python 3.11 by default.
        interpreter_constraints=["==3.11.*"],
    ),
    extend=True,
)

This happened because pex_binary.extra_build_args was added, and it has the same name as docker_image.extra_build_args. Maybe it's good to add a note about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've just tried 2.21.0a0 and it slightly broke our expectations

Thanks for trying! Did you find some other issues or was it otherwise okay?

This happened because pex_binary.extra_build_args was added, and it has the same name as docker_image.extra_build_args. Maybe it's good to add a note about it

I think that'll be an issue with the addition of extra_build_args to pex_binary that you've identified, rather than with this __defaults__ change. I guess it's unlucky they have the same name but different meanings... but this is somewhat fundamental to __defaults__(all=...). I've filed #20925.

I'll add a note to the release notes too.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for finding this @grihabor!

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you find some other issues or was it otherwise okay?

No, it's the only thing

I'll add a note to the release notes too.

👍

@huonw
Copy link
Contributor Author

huonw commented May 15, 2024

I'm going to merge this, further feedback still accepted! E.g. a comment here or even a PR directly against the notes.

Thanks all for the reviews!

@huonw huonw merged commit fa60552 into main May 15, 2024
25 checks passed
@huonw huonw deleted the huonw/2.21-release-notes branch May 15, 2024 01:44
@WorkerPants
Copy link
Member

I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants.

❌ 2.21.x

I was unable to cherry-pick this PR to 2.21.x, likely due to merge-conflicts.

Steps to Cherry-Pick locally

To resolve:

  1. (Ensure your git working directory is clean)
  2. Run the following script to reproduce the merge-conflicts:
    git fetch https://github.com/pantsbuild/pants main \
      && git fetch https://github.com/pantsbuild/pants 2.21.x \
      && git checkout -b cherry-pick-20894-to-2.21.x FETCH_HEAD \
      && git cherry-pick fa60552d2620457e249e93a64b73f1e42834da2f
  3. Fix the merge conflicts and commit the changes
  4. Run build-support/cherry_pick/make_pr.sh "20894" "2.21.x"

Please note that I cannot re-run CI if a job fails. Please work with your PR approver(s) to re-run CI if necessary.


When you're done manually cherry-picking, please remove the needs-cherrypick label on this PR.

Thanks again for your contributions!

🤖 Beep Boop here's my run link

@WorkerPants WorkerPants added the auto-cherry-picking-failed Auto Cherry-Picking Failed label May 15, 2024
huonw added a commit that referenced this pull request May 15, 2024
This writes out release notes for the 2.21.x branch, up to and including
54a36ea

---------

Co-authored-by: SJ <[email protected]>
@huonw huonw removed the auto-cherry-picking-failed Auto Cherry-Picking Failed label May 15, 2024
huonw added a commit that referenced this pull request May 15, 2024
This writes out release notes for the 2.21.x branch, up to and including
54a36ea


#20846

Co-authored-by: SJ <[email protected]>
@huonw huonw added auto-cherry-picking-failed Auto Cherry-Picking Failed and removed needs-cherrypick labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants