feat: add drupal-contrib template with beta unified issue picker, fixes #59#122
Merged
feat: add drupal-contrib template with beta unified issue picker, fixes #59#122
Conversation
fixes #59 - New drupal-contrib Coder template: clones any drupal.org project, installs Drupal as a dev dependency via ddev-drupal-contrib addon, enables the module/ theme, and supports optional issue fork checkout. Uses port 8080. - Drupal site sharing parameter (owner/authenticated/public, default owner, mutable) added to both drupal-contrib and drupal-core templates so developers can share a work-in-progress without it being public by default. - Picker (docs/drupal-issue.html) extended to handle core and contrib: detects project type from drupal.org API, routes to the correct template, adds plain contrib dev form (no issue), template badges, and ?coder= override for local testing against staging. - Makefile, README.md, docs/index.html, docs/user/quickstart.md updated for drupal-contrib. - CI workflow drupal-contrib-integration-test.yml added (matrix of token/D11 and pathauto/D11, optional issue-fork job). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Models drupal-core/scripts/test-issue-branches.sh but exercises the contrib workflow: clone project, optional issue fork checkout, ddev poser, drush si, module enable, and DB/module status verification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ddev config global call was wrong: the startup script inside a Coder workspace already configures omit-containers, making it redundant there, and running the script locally would harmfully overwrite the developer's own global DDEV config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move the new contrib+core picker to drupal-contrib-picker.html (defaults to staging-coder.ddev.com so testers hit the right environment). Restore docs/drupal-issue.html to the original core-only version from main. Add beta card to docs/index.html linking to the new picker. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
Testing the beta pickerThe htmlpreview link in the original version of this comment does not work — htmlpreview strips The picker can be tested after this PR is merged, when GitHub Pages deploys it to: https://start.coder.ddev.com/drupal-contrib-picker The picker defaults to
Issue #121 tracks the final promotion step: once validated on staging, replace |
mock_data coder_parameter returns value="[]" for all parameters; "[]" is not a valid coder_app share value. Route through a local that falls back to "owner" for any unrecognised value so terraform test plan_succeeds_with_defaults passes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…kflows New commits on a PR were queuing behind running jobs instead of cancelling them, blocking the self-hosted sysbox runners. Matches the pattern already used in integration-test.yml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
run_id is now 11+ digits causing workspace names to exceed Coder's 32-character limit (e.g. ci-contrib-pathauto-d11-25459356799 = 35 chars). run_number is 3-4 digits and unique per workflow; combined with run_attempt it remains unique across reruns. Affects all three integration test workflows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CONTRIB_TEST_ISSUE_FORK was set to 'token-2648180' but the resolve step was prepending the project name again, producing token-token-2648180. Now strips the prefix if present so both '2648180' and 'token-2648180' work as the repo variable value. Job title trimmed — the raw variable value in the name template was being truncated by GitHub when it included the prefixed issue number. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New mutable parameter has no default that coder create can infer, so the CLI was prompting interactively and stalling the job. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drupal template changes don't affect user-defined-web or freeform templates. Skipping saves 2 sysbox runner slots so Drupal integration tests can start immediately rather than queuing behind unrelated jobs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Old issues (8.x, 9.x era) return an unsupported major version from field_issue_version. Clamp to 11 so the template parameter validation doesn't fail. The test issue (CONTRIB_TEST_ISSUE_FORK) should also be updated to a current D11/D12 issue in the repo variables. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…able log - Re-add Drupal version clamping (8.x/9.x → 11) lost in file revert - CI module check: use --format=list + grep -ix for exact machine-name match - Template: only log '✓ enabled' on actual success; warning was printing alongside success message due to unconditional log_setup call Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
field_issue_version for contrib modules is the MODULE version (e.g. "8.x-1.x" for token module 1.x), not the Drupal core version. Using it to infer the Drupal core version was fundamentally wrong. Default to Drupal 11 for issue fork tests. Add CONTRIB_TEST_DRUPAL_VERSION repo variable override for cases where a different core version is needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…issues For contrib modules, field_issue_version is the MODULE version (e.g. 8.x-1.x for token module 1.x), not the Drupal core version. Only apply the version extraction for core issues where field_issue_version actually contains the Drupal core target (e.g. 11.x-dev). Also removes the partial band-aid that only caught drupalMajor === 12. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…check race - Use ddev -p <project> instead of bash -c 'cd && ddev' for all drush steps - Pass git -C directly to coder ssh without bash -c wrapper - Move issue-fork branch check to after Drush DB check to avoid race with the non-blocking startup script still doing git operations - Add 'Dump setup status' step (if: always()) to both jobs so SETUP_STATUS.txt is visible in CI logs when module enable or other phases fail - Declare ISSUE_BRANCH/ISSUE_NUMBER/ISSUE_FORK_VERSION in job env block to satisfy the GitHub Actions context-access linter - Document CI scripting rule in CLAUDE.md: no bash -c for nontrivial commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ddev has no -p/--project flag. Use 'env -C <dir> ddev drush ...' to set the working directory without a shell wrapper. Update CLAUDE.md accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Dump last 30 lines of /tmp/drupal-setup.log in the setup-status step so we can see enable/cache-rebuild results, not just SETUP_STATUS.txt - Capture and print the full enabled-modules list before grepping so the actual drush output is visible when the check fails - Switch from grep -ix (full-line exact) to grep -iw (word boundary) which handles trailing whitespace or CR in the drush output Issue-fork branch check is green; this targets the plain module-enabled check. 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.
Closes #59. Tracking issue for promoting to production: #121.
What's in this PR
New
drupal-contribCoder template — automated workspace for developing Drupal contrib modules and themes, with optional issue branch support viaddev/ddev-drupal-contrib./home/coder/{project_name}/ddev poser(module/theme auto-symlinked into web root)issue_fork+issue_branchparametersddev phpunit,ddev phpcs,ddev phpstanavailable via the addonshare_drupal_siteparameter (owner/authenticated/public) on both drupal-contrib and drupal-coredrupal-contrib/scripts/test-issue-branches.sh— local/workspace test matrix script.github/workflows/drupal-contrib-integration-test.yml— CI integration testPicker changes (conservative — production picker untouched)
docs/drupal-issue.html— restored to original core-only picker (no change to production behavior)docs/drupal-contrib-picker.html— new unified picker (core + contrib), defaults tostaging-coder.ddev.com; BETA badge makes the staging target cleardocs/index.html— beta card added alongside the original picker cardManual testing
1. Template — create a contrib workspace on staging
Wait for setup (~5-10 min). Then verify:
runningstateddev drush pm:list --status=enabled | grep tokenreturns a result/home/coder/token2. Issue fork — check out an issue branch
(Use a real issue number from drupal.org/project/token/issues — the branch name must match an actual branch on the issue fork.)
git branchinside workspace)3. Beta picker — no PR checkout needed
Serve the picker locally from any checkout of this branch:
drupal-coretemplate on stagingdrupal.org/project/issues/3456789for a token issue) → routes todrupal-contribtemplate on stagingtoken) → opens plain contrib workspace form?coder=https://coder.ddev.comoverride works (check the workspace URL in the launched tab)4. Test matrix script (inside a Coder workspace)
Expected: token:11, pathauto:11, token:10 all show PASS in the summary table.
5. Share parameter
On any drupal-core or drupal-contrib workspace: