Skip to content

Restore test coverage and constraints fix dropped by stale rebase#1101

Closed
cpuguy83 wants to merge 1 commit into
project-dalec:mainfrom
cpuguy83:cpuguy83/restore-rebase-dropped-coverage
Closed

Restore test coverage and constraints fix dropped by stale rebase#1101
cpuguy83 wants to merge 1 commit into
project-dalec:mainfrom
cpuguy83:cpuguy83/restore-rebase-dropped-coverage

Conversation

@cpuguy83

@cpuguy83 cpuguy83 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

What this does

Restores test coverage and a constraints fix that were silently dropped when #898 ("Move spec tests into the LLB graph") merged. That PR was developed on a very old branch, so the rebase/merge reverted newer main work the branch body never carried — with no replacement.

test/linux_target_test.go

  • Restores testLinuxSpec and testDepsOnly plus ~31 subtests that were on main but absent from the merged result: gomod replace/go-work/vendor/subpath handling, container-image checks, distro upgrade/dpkg behaviors, source/patch ordering, package-test suites, cache-key assertions, and multiline-env coverage.
  • Drops ~105 lines of stale, resurrected pre-merge code and the spurious mariner2 target entry the rebase reintroduced.
  • Preserves the legit later edits that touched this file: BuildKit error stack-trace formatting (stack.Formatter, %+v) and the azlinux4 target entry.

targets/linux/rpm/distro/pkg.go

  • Re-adds DnfInstallWithConstraints(opts) to InstallTestDeps and hoists the "Install test dependencies" progress group above the returned closure, restoring the constraints propagation added in Add missing constraints propagation and verify propagation in tests #925. Without this, constraints (including progress-group metadata) aren't propagated to the dnf operations that install test dependencies.

PR project-dalec#898 was rebased from a branch that had already dropped landed work
relative to its own fork point; the squash-merge faithfully applied that
stale state and silently reverted the changes below while still landing
PR project-dalec#898's legitimate work. This restores what was lost without disturbing
those legitimate changes.

test/linux_target_test.go:
- Restore the testLinuxSpec spec-defaults refactor and the testDepsOnly
  and testLinuxSpec helpers, recovering the subtests in testLinuxDistro
  that were reverted (t.Run coverage goes back from 54 to ~90).
- Preserve main's later work that must not regress: the in-graph LLB
  testLinuxPackageTestsFail rewrite, the SubPath/Value fixtures, the
  azlinux4/mariner2 target maps, and the stack.Formatter error
  annotations.

targets/linux/rpm/distro/pkg.go:
- Restore the project-dalec#925 fix in InstallTestDeps: install test dependencies with
  DnfInstallWithConstraints and append the ProgressGroup before building
  the install closure so the repo mounts inherit it.

Trade-off: the pkg.go change is behavioral and main currently passes CI
without it, but it was part of the work originally landed in project-dalec#925 and
dropped by the same bad rebase, so it is restored here alongside the
tests rather than left silently reverted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the cpuguy83/restore-rebase-dropped-coverage branch from c27cb0b to dc38939 Compare June 16, 2026 20:35
@cpuguy83 cpuguy83 closed this Jun 16, 2026
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.

1 participant