Skip to content

Latest commit

 

History

History
113 lines (61 loc) · 9.26 KB

2.27.x.md

File metadata and controls

113 lines (61 loc) · 9.26 KB

2.27.x Release Series

Pants is a fast, scalable, user-friendly build system for codebases of all sizes.

Pants is an open-source project that is not owned or controlled by any one company or organization, and does incur some expenses. These expenses are managed by Pants Build, a non-profit that was established for this purpose. This non-profit's only source of revenue is sponsorship by individuals and companies that use Pants.

We offer formal sponsorship tiers for companies, as well as individual sponsorships via GitHub.

Thank you to Klaviyo for their Platinum tier support through throughout this release.

What's New

Highlights

  • A "sandboxer" feature to prevent a longstanding concurrency issue when writing out a binary and then executing it.
  • Support for formatting typescript and tsx files with Prettier.
  • Support for Trivy scanning of Dockerfiles and Helm charts.
  • Fix for Terraform state mismatches due to caching.
  • Finer concurrency control for process execution in plugins.

Deprecations

The deprecation has expired for the [GLOBAL].native_options_validation option and it has been removed. The option already has no effect and can be safely deleted.

The deprecation has expired for the [GLOBAL].allow_deprecated_macos_before_12 option and it has been removed. The functionality has been replaced by the [GLOBAL].allow_deprecated_macos_versions option.

General

This version introduces a new feature, the "sandboxer", to address a longstanding concurrency issue. The sandboxer is a sidecar process that materializes files into execution sandboxes on behalf of the pantsd process. This avoids a ETXTBSY error when executing a binary that may have open write file handles held by another process. The sandboxer is off by default, for now, but can be enabled by setting sandboxer = True in the [GLOBAL] section of pants.toml, or by running pants with the --sandboxer flag. We would very much like feedback on this feature, if you have encountered the concurrency issue mentioned above.

Changing the --keep-sandboxes=... option no longer forces the Pantsd daemon to restart.

Include a summary of which initialization options changed in Pantsd daemon restart logs.

The Pants install now includes the hdrhistogram dependency automatically, and thus statistics logging (as enabled by the [stats].log option) includes histograms of metrics by default. If this is too verbose, consider redirecting to a file by default using the [stats].output_file option. This change means hdrhistogram does not need to be included in the [GLOBAL].plugins option: this was previously required to see histograms (and recommended by docs like "Using Pants in CI"), but is no longer necessary.

The workunit-logger will now log a stub with with "json_serializable": False for workunit metadata that can not be serialized instead of halting the process.

Process workunits now include local and remote digests for the action and command digests (eg remote_action_digest) in their artifacts when the local filesystem or a remote cache is used. The contents of the digests can be inspected using fs_util for debugging purposes.

Fixed a bug where missing docker_environment containers (i.e. containers killed or remove by some outside process) break pantsd and requires a pantsd restart. Now pants will attempt to start a new container for the docker_environment.

Fixed a UnicodeDecodeError in Git commands with non UTF-8 output. Internal Git calls now return raw bytes and callers decode when needed.

New call-by-name syntax for @rules

Pants has a new mechanism for @rule invocation in backends. In this release the following backends were migrated to use this new mechanism. There should not be any user-visible effects, but please be on the lookout for any unusual bugs or error messages.

Goals

Backends

Docker

The [dockerfile-parser].use_rust_parser option now defaults to true, meaning, by default, Dockerfiles are now parsed using the native Rust-based parser, which is faster and requires no external dependencies. The old parser is deprecated and will be removed in a future version of Pants.

Run Trivy on Dockerfiles to scan for vulnerable packages.

Helm

Run Trivy on Helm Charts and deployments to scan for misconfigurations.

Javascript

Added support for formatting typescript and tsx files with Prettier.

Fixed a bug where pnpm-workspaces.yaml could affect NPM or Yarn projects - it should be ignored.

Allow extra env vars during nodejs invocations through the [nodejs].extra_env_vars option and/or the extra_env_vars field on package_json targets.

Python

The Pex tool has been upgraded from 2.33.4 to 2.37.0 by default. Among other changes this includes support for Pip 25.1.

The Ruff tool has been upgraded from 0.11.0 to 0.11.5 by default.

In the [ruff] subsystem, the deprecations have expired for these options and thus they have been removed: install_from_resolve, requirements, interpreter_constraints, consnole_script, entry_point. The removed options already have no effect (they're replaced by the version and known_versions options), and can be safely deleted .

The Python Build Standalone backend (pants.backend.python.providers.experimental.python_build_standalone) has release metadata current through PBS release 20250610.

Packaging a pex_binary target for a local interpreter (that is, without complete_platforms) now works when using a Python provider like pants.backend.python.providers.experimental.python_build_standalone or pants.backend.python.providers.experimental.pyenv.

The default module mappings now includes the hdrhistogram package (imported as hdrh).

If a sandbox for executing mypy is preserved, the __run.sh script now refers to the main script by a relative path and can thus be successfully executed.

S3

The S3 backend now uses Signature Version 4 for signing requests, allowing use of KMS encrypted objects in S3. The HMACV1 signing can be enabled by setting the [s3-url-handler].auth_signing option to hmacv1.

Shell

The shell backend now has far less overhead when parsing shell imports on macOS: the shellcheck executable is now hard-linked into sandboxes, which side-steps Gatekeeper checks on macOS (when enabled, as they are by default) that made concurrent executions behave as if they were run sequentially.

Terraform

Now supports codegen for module dependencies. Dependencies may specify a target that generates a file that is consumed by the terraform module.

Now terraform init is run in the same invocation as commands which depend on it. This should resolve an issue for users of remote caches where the Terraform provider cache is not initialised on different nodes.

Run Trivy on Terraform modules and deployments to scan for misconfigurations.

Plugin API changes

  • Processes can now specify their concurrency requirements, influencing when Pants will execute them. Use exclusive to be the only running process, exactly(n) to require exactly n cpu cores, or range(max=n, min=1) to accept a value between min and max which is templated into the process's argv as {pants_concurrency}. The concurrency field supersedes the concurrency_available field, which will be deprecated in the future.

Full Changelog

For the full changelog, see the individual GitHub Releases for this series: https://github.com/pantsbuild/pants/releases