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

fix: Helm Docs makefile to be compatible with macOs #27495

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

ishuar
Copy link
Contributor

@ishuar ishuar commented Aug 14, 2023

  • Currently Documentation/Makefile is using $(QUIET)$(SED) 's/^\( \* - \)\([[:print:]]\+\)$$/\1:spelling:ignore:\2/' $@ > $(TMP_FILE_3) where sed has incompatible syntax in macOS. This does not add :spelling:ignore: string in between the $1 and $2 capture groups.

More detailed discussion took place at:

docs: Fix Documentation Makefile to make Helm reference updates compatible with macOS

Fixes: #27122
Fixes: #26759

Change from

$(QUIET)$(SED) 's/^\(   \* - \)\([[:print:]]\+\)$$/\1:spelling:ignore:`\2`/' $@ > $(TMP_FILE_3)

To

$(QUIET)$(SED) 's/^\(   \* - \)\([[:print:]]\{1,\}\)$$/\1:spelling:ignore:`\2`/' $@ > $(TMP_FILE_3)
Click to view the simulation of the Issue in commands
╰─$ uname -a ; which sed 
Darwin <MACBOOK_NAME> Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 arm64
/usr/bin/sed
╰─$ pwd
<PATH_TO_CILLIUM_FORK>/cilium
╰─$ sed 's/^\(   \* - \)\([[:print:]]\+\)$/\1:spelling:ignore:\2/' Documentation/helm-values.rst > helm-values.sed | grep "spelling"   
╭─is@CDT-MB-20200016 ~/Documents/Personal-GitHub/cilium ‹feat/enable-podsecuritycontext-on-spire-server●› 
╰─$ echo $?                                                                                                                            1 ↵
1
Click to View the change working
╰─$ sed 's/^\(   \* - \)\([[:print:]]\{1,\}\)$/\1:spelling:ignore:`\2`/' Documentation/helm-values.rst > helm-values_local.sed | grep -i "spelling" | head -n 5
   * - :spelling:ignore:`Key`
   * - :spelling:ignore:`MTU`
   * - :spelling:ignore:`affinity`
   * - :spelling:ignore:`agent`
   * - :spelling:ignore:`agentNotReadyTaintKey`
╰─$ echo $?
0

Signed-off-by: ishuar <ishansharma887@gmail.com>
@ishuar ishuar requested a review from a team as a code owner August 14, 2023 20:52
@ishuar ishuar requested a review from qmonnet August 14, 2023 20:52
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 14, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Aug 14, 2023
@qmonnet qmonnet added release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.12 needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Aug 15, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Aug 15, 2023
@qmonnet
Copy link
Member

qmonnet commented Aug 15, 2023

/test

Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks a lot for this!

Here's a nice doc with differences between BSD sed (default on macOS) and GNU sed, for future reference. Indeed, the \+ syntax is not supported in the former.

I validated that the new syntax still works as expected on Linux.

@qmonnet qmonnet added the area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. label Aug 15, 2023
@qmonnet qmonnet merged commit b7947bc into cilium:main Aug 15, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 15, 2023
@ishuar ishuar deleted the fix/helm-docs-makefile-for-mac-os branch August 15, 2023 10:17
ishuar added a commit to ishuar/cilium that referenced this pull request Aug 18, 2023
- Updated docs (used gnu-sed in macOS for helm-values.rst) permanent fix in cilium#27495

Signed-off-by: ishuar <ishansharma887@gmail.com>
joestringer pushed a commit that referenced this pull request Aug 21, 2023
- Updated docs (used gnu-sed in macOS for helm-values.rst) permanent fix in #27495

Signed-off-by: ishuar <ishansharma887@gmail.com>
@tklauser tklauser mentioned this pull request Aug 22, 2023
22 tasks
@tklauser tklauser added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Aug 22, 2023
@tklauser tklauser mentioned this pull request Aug 23, 2023
8 tasks
@tklauser tklauser mentioned this pull request Aug 23, 2023
7 tasks
@joestringer joestringer added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 labels Aug 25, 2023
@tklauser tklauser added backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. and removed backport-pending/1.12 labels Aug 25, 2023
@joestringer joestringer added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
Status: Released
Status: Released
Development

Successfully merging this pull request may close these issues.

4 participants