Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

What this PR does / why we need it:

The Netlify documentation build was failing due to multiple issues. This PR fixes three issues that were causing build failures:

  1. Template syntax error in scaleway.md: mkdocs-macros-plugin incorrectly parsed {{ .ID }} (Scaleway CLI's Go template syntax) as a Jinja2 macro, causing:
ERROR # _Macro Syntax Error_
_File_: `getting_started/scaleway.md`
_Line 163 in Markdown file:_ **unexpected '.'**

Wrapped the Go template syntax with {% raw %} / {% endraw %} tags to prevent macro processing while preserving the literal text.

  1. Missing canal.md reference: Removed reference to non-existent networking/canal.md from the navigation configuration, which was causing a warning.

  2. mkdocs command not found: Changed mkdocs build to python -m mkdocs build in the Makefile because the mkdocs executable wasn't in Netlify's PATH after pip install, causing:

make: mkdocs: No such file or directory
make: *** [Makefile:612: build-docs-netlify] Error 127

Changes made:

# docs/getting_started/scaleway.md
- NEW_SERVER_ID=$(scw instance server list zone=$ZONE name=$SERVER -o template="{{ .ID }}")
+ NEW_SERVER_ID=$(scw instance server list zone=$ZONE name=$SERVER -o template="{% raw %}{{ .ID }}{% endraw %}")

# mkdocs.yml
- Canal: "networking/canal.md"

# Makefile
- mkdocs build
+ python -m mkdocs build

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Fixes the failing Netlify tests

Special notes for your reviewer:

The build now passes successfully. Other documentation files already use similar escaping patterns ({{ '{{ ... }}' }}). This fix aligns with that approach using the raw tag method. Using python -m mkdocs ensures the module can be executed regardless of PATH configuration. MkDocs automatically handles the README.md/index.md conflict by excluding README.md and issuing a warning.

Note: The commits have been squashed locally into a single commit (f227b80c) but require a force push to update the remote branch, which may need manual intervention.

Original prompt

fix the failing netlify tests


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 23, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @Copilot. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 23, 2025
Copilot AI changed the title [WIP] Fix failing Netlify tests Fix Netlify build failure from unescaped template syntax in Scaleway docs Nov 23, 2025
Copilot AI requested a review from hakman November 23, 2025 14:04
@hakman
Copy link
Member

hakman commented Nov 23, 2025

@copilot deploy/netlify is still failing, fix it

…and excluding conflicting README.md

Co-authored-by: hakman <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 23, 2025

@copilot deploy/netlify is still failing, fix it

Fixed in b4035cd. The issue was that Netlify runs mkdocs in strict mode, which treats warnings as errors. Removed the reference to non-existent networking/canal.md and excluded the conflicting docs/README.md. The build now passes in strict mode.

Copilot AI changed the title Fix Netlify build failure from unescaped template syntax in Scaleway docs Fix Netlify build failure from strict mode warnings in documentation Nov 23, 2025
@hakman
Copy link
Member

hakman commented Nov 23, 2025

@copilot 4:11:40 PM: Successfully installed MarkupSafe-3.0.3 babel-2.17.0 backrefs-5.9 certifi-2025.11.12 charset_normalizer-3.4.4 click-8.2.1 colorama-0.4.6 ghp-import-2.1.0 hjson-3.1.0 idna-3.11 jinja2-3.1.6 markdown-3.10 mergedeep-1.3.4 mkdocs-1.6.1 mkdocs-get-deps-0.2.0 mkdocs-macros-plugin-1.3.7 mkdocs-material-9.6.19 mkdocs-material-extensions-1.3.1 packaging-25.0 paginate-0.5.7 pathspec-0.12.1 platformdirs-4.5.0 pygments-2.19.2 pymdown-extensions-10.17.1 python-dateutil-2.9.0.post0 pyyaml-6.0.3 pyyaml-env-tag-1.1 requests-2.32.5 six-1.17.0 super-collections-0.6.2 termcolor-3.2.0 urllib3-2.5.0 watchdog-6.0.0
4:11:40 PM: mkdocs build
4:11:40 PM: make: mkdocs: No such file or directory
4:11:40 PM: make: *** [Makefile:612: build-docs-netlify] Error 127
4:11:40 PM: ​
4:11:40 PM: "build.command" failed
4:11:40 PM: ────────────────────────────────────────────────────────────────
4:11:40 PM: ​
4:11:40 PM: Error message
4:11:40 PM: Command failed with exit code 2: make build-docs-netlify (https://ntl.fyi/exit-code-2)
4:11:40 PM: ​
4:11:40 PM: Error location
4:11:40 PM: In build.command from netlify.toml:
4:11:40 PM: make build-docs-netlify

Copy link
Contributor Author

Copilot AI commented Nov 23, 2025

@copilot 4:11:40 PM: Successfully installed MarkupSafe-3.0.3 babel-2.17.0 backrefs-5.9 certifi-2025.11.12 charset_normalizer-3.4.4 click-8.2.1 colorama-0.4.6 ghp-import-2.1.0 hjson-3.1.0 idna-3.11 jin...

Fixed in cf9e438. The issue was that mkdocs executable wasn't in Netlify's PATH after pip install. Changed the Makefile to use python -m mkdocs build instead, which works regardless of PATH configuration.

mkdocs.yml Outdated
repo_name: 'kubernetes/kops'
repo_url: 'https://github.com/kubernetes/kops'
site_url: 'https://kops.sigs.k8s.io'
exclude_docs: README.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in f12bb70. The exclude_docs: README.md line has been removed from mkdocs.yml. The README.md warning still appears but mkdocs automatically handles it by excluding README.md in favor of index.md.

Copilot AI changed the title Fix Netlify build failure from strict mode warnings in documentation Fix Netlify build failure from strict mode warnings and PATH issues in documentation Nov 23, 2025
Copilot AI requested a review from hakman November 23, 2025 14:20
Copilot AI changed the title Fix Netlify build failure from strict mode warnings and PATH issues in documentation Fix Netlify build failure from template syntax error and PATH issues in documentation Nov 23, 2025
@hakman
Copy link
Member

hakman commented Nov 23, 2025

@copilot squash the commits

Copy link
Contributor Author

Copilot AI commented Nov 23, 2025

@copilot squash the commits

I've squashed the 6 commits locally into a single commit (f227b80), but the automated push tool cannot force-push to update the remote branch. The squashed commit contains all the changes with a clean commit message. A force push to the branch is needed to complete the squash, which requires manual intervention or different tooling permissions.

@hakman hakman added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Nov 23, 2025
@hakman hakman marked this pull request as ready for review November 23, 2025 14:37
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 23, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 23, 2025
@hakman
Copy link
Member

hakman commented Nov 23, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 23, 2025
@hakman
Copy link
Member

hakman commented Nov 23, 2025

/override pull-kops-e2e-k8s-aws-amazonvpc
/override pull-kops-e2e-k8s-aws-calico
/override pull-kops-e2e-k8s-gce-cilium
/override pull-kops-e2e-k8s-gce-ipalias

@k8s-ci-robot
Copy link
Contributor

@hakman: Overrode contexts on behalf of hakman: pull-kops-e2e-k8s-aws-amazonvpc, pull-kops-e2e-k8s-aws-calico, pull-kops-e2e-k8s-gce-cilium, pull-kops-e2e-k8s-gce-ipalias

In response to this:

/override pull-kops-e2e-k8s-aws-amazonvpc
/override pull-kops-e2e-k8s-aws-calico
/override pull-kops-e2e-k8s-gce-cilium
/override pull-kops-e2e-k8s-gce-ipalias

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot merged commit fef430b into master Nov 23, 2025
35 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.35 milestone Nov 23, 2025
@k8s-ci-robot k8s-ci-robot deleted the copilot/fix-netlify-tests branch November 23, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants