Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch Docusaurus build issues #498

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

ptgott
Copy link
Contributor

@ptgott ptgott commented Oct 8, 2024

Break the docs build on states that are acceptable for the current
NextJS-based docs engine but cause Docusaurus builds to fail:

  • Unresolved partial parameters: Edit the remark-includes linter
    to ensure that all parameters declared within a partial (using {{ param }} syntax) are either (a) assigned by the user or (b) given a
    default value. Otherwise, when we move to the new docs engine, builds
    will fail on unresolved parameters.

  • Add more config checks: Throw an exception for duplicate redirects
    and redirects where the source points to an existing file. With the
    current logic, this check takes place with every page build. While
    this is not ideal, and leads to noisy error output, we should be
    migrating soon and will not need to deal with this for long.

@ptgott ptgott requested a review from avatus as a code owner October 8, 2024 18:16
Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 2:58pm

@ptgott
Copy link
Contributor Author

ptgott commented Oct 8, 2024

TODO: We need to make sure we resolve the linter errors before merging this.

@ptgott
Copy link
Contributor Author

ptgott commented Oct 10, 2024

I am going to put this in draft and add some more functionality to prevent build issues in the new docs engine

@ptgott ptgott marked this pull request as draft October 10, 2024 14:56
@avatus
Copy link
Contributor

avatus commented Oct 10, 2024

Sounds good. ping when ready

Break the docs build on states that are acceptable for the current
NextJS-based docs engine but cause Docusaurus builds to fail:

- **Unresolved partial parameters:** Edit the `remark-includes` linter
  to ensure that all parameters declared within a partial (using `{{
  param }}` syntax) are either (a) assigned by the user or (b) given a
  default value. Otherwise, when we move to the new docs engine, builds
  will fail on unresolved parameters.

- **Add more config checks:** Throw an exception for duplicate redirects
  and redirects where the `source` points to an existing file. With the
  current logic, this check takes place with every page build. While
  this is not ideal, and leads to noisy error output, we should be
  migrating soon and will not need to deal with this for long.
@ptgott ptgott force-pushed the paul.gottschling/2024-10-08-params branch from fb59889 to b25c045 Compare October 10, 2024 20:28
@ptgott ptgott changed the title Catch unresolved partial parameters Catch Docusaurus build issues Oct 10, 2024
@ptgott ptgott marked this pull request as ready for review October 10, 2024 20:31
@ptgott
Copy link
Contributor Author

ptgott commented Oct 10, 2024

@avatus Hopefully, merging gravitational/teleport#47471 will get the checks introduced by this PR to pass, so the Vercel workflow will finish!

@ptgott ptgott merged commit 1ec9d04 into main Oct 17, 2024
5 of 6 checks passed
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.

2 participants