Skip to content

Fix: Deprecate old target_path specification in repo-config.yml#24

Draft
ByteOtter wants to merge 1 commit intomainfrom
fix/deprecate-target-path
Draft

Fix: Deprecate old target_path specification in repo-config.yml#24
ByteOtter wants to merge 1 commit intomainfrom
fix/deprecate-target-path

Conversation

@ByteOtter
Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

This PR should fix the current build issue relating to target path mapping for supporting tools. It deprecates the old methods of specifying the output path for aggregated docs, which is now handled by the docs frontmatter. Specifically the github_target_path entry of the frontmatter.

10:45:44 AM: Transforming docs for: builder
10:45:44 AM: Traceback (most recent call last):
10:45:44 AM:   File "/opt/build/repo/scripts/transform_content.py", line 750, in <module>
10:45:44 AM:     main()
10:45:44 AM:     ~~~~^^
10:45:44 AM:   File "/opt/build/repo/scripts/transform_content.py", line 744, in main
10:45:44 AM:     transform_repo_docs(repo, args.docs_dir, args.temp_dir)
10:45:44 AM:     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:45:44 AM:   File "/opt/build/repo/scripts/transform_content.py", line 705, in transform_repo_docs
10:45:44 AM:     target_dir = os.path.join(docs_dir, repo_config["target_path"])
10:45:44 AM:                                         ~~~~~~~~~~~^^^^^^^^^^^^^^^
10:45:44 AM: KeyError: 'target_path'
10:45:44 AM: Error: Transformation failed
10:45:44 AM: Cleaning up temporary files...
10:45:44 AM: make: *** [Makefile:81: aggregate] Error 1
10:45:44 AM: ​
10:45:44 AM: "build.command" failed                                        
10:45:44 AM: ────────────────────────────────────────────────────────────────
10:45:44 AM: ​
10:45:44 AM:   Error message
10:45:44 AM:   Command failed with exit code 2: make build (https://ntl.fyi/exit-code-2)
10:45:44 AM: ​
10:45:44 AM:   Error location
10:45:44 AM:   In Build command from Netlify app:
10:45:44 AM:   make build
10:45:44 AM: ​
10:45:44 AM:   Resolved config
10:45:44 AM:   build:
10:45:44 AM:     command: make build
10:45:44 AM:     commandOrigin: ui
10:45:44 AM:     environment:
10:45:44 AM:       - REVIEW_ID
10:45:44 AM:     publish: /opt/build/repo/docs/.vitepress/dist
10:45:44 AM:     publishOrigin: ui
10:45:44 AM: Build failed due to a user error: Build script returned non-zero exit code: 2

Which issue(s) this PR fixes:
Fixes #23

Definition of Done:

  • The code is sufficiently documented
  • Shared the changes with the Team so everyone is aware
  • The code is appropriately tested
  • Checked if the code needs to be backportet to release branches of maintained versions (perform the actual backport after the merge to main)

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for gardenlinux-docs failed.

Name Link
🔨 Latest commit db4cefe
🔍 Latest deploy log https://app.netlify.com/projects/gardenlinux-docs/deploys/69cce37287deca0008a99fde

@ByteOtter
Copy link
Copy Markdown
Collaborator Author

given that the current build error is caused by failing to resolve a path, I would say the goal of the PR is achieved.

@ByteOtter ByteOtter force-pushed the fix/deprecate-target-path branch 3 times, most recently from 41731cf to 48e6c8f Compare April 1, 2026 09:15
@ByteOtter ByteOtter force-pushed the fix/deprecate-target-path branch from 48e6c8f to db4cefe Compare April 1, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Build failure due to old target_path approach

1 participant