• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 34389402470
93%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 06:37PM UTC
Jobs 11
Files 1783
Run time 6min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2026 06:30PM UTC coverage: 92.898% (+0.003%) from 92.895%
34389402470

push

github

web-flow
Add `[coursier].jvm_options` to support custom CAs and proxies (#23629)

Coursier ships as a GraalVM native image. It bundles its own trust store
from build time and does not read the `HTTP_PROXY`/`HTTPS_PROXY`
environment variables, so a custom CA or proxy has to be supplied as JVM
system properties on Coursier's own command line. Pants offered no way
to pass those, so any environment behind a TLS-inspecting proxy, or
without direct internet access, could not use Pants' JVM support at all:
Coursier fails to fetch Maven artifacts, nailgun, or JDKs.

`[jvm].global_options` does not help, as it only reaches the JVM
processes Pants runs, not Coursier itself.

Add a `[coursier].jvm_options` option, injected at both places Coursier
is invoked:

* `COURSIER_FETCH_WRAPPER_SCRIPT`, between `"$coursier_exe"` and
`fetch`.
* `Coursier.args()`, between the exe path and the subcommand, which
covers `java-home` and therefore JDK provisioning.

Coursier only honors `-J` options that precede its subcommand, so they
cannot simply be appended to the existing args. `Coursier.args()`
deliberately skips the injection when a `wrapper` is passed: there the
exe path is consumed by the wrapper script as a positional argument, so
inserting options at that point would shift the wrapper's own arguments.
The fetch wrapper receives them via the template instead.

Values are prefixed with `-J` automatically when the caller omits it, so
both `-Dfoo=bar` and `-J-Dfoo=bar` work.

Validated end-to-end by dogfooding it on this repo. In a container with
no DNS resolver and egress only via an HTTP proxy, `./pants lint check`
fails outright: Coursier dies with `UnknownHostException` fetching
`ch.epfl.scala:scalafix-cli_2.13.12:0.11.1`. With
`[coursier].jvm_options` set to the proxy properties -- written without
the `-J` prefix, to exercise the normalization -- the same command
completes, with ruff, flake8, autoflake, preamble, visibility and mypy
all passing.

This PR was written primarily... (continued)

42 of 42 new or added lines in 2 files covered. (100.0%)

95620 of 102930 relevant lines covered (92.9%)

3.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_4/10 - 34389402470.1 09 Sep 2026 06:44PM UTC 1245
59.04
GitHub Action Run
2 test_python_linux_x86_64_3/10 - 34389402470.2 09 Sep 2026 06:40PM UTC 1214
52.38
GitHub Action Run
3 test_python_linux_x86_64_6/10 - 34389402470.3 09 Sep 2026 06:38PM UTC 1212
50.06
GitHub Action Run
4 test_python_linux_x86_64_0/10 - 34389402470.4 09 Sep 2026 06:41PM UTC 1236
57.47
GitHub Action Run
5 test_python_linux_x86_64_5/10 - 34389402470.5 09 Sep 2026 06:39PM UTC 1230
60.27
GitHub Action Run
6 test_python_linux_x86_64_7/10 - 34389402470.6 09 Sep 2026 06:41PM UTC 1219
50.46
GitHub Action Run
7 test_python_linux_x86_64_8/10 - 34389402470.7 09 Sep 2026 06:43PM UTC 1214
52.73
GitHub Action Run
8 test_python_linux_arm64 - 34389402470.8 09 Sep 2026 06:37PM UTC 1196
52.68
GitHub Action Run
9 test_python_linux_x86_64_2/10 - 34389402470.9 09 Sep 2026 06:39PM UTC 1215
58.58
GitHub Action Run
10 test_python_linux_x86_64_9/10 - 34389402470.10 09 Sep 2026 06:40PM UTC 1225
53.98
GitHub Action Run
11 test_python_linux_x86_64_1/10 - 34389402470.11 09 Sep 2026 06:40PM UTC 1215
48.87
GitHub Action Run
Source Files on build 34389402470
  • Tree
  • List 1783
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34389402470
  • b04b46fa on github
  • Prev Build on main (#33814103561)
  • Next Build on main (#34449929531)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc