Skip to content

fix: post-merge contrib followup — enable check and picker version inference#123

Merged
rfay merged 2 commits intomainfrom
20260506_contrib_followup
May 6, 2026
Merged

fix: post-merge contrib followup — enable check and picker version inference#123
rfay merged 2 commits intomainfrom
20260506_contrib_followup

Conversation

@rfay
Copy link
Copy Markdown
Member

@rfay rfay commented May 6, 2026

Summary

Two bugs found during post-merge testing of #122 (drupal-contrib template):

  • Module enable check used drush exit code: ddev drush en exits non-zero when a post-install hook in another module throws a PHP fatal (e.g. update_storage_clear() missing in the installed Drupal version), even though the target module is fully enabled. The template was logging a false warning and the CI grep was failing. Now we run drush en with || true and verify actual enablement via pm:list --status=enabled.

  • Picker chose D11 for field_issue_version = "main" issues: The core issue picker's regex ^(\d+)\. does not match the string "main", so drupalMajor was never updated and defaulted to "11". Both issues 3564112 and 3585397 have field_issue_version = "main" (the Drupal 12+ development branch). The CI shell inference already handled this correctly via || echo "12"; this aligns the picker JavaScript with that behaviour.

Why CI didn't catch the picker bug

The CI tests template execution given a drupal_version parameter — it never runs picker JavaScript. The shell-based version inference in drupal-integration-test.yml correctly mapped "main"12 all along; only the picker was broken. There is currently no test coverage for docs/ JavaScript.

Test plan

  • Open the core issue picker, paste a URL for issue 3564112 or 3585397 — Drupal version should auto-select 12, not 11
  • Create a workspace from the picker with a field_issue_version = "main" issue — workspace should start with D12/PHP 8.5
  • Verify CI drupal-contrib plain jobs pass (module enabled check now uses pm:list not drush exit code)

🤖 Generated with Claude Code

rfay and others added 2 commits May 6, 2026 17:04
ddev drush en exits non-zero when a post-install hook in another module
throws a fatal error (e.g. update_storage_clear() missing in the installed
Drupal version), even though the target module is fully enabled. Trusting
the exit code produces a false warning.

Now we run drush en with || true and confirm enablement by checking
pm:list --status=enabled. This also adds update_status() output so the
result is visible in SETUP_STATUS.txt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When field_issue_version is 'main' the leading-digit regex doesn't match,
leaving drupalMajor at the form default (11). 'main' is the Drupal 12+
development branch, so map it explicitly to '12'.

The CI shell inference already handled this correctly via || echo '12';
this aligns the picker JavaScript with that behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rfay rfay merged commit 1ce42bf into main May 6, 2026
15 checks passed
@rfay rfay deleted the 20260506_contrib_followup branch May 6, 2026 23:28
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