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

pantsbuild / pants / 26075932675 / 4
93%
main: 93%

Build:
DEFAULT BRANCH: main
Ran 19 May 2026 04:37AM UTC
Files 1186
Run time 42s
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

19 May 2026 04:19AM UTC coverage: 52.062% (+0.02%) from 52.041%
26075932675.4

push

github

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

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 scope

- `CoursierResolvedLo... (continued)

32001 of 61467 relevant lines covered (52.06%)

0.52 hits per line

Source Files on job test_python_linux_arm64 - 26075932675.4
  • Tree
  • List 1186
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26075932675
  • bf9bd54d on github
  • Prev Job for on main (#25989352722.1)
  • Next Job for on main (#26079765061.3)
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