Skip to content

Commit c21a8b4

Browse files
rfayclaude
andauthored
fix: keep drupal repo current on restart and correct timing claims (#35)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent beed3e1 commit c21a8b4

9 files changed

Lines changed: 34 additions & 11 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TEMPLATE_VARS_freeform := --variable workspace_image_registry=index.dock
2828
# (coder templates push only supports --name, not --description)
2929
TEMPLATE_EDIT_user-defined-web := --display-name "DDEV Web Workspace"
3030
TEMPLATE_EDIT_drupal-core := --display-name "Drupal Core Development" \
31-
--description "Drupal core dev environment: full DDEV stack, core clone, Umami demo site. Ready in ~30 seconds."
31+
--description "Drupal core dev environment: full DDEV stack, core clone, Umami demo site. Ready in about a minute."
3232
TEMPLATE_EDIT_freeform := --display-name "DDEV Freeform (Traefik)"
3333

3434
# Shared recipe for pushing any template (call with template name as argument)

docs/admin/server-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ make deploy-user-defined-web
458458
459459
## Step 8: Set Up the Drupal Core Seed Cache (optional, highly recommended)
460460
461-
The `drupal-core` template can provision a fully configured Drupal core development environment on new workspaces using a **seed cache** on the host. Without the cache, first-time workspace setup downloads a full git clone and all composer dependencies (~10-13 minutes). With the cache, that drops to ~15 seconds.
461+
The `drupal-core` template can provision a fully configured Drupal core development environment on new workspaces using a **seed cache** on the host. Without the cache, first-time workspace setup downloads a full git clone and all composer dependencies (~10-13 minutes). With the cache, the install phase drops to ~15 seconds, and total workspace startup is about a minute.
462462
463463
The cache is a standing DDEV project on the host that is periodically refreshed. New workspaces copy the git checkout, vendor directory, and a pre-built database snapshot from it.
464464

docs/drupal-issue.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,15 @@ <h2>Notes</h2>
384384
<ul>
385385
<li>Requires a GitHub account — <a href="https://coder.ddev.com/login" style="color:#a78bfa">sign in at coder.ddev.com</a> first</li>
386386
<li>Issue fork workspaces always run a full <code>ddev drush si</code> (branch code may differ from the cached database)</li>
387-
<li>The <code>demo_umami</code> fast path (~30s) is only used for standard Drupal core without an issue fork</li>
387+
<li>The <code>demo_umami</code> fast path (about a minute) is only used for standard Drupal core without an issue fork</li>
388388
<li>Issue fork must exist on <a href="https://git.drupalcode.org" style="color:#a78bfa">git.drupalcode.org</a> — click "Get push access" on the issue page to create one</li>
389389
</ul>
390390
</div>
391+
392+
<div class="notes" style="margin-top:1.5rem;">
393+
<h2>Feedback &amp; Community</h2>
394+
<p style="color:#999;font-size:0.95rem;line-height:1.7;">Any problems or friction? Create an issue at <a href="https://github.com/ddev/coder-ddev/issues" style="color:#a78bfa;">ddev/coder-ddev</a> or join us for conversation on Drupal Slack <strong>#ddev</strong> or <a href="https://ddev.com/s/discord" style="color:#a78bfa;">DDEV Discord</a>.</p>
395+
</div>
391396
</div>
392397

393398
<script>

docs/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
<section class="hero">
221221
<img class="logo" src="https://raw.githubusercontent.com/ddev/ddev/main/docs/content/developers/logos/SVG/Logo_w_text_dark.svg" alt="DDEV">
222222
<h1>Coder Workspaces</h1>
223-
<p class="tagline">Cloud-hosted development environments powered by DDEV. Full stack, ready in ~30 seconds — no local setup required.</p>
223+
<p class="tagline">Cloud-hosted development environments powered by DDEV. Full stack, ready in about a minute — no local setup required.</p>
224224

225225
<div class="auth-callout">
226226
<!-- GitHub mark -->
@@ -305,6 +305,11 @@ <h2>Resources</h2>
305305
</div>
306306
</section>
307307

308+
<section>
309+
<h2>Feedback &amp; Community</h2>
310+
<p style="color:#999;font-size:0.95rem;line-height:1.7;">Any problems or friction? Create an issue at <a href="https://github.com/ddev/coder-ddev/issues" style="color:#a78bfa;">ddev/coder-ddev</a> or join us for conversation on Drupal Slack <strong>#ddev</strong> or <a href="https://ddev.com/s/discord" style="color:#a78bfa;">DDEV Discord</a>.</p>
311+
</section>
312+
308313
</div>
309314

310315
</body>

docs/user/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ coder start my-first-workspace
489489
# Via UI: Click "Start" button on workspace
490490
```
491491

492-
**Startup time:** 30-60 seconds (faster than initial create)
492+
**Startup time:** about a minute (faster than initial create without cache)
493493

494494
**After starting:**
495495
```bash

docs/user/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Quickstart: Drupal Core Development on coder.ddev.com
22

3-
Cloud-hosted DDEV workspaces for Drupal core development. Full environment — Drupal core clone, running site, drush — ready in ~30 seconds.
3+
Cloud-hosted DDEV workspaces for Drupal core development. Full environment — Drupal core clone, running site, drush — ready in about a minute.
44

55
[![Open in Coder](https://coder.ddev.com/open-in-coder.svg)](https://coder.ddev.com/templates/coder/drupal-core/workspace?mode=manual)
66

@@ -16,7 +16,7 @@ Go to **[coder.ddev.com](https://coder.ddev.com)** and sign in with GitHub.
1616

1717
Click the button above, or go to **Create Workspace** → select the **drupal-core** template → click **Create Workspace**.
1818

19-
Wait ~30 seconds for the startup script to complete. Watch progress in the **Logs** tab.
19+
Wait about a minute for the startup script to complete. Watch progress in the **Logs** tab.
2020

2121
---
2222

@@ -114,7 +114,7 @@ Then create a merge request on [drupal.org](https://www.drupal.org/project/drupa
114114
| Action | Effect |
115115
|--------|--------|
116116
| **Stop** workspace | Containers stop; your files persist on disk |
117-
| **Start** workspace | DDEV resumes in ~15 seconds; no reinstall needed |
117+
| **Start** workspace | Ready in about a minute; no reinstall needed |
118118
| **Delete** workspace | All data deleted permanently |
119119

120120
---

drupal-core/template.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,13 @@ WELCOME_STATIC
610610
if [ -f "composer.json" ] && [ -d "repos/drupal/.git" ]; then
611611
log_setup "✓ Drupal core project already present — skipping setup"
612612
update_status "✓ Setup: Already present"
613+
# For HEAD workspaces (non-issue-fork), keep the drupal repo current on every start
614+
if [ "$USING_ISSUE_FORK" = "false" ]; then
615+
_t=$SECONDS
616+
git -C "$DRUPAL_DIR/repos/drupal" fetch --all --prune >> "$SETUP_LOG" 2>&1 || true
617+
git -C "$DRUPAL_DIR/repos/drupal" merge --ff-only origin/main >> "$SETUP_LOG" 2>&1 || true
618+
log_setup " git fetch+merge complete ($((SECONDS - _t))s)"
619+
fi
613620
elif [ "$USING_ISSUE_FORK" = "false" ] && [ -f "$CACHE_SEED/composer.json" ] && [ -d "$CACHE_SEED/repos/drupal/.git" ]; then
614621
_t=$SECONDS
615622
log_setup "Cache hit: seeding project from host cache (fast path)..."
@@ -1182,6 +1189,7 @@ module "vscode-web" {
11821189
agent_id = coder_agent.main.id
11831190
folder = "/home/coder/drupal-core"
11841191
accept_license = true
1192+
order = 2
11851193
extensions = [
11861194
"xdebug.php-debug",
11871195
"bmewburn.vscode-intelephense-client",
@@ -1201,8 +1209,9 @@ resource "coder_app" "ddev-web" {
12011209
agent_id = coder_agent.main.id
12021210
slug = "ddev-web"
12031211
display_name = "DDEV Web"
1212+
order = 1
12041213
url = "http://localhost:80"
1205-
icon = "https://avatars.githubusercontent.com/u/47573844?s=128"
1214+
icon = "https://raw.githubusercontent.com/ddev/ddev/main/docs/content/developers/logos/SVG/Logo.svg"
12061215
subdomain = true
12071216
share = "owner"
12081217

freeform/template.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ module "vscode-web" {
305305
agent_id = coder_agent.main.id
306306
folder = "/home/coder/${data.coder_workspace.me.name}"
307307
accept_license = true
308+
order = 2
308309
extensions = [
309310
"xdebug.php-debug",
310311
"bmewburn.vscode-intelephense-client",
@@ -325,8 +326,9 @@ resource "coder_app" "ddev-web" {
325326
agent_id = coder_agent.main.id
326327
slug = data.coder_workspace.me.name
327328
display_name = "DDEV Web"
329+
order = 1
328330
url = "http://localhost:80"
329-
icon = "https://avatars.githubusercontent.com/u/47573512"
331+
icon = "https://raw.githubusercontent.com/ddev/ddev/main/docs/content/developers/logos/SVG/Logo.svg"
330332
subdomain = true
331333
share = "owner"
332334

user-defined-web/template.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ module "vscode-web" {
469469
agent_id = coder_agent.main.id
470470
folder = "/home/coder"
471471
accept_license = true
472+
order = 2
472473
extensions = [
473474
"xdebug.php-debug",
474475
"bmewburn.vscode-intelephense-client",
@@ -488,8 +489,9 @@ resource "coder_app" "ddev-web" {
488489
agent_id = coder_agent.main.id
489490
slug = "ddev-web"
490491
display_name = "DDEV Web"
492+
order = 1
491493
url = "http://localhost:80"
492-
icon = "https://avatars.githubusercontent.com/u/47573844?s=128"
494+
icon = "https://raw.githubusercontent.com/ddev/ddev/main/docs/content/developers/logos/SVG/Logo.svg"
493495
subdomain = true
494496
share = "owner"
495497

0 commit comments

Comments
 (0)