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.13] docs: Ignore Helm values, update spelling list #26906

Merged
merged 5 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Run pre-requisites for validation
run: |
make -C Documentation copy-api # necessary for check-build.sh
- uses: docker://cilium/docs-builder:2023-02-04@sha256:67c383332f63708fc40f3d12b0ffff8ec94a9a83d1b819dbe23b226ef076e6f2
- uses: docker://cilium/docs-builder:2023-03-01@sha256:36b233afd73482c2bc7ed43f7a1537f09962015c34679b86c4ca1fa618d67b95
with:
entrypoint: ./Documentation/check-build.sh
args: html
5 changes: 3 additions & 2 deletions Documentation/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker.io/library/python:3.10.4-alpine3.15 AS docs-base
# Python version should match the one in use in Read The Docs
FROM docker.io/library/python:3.7.9-alpine3.13 AS docs-base

LABEL maintainer="maintainer@cilium.io"

Expand Down Expand Up @@ -30,4 +31,4 @@ ENV MAKE_GIT_REPO_SAFE=1
## Workaround odd behaviour of sphinx versionwarning extension. It wants to
## write runtime data inside a system directory.
## We do rely on this extension, so we cannot just drop it.
RUN install -m 0777 -d /usr/local/lib/python3.10/site-packages/versionwarning/_static/data
RUN install -m 0777 -d /usr/local/lib/python3.7/site-packages/versionwarning/_static/data
2 changes: 2 additions & 0 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include ../Makefile.quiet
HELM_VALUES := helm-values.rst
REQUIREMENTS_NODEP := requirements-min/requirements.txt
REQUIREMENTS := requirements.txt
SPHINX_OPTS := "-j=auto"

.PHONY: default clean help builder-image cilium-build cmdref epub latex html

Expand Down Expand Up @@ -96,6 +97,7 @@ $(HELM_VALUES): FORCE
$(QUIET)$(HELM_DOCS) -d -c $(HELM_DOCS_CHARTS_DIR) -t $(HELM_DOCS_OUTPUT_DIR)/$(TMP_FILE_1).tmpl > $(TMP_FILE_1)
$(QUIET)awk -F'|' '{print "|"$$2"|"$$5"|"$$3"|"$$4"|"}' $(TMP_FILE_1) > $(TMP_FILE_2)
$(QUIET)$(M2R) --overwrite $(TMP_FILE_2)
$(QUIET)sed -i 's/^\( \* - \)\([[:print:]]\+\)$$/\1:spelling:ignore:`\2`/' $@
$(QUIET)printf '..\n %s\n\n%s\n' "AUTO-GENERATED. Please DO NOT edit manually." "$$(cat $@)" > $@
$(QUIET)$(RM) -- $(TMP_FILE_1) $(TMP_FILE_2)

Expand Down
18 changes: 10 additions & 8 deletions Documentation/check-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rm -f -- "${warnings}"
has_spelling_errors() {
# If spelling errors were found, Sphinx wrote them to files under
# ${spelldir}. Let's check whether the directory is empty.
test -n "$(ls "${spelldir}")"
test -n "$(ls "${spelldir}" 2>/dev/null)"
}

# Filter out some undesirable warnings:
Expand Down Expand Up @@ -104,16 +104,18 @@ run_linter() {
ignored_messages="${ignored_messages}bpf/.*\.rst:.*: \(INFO/1\) Enumerated list start value not ordinal"
ignored_messages="${ignored_messages}|Hyperlink target .*is not referenced\."
ignored_messages="${ignored_messages}|Duplicate implicit target name:"
ignored_messages="${ignored_messages}|Malformed table\."
ignored_messages="${ignored_messages})"
# Filter out the AttributeError reports that are due to a bug in rstcheck,
# see https://github.com/rstcheck/rstcheck-core/issues/3.
rstcheck \
--report info \
--ignore-language bash \
--ignore-message "${ignored_messages}" \
--ignore-directives tabs \
--ignore-roles "${CONF_PY_ROLES}" \
--report-level info \
--ignore-languages "bash,c" \
--ignore-messages "${ignored_messages}" \
--ignore-directives "tabs,openapi" \
--ignore-roles "${CONF_PY_ROLES},spelling:ignore" \
--ignore-substitutions "${CONF_PY_SUBSTITUTIONS}" \
-r .
-r . ../README.rst 2>&1 | \
grep -v 'CRITICAL:rstcheck_core.checker:An `AttributeError` error occured. This is most propably due to a code block directive (code/code-block/sourcecode) without a specified language.'
}

read_all_opt=""
Expand Down
10 changes: 6 additions & 4 deletions Documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,19 @@
versionwarning_api_url = "https://docs.cilium.io/"

# The version of Go used to compile Cilium
go_release = open("../GO_VERSION", "r").read().strip()
go_mod = open("../go.mod", "r").readlines()
go_release = [line.rstrip()[len("go "):] for line in go_mod if line.startswith("go ")][0]

# The image tag for Cilium docker images
image_tag = 'v' + release

# Fetch the docs version from an environment variable.
# Map latest -> master.
# Map latest -> main.
# Map stable -> current version number.
branch = os.environ.get('READTHEDOCS_VERSION')
if not branch or branch == 'latest':
branch = 'HEAD'
archive_name = 'master'
archive_name = 'main'
chart_release = './cilium'
image_tag = 'latest'
chart_version = "--chart-directory ./install/kubernetes/cilium"
Expand Down Expand Up @@ -116,7 +117,8 @@
archive_link = github_repo + 'archive/' + archive_filename
archive_name = 'cilium-' + archive_name.strip('v')
project_link = github_repo + 'projects?query=is:open+' + next_release
backport_format = github_repo + 'pulls?q=is:open+is:pr+-label:backport/author+label:%s/' + current_release
backport_format = github_repo + \
'pulls?q=is:open+is:pr+-label:backport/author+label:%s/' + current_release

# Store variables in the epilogue so they are globally available.
rst_epilog = """
Expand Down
18 changes: 9 additions & 9 deletions Documentation/contributing/testing/ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,16 +441,16 @@ Logging into VM running tests
1. If you have access to credentials for Jenkins, log into the Jenkins slave running the test workload
2. Identify the vagrant box running the specific test

.. code-block:: shell-session
.. code-block:: shell-session

$ vagrant global-status
id name provider state directory
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6e68c6c k8s1-build-PR-1588-6 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q/tests/k8s
ec5962a cilium-master-build-PR-1588-6 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q
bfaffaa k8s2-build-PR-1588-6 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q/tests/k8s
3fa346c k8s1-build-PR-1588-7 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q@2/tests/k8s
b7ded3c cilium-master-build-PR-1588-7 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q@2
$ vagrant global-status
id name provider state directory
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6e68c6c k8s1-build-PR-1588-6 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q/tests/k8s
ec5962a cilium-master-build-PR-1588-6 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q
bfaffaa k8s2-build-PR-1588-6 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q/tests/k8s
3fa346c k8s1-build-PR-1588-7 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q@2/tests/k8s
b7ded3c cilium-master-build-PR-1588-7 virtualbox running /root/jenkins/workspace/cilium_cilium_PR-1588-CWL743UTZEF6CPEZCNXQVSZVEW32FR3CMGKGY6667CU7X43AAZ4Q@2

3. Log into the specific VM

Expand Down