metal3-io / metal3-docs

Architecture documentation that describes the components being built under Metal³.
http://metal3.io
Apache License 2.0
263 stars 111 forks source link

Revert "Go preprocessor to find and replace releasetags" #420

Closed dtantsur closed 1 month ago

dtantsur commented 1 month ago

This reverts commit 5e9b9585518c94475f16a2c154ac37200a8af60f.

This change currently causes a crash when building the user guide:

2024-05-03 16:55:51 [INFO] (mdbook::book): Book building has started
2024-05-03 16:55:51 [INFO] (mdbook::book): Running the html backend
thread 'main' panicked at '', src/utils/fs.rs:45:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
   2: core::panicking::panic_display
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:64:5
   3: core::option::expect_failed
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs:1638:5
   4: <mdbook::renderer::html_handlebars::hbs_renderer::HtmlHandlebars as mdbook::renderer::Renderer>::render
   5: mdbook::book::MDBook::build
   6: mdbook::main

Reproducible both locally and in the CI.

Signed-off-by: Dmitry Tantsur dtantsur@protonmail.com

metal3-io-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from dtantsur. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/metal3-io/metal3-docs/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dtantsur commented 1 month ago

I'm sorry @peppi-lotta, but unless we have a quick idea how to fix the build, the PR needs to be reverted.

/cc @adilGhaffarDev @kashifest

lentzi90 commented 1 month ago

Weird! Looks like everything was fine in https://github.com/metal3-io/metal3-docs/pull/386. Also, this code is mostly coming from CAPI as far as I know. I wonder what changed :thinking:

kashifest commented 1 month ago

Yes #386 was build with the same settings and same versions, could be related to some caching but not sure, I did try to bump rust in #421 but the issue prevails, seems like we need to open a bug report in Rust, @peppi-lotta can you please take a look and if no quick solution is found, we need to take this revert in.

lentzi90 commented 1 month ago

I found the issue. Fix in https://github.com/metal3-io/metal3-docs/pull/423 Although maybe more like a workaround. It would be nice to make the preprocessor more robust or improve the error message...

dtantsur commented 1 month ago

I agree, we need better diagnostics. But the revert is no longer needed, thanks all!

peppi-lotta commented 1 month ago

I added to metal3-docs a warning about links without a path causing an error and created an issue in mdbook about it. I had noticed this an added a note in the README.md but obviously that was too hidden :sweat_smile:. CAPI has this same problem but they just aren't using Draft Chapters aka links without a path in SUMMARY.md.