-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Github CI and Cargo.lock get out of sync #2620
Comments
I think it's GitHub, not Gitlab :) The second option seems good. We could also consider
|
Yes, Github ^^ - I'm going to fix all occurrences above (and in the title) Copying all files could lead to more reliable builds but could also fail in other spectacular ways and additionally comes with more update toil as we would need to regenerate everything on each update, otherwise we have an unknown combination of code. |
Test the main page for existence of - theme button visible - clicking shows the list of themes - search button visible - and tests successful search for "Welcome" - language button visible - clicking shows the list of languages this is testing functionality missing in dev environments in #2588 and is relevant for #2620
The approach I describe above does not work that way. https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile:
While this is partly what we want, we don't specify versions that need to be installed. The Cargo.lock file in this repository is irrelevant in choosing the installed versions of mdbook and the mdbook plugins. Another way forward can be an install script that is used by both the CI and the developers to install exactly the versions that we want and have tested. This will replace the manual versions in action.yml and can also replace the developer instructions |
@mgeisler: While looking at this issue I noticed these warnings from e.g. https://github.com/google/comprehensive-rust/actions/runs/13132471845/job/36641626915 - the step "Building bn translation as of 2024-03-03T20:37:57+05:30"
We need to find a good and reliable way to sync the versions of all required versions. |
Regarding the comment above this one this is coming from mdbook-i18n-helpers//i18n-helpers/mdbook-gettext that has its own lockfile and mdbook version that is locks to mdbook-i18n-helpers/Cargo.lock (tag: 0.3.3) that is different (if we don't take any precaution) from the mdbook version installed in this repo (via install-mdbook.sh - see PR above) Syncing the versions is currently done manually and in different places
|
…#2621) Test the main page for existence of - theme button visible - clicking shows the list of themes - search button visible - and tests successful search for "Welcome" - language button visible - clicking shows the list of languages this is testing functionality missing in dev environments in google#2588 and is relevant for google#2620
… CI (google#2626) Move mdbook installation into a script and use exact versions from the CI. Update README.md to instruct developers to use the same versions as the CI to sync both environments. This is related to google#2620 and it fixes google#2588
The Github CI workflows use specific versions for mdbook tools that are different from what developers are using. E.g. mdbook is currently using 0.4.37:
comprehensive-rust/.github/workflows/install-mdbook/action.yml
Line 11 in 4218c95
but Cargo.lock would use 0.4.44 - this is regularly bumped via dependabot like in 010bd29
comprehensive-rust/Cargo.lock
Lines 1640 to 1641 in 4218c95
and the developers are even instructed to use a completely different version that might not be one of those as it is not even locked (other tools are locked and might not be compatible with the "random" (most up-to-date) version of mdbook
comprehensive-rust/README.md
Lines 74 to 80 in 4218c95
We should use the same versions for developers and what the CI uses.
This is especially interesting for people developing javascript/theme code as mdbook generates/copies lots of files into the target folder if they are not overriden by us.
For example our book.js is copied but https://google.github.io/comprehensive-rust/css/general.css is not in our repository not existing general.css
Two options (second is my prefered proposal)
mdbook serve
compared to published version. #2588The text was updated successfully, but these errors were encountered: