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

Update kubectl docs/Explain beta docs #40068

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

alexzielenski
Copy link
Contributor

@alexzielenski alexzielenski commented Mar 17, 2023

Regenerates kubectl documentation to include quite a few missed changes, as well as the new explain functionality.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 17, 2023
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Mar 17, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 17, 2023
@netlify
Copy link

netlify bot commented Mar 17, 2023

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 7168071
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/642494341aec4500082150db
😎 Deploy Preview https://deploy-preview-40068--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@mickeyboxell
Copy link
Contributor

Hi @alexzielenski, when you're ready, populate your placeholder PR with feature documentation and change the state of the PR from draft to ready for review. The official Docs deadline for PRs to be ready for review is tomorrow, March 21st. All docs PRs must be reviewed and ready to merge by April 4th. To mark a pull request as ready for review, navigate to the merge box and click Ready for review.

Regarding the content of your documentation, do your best to describe your feature and how to use it. If you need help structuring your documentation, ask in the #sig-docs Slack channel. For more information, please take a look at Documenting for a release to familiarize yourself with the documentation requirements for the release.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 21, 2023
@alexzielenski
Copy link
Contributor Author

alexzielenski commented Mar 21, 2023

I've ran the commands to regenerate the kubectl reference. it has a lot of updates but the new flags for explain are not included. Still looking into it. Will ask on slack for help. Marking as ready for review in the meantime in case someone has some thoughts.

@alexzielenski alexzielenski marked this pull request as ready for review March 21, 2023 22:10
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 21, 2023
@k8s-ci-robot k8s-ci-robot requested review from onlydole and sftim March 21, 2023 22:10
@tengqm
Copy link
Contributor

tengqm commented Mar 21, 2023

@alexzielenski You will have to update the go.mod file before regenerate the reference. The update must happen before the 1.27 release is out. In addition to this, you may have to update generators/v1_27/toc.yaml if old commands are dropped and/or new commands are introduced.

If this is targeting 1.27, you will have to target dev-1.27 branch, or after the 1.27 docs is released, target main branch after the release date.

@mickeyboxell
Copy link
Contributor

@alexzielenski Did you get a chance to make @tengqm suggested changes?

@alexzielenski
Copy link
Contributor Author

alexzielenski commented Mar 29, 2023

Unfortunately I'm still having trouble with it.

  1. I rebased on dev-1.27
  2. I updated all kubernetes versions in go.mod and in all the api-ref-generator go.mod files to point to v0.27.0-rc.0. Some were on v0.22.0, others on 0.26.0.
  3. make createversiondirs from 0.23 to 0.27 since generators folder was missing the last few
  4. Add events command to generators/v1_27/toc.yaml
  5. K8S_RELEASE=1.27.0 make copycli. Hit strange javascript error:
❯ K8S_RELEASE=1.27.0 make copycli                                                                                                                                            (55bce68) *​​ ≡
sudo rm -f main
sudo rm -rf /Users/alex/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs/generators/includes
sudo rm -rf /Users/alex/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs/generators/build
sudo rm -rf /Users/alex/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs/generators/manifest.json
pushd gen-kubectldocs && go mod download && go run main.go --kubernetes-version v1_27 && popd
~/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs ~/go/src/k8s.io/website/api-ref-generator
~/go/src/k8s.io/website/api-ref-generator
mkdir -p gen-kubectldocs/generators/build
docker run -v /Users/alex/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs/generators/includes:/source -v /Users/alex/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs/generators/build:/build -v /Users/alex/go/src/k8s.io/website/api-ref-generator/gen-kubectldocs/generators/:/manifest brianpursley/brodocs:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Version 9 of Highlight.js has reached EOL and is no longer supported.
Please upgrade or ask whatever dependency you are using to upgrade.
https://github.com/highlightjs/highlight.js/issues/2877
TypeError: Cannot read property 'substring' of undefined
Please report this to https://github.com/markedjs/marked.
    at Renderer.renderer.code (/brodocs/markedDecorations.js:54:33)
    at Parser.tok (/brodocs/node_modules/marked/lib/marked.js:1058:28)
    at Parser.parse (/brodocs/node_modules/marked/lib/marked.js:1003:17)
    at Function.Parser.parse (/brodocs/node_modules/marked/lib/marked.js:985:17)
    at marked (/brodocs/node_modules/marked/lib/marked.js:1322:19)
    at parseDoc (/brodocs/brodoc.js:84:12)
    at files.forEach (/brodocs/brodoc.js:76:39)
    at Array.forEach (native)
    at parseFileContent (/brodocs/brodoc.js:74:11)
    at fs.readFile (/brodocs/brodoc.js:53:13) '_generated_create.md' '\n------------\n\n# create\n\n>bdocs-tab:example 
