You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/04/30 22:50:24 UTC

[PR] Add conf/guides.yml as new source of truth for guide metadata (refs #354) [grails-static-website]

jamesfredley opened a new pull request, #447:
URL: https://github.com/apache/grails-static-website/pull/447

   ## Summary
   
   Add `conf/guides.yml` as the new local source of truth for guide metadata, replacing (over the next few PRs) the runtime remote-JSON fetch in `GuidesFetcher`.
   
   This is the FIRST step of a multi-PR migration:
   
   1. **This PR**: `conf/guides.yml` exists, contains the schema scaffold + a single bootstrap entry for the fixture guide migrated in #446.
   2. **Follow-up**: an auto-import Gradle task imports the remaining entries from the captured `gh-pages/guides.json` snapshot, applying the known typo / branch-name fixes recorded in the migration plan.
   3. **Follow-up**: `:validateGuides` Gradle task validates the file against the schema (`-PvalidationMode=shape|existence|both`).
   4. **Follow-up**: `GuidesFetcher` swaps from the network fetch to SnakeYAML parsing of this file.
   
   ## Initial content
   
   ```yaml
   defaults:
     category: 'Getting Started'
     authors: []
     tags: []
   
   guides:
     - name: creating-your-first-grails-app
       title: 'Creating your first Grails Application'
       subtitle: 'Learn how to create your first Grails app'
       authors:
         - 'Zachary Klein'
       category: 'Getting Started'
       publicationDate: '2017-01-23'
       versions:
         '6':
           sourcePath: guides/creating-your-first-grails-app/v6
           publicationDate: '2017-01-23'
           tags: [mysql, gsp, grails6]
           sampleRef:
             repo: grails-guides/creating-your-first-grails-app
             branch: master
             sha: '84422f5d162f3deffb89978a3e9127382ce7eeea'
   ```
   
   The entry references the fixture migrated in #446 (now in master at `dcdda55f69`).
   
   ## Verification
   
   * `./gradlew clean build` -> BUILD SUCCESSFUL (exit 0). The new `conf/guides.yml` is currently unwired (no consumer reads it yet) so it does not affect build output.
   * Shape rules met:
     * Single entry, name unique.
     * Version key `'6'` is a valid integer.
     * `sampleRef.sha` is 40-char hex.
     * `publicationDate` parseable as ISO-8601.
     * `versions.6.sourcePath` syntactically valid; matches the directory in master.
   
   The validator that exercises these rules lands in the next PR (`:validateGuides` Gradle task).
   
   Refs #354.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add conf/guides.yml as new source of truth for guide metadata (refs #354) [grails-static-website]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #447:
URL: https://github.com/apache/grails-static-website/pull/447#discussion_r3171253978


##########
conf/guides.yml:
##########
@@ -0,0 +1,46 @@
+# Single source of truth for guide metadata.
+#
+# Replaces the runtime `new URL("https://raw.githubusercontent.com/.../gh-pages/guides.json").text`
+# fetch in `GuidesFetcher` with a local YAML file. The migration from
+# remote-fetch to local-yaml lands incrementally:
+#
+#   1. THIS FILE (initial form): one fixture entry to bootstrap the
+#      schema and let the validator be exercised against real content.
+#   2. Auto-import follow-up: a Gradle task imports all entries from
+#      the captured `gh-pages/guides.json` snapshot, applying known
+#      typo / branch-name fixes recorded in the migration plan.
+#   3. GuidesFetcher swap: replace the network fetch with SnakeYAML
+#      parsing of this file. genGuides reads from here.
+#
+# Each step is its own PR. This file grows as guides land in the
+# `guides/<name>/v{N}/` tree.
+#
+# Schema reference: `.sisyphus/plans/issue-354-publishing-migration-v7.md`
+# Appendix A.1.

Review Comment:
   The comment references `.sisyphus/plans/issue-354-publishing-migration-v7.md`, but the `.sisyphus/` directory doesn’t exist in this repo, so this is a broken reference. Consider linking to an in-repo document (or an issue/PR link), or remove the reference to avoid confusion.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add conf/guides.yml as new source of truth for guide metadata (refs #354) [grails-static-website]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #447:
URL: https://github.com/apache/grails-static-website/pull/447#issuecomment-4356709736

   <!-- Bito Reply -->
   The comment correctly identifies a broken reference in conf/guides.yml line 24, as .sisyphus/ doesn't exist in the repo. Removing the line or linking to an in-repo document/issue would resolve the confusion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add conf/guides.yml + tighten publish.yml comment (refs #354) [grails-static-website]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #447:
URL: https://github.com/apache/grails-static-website/pull/447#discussion_r3171284334


##########
conf/guides.yml:
##########
@@ -0,0 +1,46 @@
+# Single source of truth for guide metadata.
+#
+# Replaces the runtime `new URL("https://raw.githubusercontent.com/.../gh-pages/guides.json").text`
+# fetch in `GuidesFetcher` with a local YAML file. The migration from
+# remote-fetch to local-yaml lands incrementally:
+#
+#   1. THIS FILE (initial form): one fixture entry to bootstrap the
+#      schema and let the validator be exercised against real content.
+#   2. Auto-import follow-up: a Gradle task imports all entries from
+#      the captured `gh-pages/guides.json` snapshot, applying known
+#      typo / branch-name fixes recorded in the migration plan.
+#   3. GuidesFetcher swap: replace the network fetch with SnakeYAML
+#      parsing of this file. genGuides reads from here.
+#
+# Each step is its own PR. This file grows as guides land in the
+# `guides/<name>/v{N}/` tree.
+#
+# Schema reference: `.sisyphus/plans/issue-354-publishing-migration-v7.md`
+# Appendix A.1.

Review Comment:
   You are right -- I caught this in parallel and force-pushed the fix in commit `5c984dedd6` (visible in the current PR head). Both the `.sisyphus/plans/...` reference here and a similar one in `.github/workflows/publish.yml` were dropped in that push.
   
   The reasoning matches yours exactly: those paths point at a local-only working directory that does not exist in this repo, so they are dead refs from a reader's perspective. Public refs (the `#354` issue, GitHub URLs, the legacy/new domain names) stay; the `.sisyphus/...` paths leak the local-only docs.
   
   Resolving.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add conf/guides.yml + :validateGuides Gradle task + publish.yml comment cleanup (refs #354) [grails-static-website]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley merged PR #447:
URL: https://github.com/apache/grails-static-website/pull/447


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org