-
Couldn't load subscription status.
- Fork 1.6k
Description
What happened?
The test https://github.com/open-telemetry/opentelemetry.io/actions/runs/18612491468/workflow?pr=5891#L136 failed due to strict conditions for evaluating the log level.
WARN File /home/runner/work/opentelemetry.io/opentelemetry.io/content/uk/community/_index.md: drop unnecessary '/uk/' prefix from /uk/community/marketing-guidelines/
WARN File /home/runner/work/opentelemetry.io/opentelemetry.io/content/uk/community/_index.md: drop unnecessary '/uk/' prefix from /uk/site/
What did you expect would happen?
I expect that this level of logs should be passed or have less critical level for assessment.
What is the name + path of the page where you encountered the issue?
opentelemetry.io/layouts/_markup/render-link.html
Lines 45 to 47 in 9a2a3eb
| {{ if and (hasPrefix $url $langPathPrefix) .Page.File -}} | |
| {{ warnf "File %s: drop unnecessary '%s' prefix from %s" | |
| .Page.File.Filename $langPathPrefix $url -}} |
and
Possible options to avoid the test fails
Since the links in the footer are outside the scope of the render-links decorator for automatically adding a language code prefix, you have to add it manually for the corresponding links in site.param.links (See lines 136-147 in the hugo.yaml). However, at the same time, the logic for checking for the presence of language code in the decorator also works for links in the footer, which leads to a warning. To solve the issue quickly, you can use one of these suggestions:
- Add exceptions to the
.warnings-skip-list.txtfile for the specific warnings, or - Use fmt.Warnidf with
INFOID inrender-link.html#L46and addignoreLogs: [INFO]intohugo.yamlto suppress this type of log messages.
However, a more reliable way to solve the issue would probably be to add an exception for footer links to the decorator's link checking logic.
I eagerly await a decision on possible ways to resolve this issue.
Tip:
React
with 👍 to help prioritize this issue. Please use comments to provide useful
context, avoiding +1 or me too, to help us triage it. Learn more
here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status