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

v1.0.1 creates git log warnings that fail mkdocs strict mode #89

Closed
andrewthauer opened this issue May 26, 2022 · 11 comments
Closed

v1.0.1 creates git log warnings that fail mkdocs strict mode #89

andrewthauer opened this issue May 26, 2022 · 11 comments

Comments

@andrewthauer
Copy link

After upgrading to v1.0.1 we started seeing build failures with the following:

WARNING  -  [git-revision-date-localized-plugin] Unable to read git logs of '/input/docs/.../my-doc.md'. Is git log readable? Option 'fallback_to_build_date' set to 'true': Falling back to build date

Is it possible #88 is causing these issues? It's a bit odd since we do fetch the entire history, but the warning says it's falling back to the build date for some reason. In any case, since it's a warning, if you are using mkdocs build --strict it will fail.

@timvink
Copy link
Owner

timvink commented May 26, 2022

Thanks for reporting, will look into it in 1-2 weeks or so (currently on holiday)

@andrewthauer
Copy link
Author

andrewthauer commented May 27, 2022

Thanks. I am now thinking this might be unrelated and just a coincidence. I'll verify and close once I confirm.

@timvink
Copy link
Owner

timvink commented Jun 25, 2022

Did you verify yet?

You mentioned "build failures" but you are showing a warning (it shouldn't break the build).

@andrewthauer
Copy link
Author

@timvink - Sorry, I wasn't able to track down the root cause yet, but I'm pretty sure it's not related to the `v1.0.1 change. I'll close this and re-open if needed.

You mentioned "build failures" but you are showing a warning (it shouldn't break the build).

This fails a build only used with the mkdocs --strict flag, since all warnings are treated as failures. We've temporarily disabled strict mode to workaround this.

@ssbarnea
Copy link

@andrewthauer @timvink Why is this ticket closed as the current bug prevents people from using strict mode in their pipelines, something that is known to be a good practice.

@andrewthauer
Copy link
Author

@ssbarnea I wasn't able to confirm the issue was related to this plugin. Can you reproduce and confirm it is?

@ssbarnea
Copy link

Yes. I disabled the plugin for now.

@andrewthauer
Copy link
Author

It could also be an issue with how mkdocs treats warnings in newer versions. If I recall there didn't seem to be any code changes to this plugin that seemed like they would have caused this. Disabling the plugin might be a red herring. But again, not entirely sure.

@ssbarnea
Copy link

ssbarnea commented Feb 6, 2023

I did not use mkdocs for very long time, so I cannot say if they changed something recently. Still, I almost always tried to run tools with strict mode (like sphinx), so I would not miss problems. Still, gue to the nature of this plugin, if you add strict: true you will not be able to test locally as it will cause failures for any uncommitted change that you have.

How this can be sorted? I am not sure. Maybe there is an info/notice level that does not become an error when you run in strict?

For the moment I disabled the plugin because it did not add essential functionality for me. For me it was more important to be able to have a default strict mode.

@timvink
Copy link
Owner

timvink commented Feb 20, 2023

FYI, this issue will be picked up in #108

@timvink
Copy link
Owner

timvink commented Mar 2, 2023

Fixed, new v1.2.0 version is now on pypi. You can now add the following, and the logger will use info instead of warning level.

plugins:
  - git-revision-date-localized:
      strict: false

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

No branches or pull requests

3 participants