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

pantsbuild / pants / 26136393613 / 9
93%
main: 93%

Build:
Build:
LAST BUILD BRANCH: gfast/fix-broken-link
DEFAULT BRANCH: main
Ran 20 May 2026 02:11AM UTC
Files 1190
Run time 34s
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

20 May 2026 01:52AM UTC coverage: 49.163%. Remained the same
26136393613.9

push

github

web-flow
Restore missing-entry guard in CoursierResolvedLockfile.dependencies() (regression from #22906) (Cherry-pick of #23341) (#23358)

Disclaimer: I used Claude Code to evaluate and confirm comments from
#23328. Basically, part of #22906 needs to be reverted.

Okay, now here's Claude:

## Summary

Fixes a `KeyError` regression introduced by #22906 that breaks `pants
check` (and other JVM goals) on lockfiles whose entries reference a
transitive dependency that has no top-level coord entry of its own.

#22906 bumped Coursier to v2.1.24 to pick up the fix for
[coursier#2884](https://github.com/coursier/coursier/issues/2884) and,
on the assumption that the only remaining "missing entry" cases would be
parent POMs (`classifier="pom"`), simplified
`CoursierResolvedLockfile.dependencies()` to do a direct dict lookup
instead of an `entries.get(...)` guard. That assumption turns out to be
wrong: even fresh resolves with the latest Coursier (verified against
v2.1.25-M19) still emit transitive deps without a coord entry — e.g.
`("org.apache.curator", "apache-curator", None)` when resolving
`org.apache.hive:hive-exec:1.1.0`, or `("org.apache.arrow",
"arrow-memory", None)` in the user-reported repro on `hive-exec:3.1.3`.
Both have `classifier=None`, so the `if d.classifier != "pom"` filter
doesn't catch them, and the unguarded lookup raises `KeyError`.

This restores the pre-#22906 `entries.get(...)` skip and adds the
bug-report repro as a regression test.

## Changes

- `src/python/pants/jvm/resolve/coursier_fetch.py`: restore the
`entries.get(...)` guard in `dependencies()`; update the comment to
reflect that #2884-style missing entries are still observable on current
Coursier.
- `src/python/pants/jvm/resolve/coursier_fetch_test.py`: add
`test_dependencies_skips_transitive_entries_missing_from_lockfile` — the
exact fixture from the bug report. Without the fix it reproduces
`KeyError: ('org.apache.arrow', 'arrow-memory', None)`; with the fix it
passes.

## Out of scop... (continued)

30026 of 61075 relevant lines covered (49.16%)

0.49 hits per line

Source Files on job test_python_linux_x86_64_1/10 - 26136393613.9
  • Tree
  • List 1190
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26136393613
  • 7b1060c8 on github
  • Prev Job for on 2.32.x (#26003130963.12)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc