Skip to content

cli: filter artifacts with typed dimension calls - #14467

Merged
grouville merged 4 commits into
mainfrom
cli-typed-artifact-filters
Oct 6, 2026
Merged

grouville merged 4 commits into
mainfrom
cli-typed-artifact-filters

Conversation

@shykes

@shykes shykes commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

The CLI sent dimension flags (dagger check --<dimension>=foo) as a URI string to filterUri. The engine parsed the string back and called filterDimensions / filterDimensionKeys.

Now the CLI calls filterDimensions / filterDimensionKeys directly. It also:

  • uses filterPathPattern for path patterns, not filterUri;
  • removes dead code and useless tests.

@shykes
shykes force-pushed the cli-typed-artifact-filters branch 2 times, most recently from 0583026 to beb9096 Compare October 6, 2026 05:07
shykes added 4 commits October 5, 2026 23:01
The CLI turned dimension flags and address queries into a URI string
and called filterUri. The engine then parsed the string back into the
same pairs and called filterDimensions and filterDimensionKeys.

Call filterDimensions and filterDimensionKeys directly. Type names
still go through filterUri: only the engine can map them to concrete
types.

Remove the unit test assertions on the exact GraphQL query text.
Integration tests in core/integration/collections_test.go cover the
behavior.

Signed-off-by: Solomon Hykes <[email protected]>
- applyArtifactFilters: remove the flags parameter. Its only caller
  passed nil.
- Use filterPathPattern for path patterns, not filterUri. A "?" in the
  workspace entrypoint no longer starts a query.
- Remove tests that cannot fail, and tests that repeat dagaddress and
  artifact.Dimensions tests.

Signed-off-by: Solomon Hykes <[email protected]>
Move the empty dimension key case into TestArtifactDimensionHelp, which
uses the real flag registration.

Signed-off-by: Solomon Hykes <[email protected]>
- Inline filterArtifactTypeNames into filterArtifactAddress.
- Filter the parsed address in place. The copy only existed to clear
  the path.
- Remove a duplicate comment and a stale one.

Signed-off-by: Solomon Hykes <[email protected]>
@shykes
shykes force-pushed the cli-typed-artifact-filters branch from beb9096 to 831f199 Compare October 6, 2026 06:02
@grouville
grouville self-requested a review October 6, 2026 07:33
@grouville
grouville merged commit adc704a into main Oct 6, 2026
90 checks passed
@grouville
grouville deleted the cli-typed-artifact-filters branch October 6, 2026 07:33
TomChv added a commit to dagger/typescript-sdk that referenced this pull request Oct 9, 2026
`checksCheck` runs the whole suite inside an engine that is itself inside
one, with `dagger check` uncapped — so every check starts at once. The cheap
ones finish and the remaining ~50, each building containers or running a
registry service, sit in flight together until the inner engine is killed:
`Post "http://dagger/query": unexpected EOF`, `connection reset by peer`, or
a run cancelled for exceeding its time budget. Seen on three PRs in a row,
each adding a check or two to a suite that was already at the ceiling, while
the same suite passes on main.

The failure is also disguised: when the inner engine dies the CLI prints
every check still running as passed, with identical durations, so the trace
ends in a green summary under a red exec.

`-j` arrived in dagger/dagger#14467 (2026-10-06) and the engine-dev pin was
cbf69413 (2026-09-29), so the flag has to come with the pin: on the old one
`dagger check` exits on an unknown flag before running anything. The pin
moves to 55e112468d — the engine this SDK's own verification runs against,
and 10 days less stale. engine-e2e still loads and type-checks against
engine-dev at that revision, and the playground's workspace.lock is
unchanged by the newer engine.

`-j 12` is a calibration point rather than a measurement — the suite died
with ~50 in flight and passes on main with fewer checks than that. The
docstring says which way to move it, and notes splitting the suite into
per-group checks as the alternative that gives each part its own time budget.

Signed-off-by: Tom Chauveau <[email protected]>
TomChv added a commit to dagger/typescript-sdk that referenced this pull request Oct 9, 2026
`checksCheck` runs the whole suite inside an engine that is itself inside
one, with `dagger check` uncapped — so every check starts at once. The cheap
ones finish and the remaining ~50, each building containers or running a
registry service, sit in flight together until the inner engine is killed:
`Post "http://dagger/query": unexpected EOF`, `connection reset by peer`, or
a run cancelled for exceeding its time budget. Seen on three PRs in a row,
each adding a check or two to a suite that was already at the ceiling, while
the same suite passes on main.

The failure is also disguised: when the inner engine dies the CLI prints
every check still running as passed, with identical durations, so the trace
ends in a green summary under a red exec.

`-j` arrived in dagger/dagger#14467 (2026-10-06) and the engine-dev pin was
cbf69413 (2026-09-29), so the flag has to come with the pin: on the old one
`dagger check` exits on an unknown flag before running anything. The pin
moves to 55e112468d — the engine this SDK's own verification runs against,
and 10 days less stale. engine-e2e still loads and type-checks against
engine-dev at that revision, and the playground's workspace.lock is
unchanged by the newer engine.

`-j 12` is a calibration point rather than a measurement — the suite died
with ~50 in flight and passes on main with fewer checks than that. The
docstring says which way to move it, and notes splitting the suite into
per-group checks as the alternative that gives each part its own time budget.

Signed-off-by: Tom Chauveau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants