Skip to content

Fix ddev -x/--here repo type detection in worktrees#22715

Draft
nubtron wants to merge 5 commits intomasterfrom
nubtron/fix-ddev-here-repo-type-detection
Draft

Fix ddev -x/--here repo type detection in worktrees#22715
nubtron wants to merge 5 commits intomasterfrom
nubtron/fix-ddev-here-repo-type-detection

Conversation

@nubtron
Copy link
Contributor

@nubtron nubtron commented Feb 24, 2026

Summary

Fix ddev -x or ddev --herelogic so that repo identity comes from configured repo (core/extras/marketplace) instead of the directory name.

This misidentification commonly shows up when using Git worktrees, since worktree folders often don’t match the primary repo directory name (e.g., not named integrations-core).

One consequence is that model regeneration in integrations-core can incorrectly strip license headers.

Fix local -x/--here flows so worktrees detect the correct repo type (core/extras/marketplace) instead of inferring from directory name. Add regression tests for repo mapping and core model header preservation.
@nubtron nubtron added the qa/skip-qa Automatically skip this PR for the next QA label Feb 24, 2026
Rename the ddev towncrier fragment from 99999.fixed to 22715.fixed to match the opened PR.
@datadog-datadog-prod-us1-2

This comment has been minimized.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.76%. Comparing base (a426069) to head (6b6adf6).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nubtron nubtron changed the title Fix -x/--here repo type detection in worktrees Fix ddev -x/--here repo type detection in worktrees Feb 25, 2026
Apply ddev test --fmt output to the updated validate models regression test so linting passes cleanly.
Set repo_choice/repo_name in the ddev-to-legacy bridge before initialize_root so --here remains stable when DDEV_ROOT or leaked root state causes early return, and add regressions to isolate root state and cover the DDEV_ROOT path.
Run the --here + DDEV_ROOT test without --sync so it verifies repo metadata wiring without writing model files, while still accepting both in-sync and out-of-sync outcomes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ddev qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant