squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
21.22k stars 3.57k forks source link

insiders 4.19.0 container fails to build with `Config value: 'plugins'. Error: The "git-revision-date-localized" plugin is not installed` error #4058

Closed hellt closed 2 years ago

hellt commented 2 years ago

Contribution guidelines

I've found a bug and checked that ...

Description

Automated pipeline for building insiders container fail with Config value: 'plugins'. Error: The "git-revision-date-localized" plugin is not installed for 4.19.0 version. Previous versions do not have this isssue

image

Expected behaviour

build succeeds

Actual behaviour

build fails

Steps to reproduce

  1. start building container image using pipelines from insiders repo

Package versions

NA

Configuration

NA

System information

NA

squidfunk commented 2 years ago

Thanks for reporting. However, the plugin is optional, so it shouldn't fail. Authors should add the plugin themselves before building the container. Could you please provide a minimum reproducible example? Are you just building your fork or did you make changes?

squidfunk commented 2 years ago

Ah wait. I think I know where this is coming from – the "checking" is done against our mkdocs.yml file, which defines the plugin. Since it is not installed, the check is not successful and the build fails. I see how we can exempt the plugin.

hellt commented 2 years ago

I am following insiders installation manual and building a container out of unmodified insiders repo as I am using containerized mkdocs material package to build docs (not pip-based build)

My expectation was that the container that gets build in this job should have the necessary plugins for mkdocs-material to work (I do not see why it is useful to exclude some plugins, tbh). Up till 4.19.0 it was working fine for me

squidfunk commented 2 years ago

In general, we want to keep the image as small as possible. However, we can certainly add the following plugins, as they're now supported by Material for MkDocs Insiders and I expect an increasing number of people to be using them:

squidfunk commented 2 years ago

Fixed in squidfunk/mkdocs-material-insiders@1b25b3c1c59f0cc7032d5776ff88d8234859ba87 and released as part of 8.3.8+insiders-4.19.1

hellt commented 2 years ago

@squidfunk there is that issue with git security and gh actions that results in a build failure

image

it can be fixed if you change the docker run command that test the build as follows

# before
docker run --rm -i -v ${PWD}:/docs ${{ github.event.repository.full_name }} build

# after
docker run -v ${PWD}:/docs --entrypoint ash ${{ github.event.repository.full_name }} -c 'git config --global --add safe.directory /docs; mkdocs build'

ref: https://github.com/srl-labs/learn-srlinux/blob/main/.github/workflows/cicd.yml#L70

hellt commented 2 years ago

created a PR for insiders - https://github.com/squidfunk/mkdocs-material-insiders/pull/39