<elided long generated markdown file>
ob/brodocs/brodoc.js:79
          throw e;
          ^

TypeError: Cannot read property 'substring' of undefined
Please report this to https://github.com/markedjs/marked.
    at Renderer.renderer.code (/brodocs/markedDecorations.js:54:33)
    at Parser.tok (/brodocs/node_modules/marked/lib/marked.js:1058:28)
    at Parser.parse (/brodocs/node_modules/marked/lib/marked.js:1003:17)
    at Function.Parser.parse (/brodocs/node_modules/marked/lib/marked.js:985:17)
    at marked (/brodocs/node_modules/marked/lib/marked.js:1322:19)
    at parseDoc (/brodocs/brodoc.js:84:12)
    at files.forEach (/brodocs/brodoc.js:76:39)
    at Array.forEach (native)
    at parseFileContent (/brodocs/brodoc.js:74:11)
    at fs.readFile (/brodocs/brodoc.js:53:13)
make: *** [cli] Error 1

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Mar 29, 2023
@mickeyboxell
Copy link
Contributor

mickeyboxell commented Apr 3, 2023

@tengqm @sftim @reylejano do you know how to correct the error above?

@reylejano
Copy link
Member

Looks like you're bringing changes from the dev-1.27 branch into the main branch
If this PR is intended for the 1.27 release, try changing the base to the main branch.
You do this with the UI and click edit and change the base branch from the drop down menu to dev-1.27
More details with screenshots are found here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request

@alexzielenski alexzielenski changed the base branch from main to dev-1.27 April 4, 2023 17:04
@alexzielenski alexzielenski changed the title Explain beta placeholder Explain beta docs Apr 4, 2023
@alexzielenski alexzielenski changed the title Explain beta docs Update kubectl docs/Explain beta docs Apr 4, 2023
@mickeyboxell
Copy link
Contributor

@alexzielenski could you try what @reylejano suggested when you have a moment?

@alexzielenski
Copy link
Contributor Author

alexzielenski commented Apr 4, 2023

@mickeyboxell I've done that, yeah but I don't think changing the targeted PR branch fixes anything since it was already based on dev-1.27, the script still fails.

@sftim
Copy link
Contributor

sftim commented Apr 4, 2023

/sig cli

@k8s-ci-robot k8s-ci-robot added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Apr 4, 2023
@sftim
Copy link
Contributor

sftim commented Apr 4, 2023

/hold
/approve

I agree with the intent of this PR. You are welcome to unhold it once it has an LGTM that you are happy with @alexzielenski

(any org member can LGTM, so you might get a review that says LGTM even before the last bug you're aware of is actually dealt with).

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 4, 2023
@sftim
Copy link
Contributor

sftim commented Apr 4, 2023

PS. Would be nice to record that intent in the PR description.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sftim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 4, 2023
@mickeyboxell
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 5, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4f1ece35f7eeab360f06282f67315e88d686508c

@mickeyboxell
Copy link
Contributor

@alexzielenski If you are comfortable removing the hold from this PR, we can get it merged.

@reylejano
Copy link
Member

We may have to compare with a kubectl ref docs generation after the 1.27 release

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 7, 2023
@k8s-ci-robot k8s-ci-robot merged commit 726a2ba into kubernetes:dev-1.27 Apr 7, 2023
@k8s-ci-robot k8s-ci-robot added this to the 1.27 milestone Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants