Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Storage path prefix follow-up: deploy tidies and refuses review/./.. segments, per-app lifecycle rule and its age, pre-alpha.37 review apps (template #168, #169)

Closed
#255 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, php

Research direction

Read the linked template issues #168 and #169 and docs#247, then check the template branch fix/storage-prefix-168-169 and its CHANGELOG.md for the final commits. Verify the documented GCLOUD_PATH_PREFIX rules, lifecycle prefix and age guidance, pre-alpha.37 migration steps, and stop warning path against that change; done when the docs accurately cover each behavior and the upgrade steps.

Written by the indexing model from the issue text.

Description

Follow-up to docs#247 (closed, documented in de3025f), from template components-web-app#168 and #169. Fix on the template branch fix/storage-prefix-168-169, landing in the next template release after 2.0.0-alpha.37; the template's CHANGELOG.md will link the final commits. Found while working on #170.

GCLOUD_PATH_PREFIX rules (variables "Storage path prefix")

  • The deploy now tidies the prefix exactly as php does (trims whitespace, squeezes doubled slashes, strips leading/trailing /, adds one trailing /), so site-a// stores review apps under site-a/review/<slug>/.
  • The deploy fails before touching the cluster on a . or .. segment, or on a whole review segment (review/, site/review): review/ is where review apps store. reviews/ or my-review/ are fine. Upgrade note: rename such a prefix first, moving its objects with it.

Lifecycle rule (ci-cd "Review app storage")

  • One rule per prefixed app: matchesPrefix: ["<GCLOUD_PATH_PREFIX>review/"] (["review/"] only with no prefix).
  • age counts from each object's creation, not from the review app's stop, so pick an age longer than review apps live, or the rule deletes a running review app's uploads.

Review apps deployed before 2.0.0-alpha.37

  • Their uploads sit at the bucket root. After their next deploy (which adds the review/<slug>/ prefix) those uploads 404 and the orphan scan no longer sees them.
  • Fix: redeploy with fresh fixtures (CWA_CI_FIXTURES_PURGE=true on the review fixture job), or stop and recreate the review app, then delete the old root objects by hand.
  • Stop review's warning (when the guarded delete fails) now prints the app's real path, e.g. site-a/review/<slug>/, and the lifecycle prefix to rely on.
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1h 20m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from components-web-app/docs

All issues in components-web-app/docs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.