fix: post-merge contrib followup — enable check and picker version inference#123
Merged
fix: post-merge contrib followup — enable check and picker version inference#123
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two bugs found during post-merge testing of #122 (drupal-contrib template):
Module enable check used drush exit code:
ddev drush enexits 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 rundrush enwith|| trueand verify actual enablement viapm: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", sodrupalMajorwas never updated and defaulted to"11". Both issues 3564112 and 3585397 havefield_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_versionparameter — it never runs picker JavaScript. The shell-based version inference indrupal-integration-test.ymlcorrectly mapped"main"→12all along; only the picker was broken. There is currently no test coverage fordocs/JavaScript.Test plan
field_issue_version = "main"issue — workspace should start with D12/PHP 8.5pm:listnot drush exit code)🤖 Generated with Claude Code