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 the Multi-Version tutorial programatically when we run make generate #3880

Open
camilamacedo86 opened this issue Apr 27, 2024 · 4 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@camilamacedo86
Copy link
Member

What do you want to happen?

Context:

The code that appears in the docs/tutorial came from real samples under: https://github.com/kubernetes-sigs/kubebuilder/tree/master/docs/book/src

When we do changes we need to ensure that the samples are updated with the latest changes made in the PR. Therefore, when we run make generate target which is required to push any PR it will call make generate-docs see:

kubebuilder/Makefile

Lines 66 to 69 in 7af3a37

.PHONY: generate
generate: generate-testdata generate-docs ## Update/generate all mock data. You should run this commands to update the mock data after your changes.
go mod tidy
make remove-spaces

This target calls: https://github.com/kubernetes-sigs/kubebuilder/blob/master/hack/docs/generate.sh

which will:

What do we want :

We are re-generating all samples used in the tutorials already. However, we still automate this process for the Multi-Version sample in : https://github.com/kubernetes-sigs/kubebuilder/tree/master/docs/book/src/multiversion-tutorial/testdata/project which is used in the tutorial https://book.kubebuilder.io/multiversion-tutorial/tutorial

Currently, we do it manually by:

Therefore, the acceptance criteria of this task is to ensure that when we run make generate / make generate-docs we should re-generate the sample in https://github.com/kubernetes-sigs/kubebuilder/tree/master/docs/book/src/multiversion-tutorial/testdata/project and have all code examples on top of it again automatically

How to do it

Extra Labels

No response

@camilamacedo86 camilamacedo86 added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Apr 27, 2024
@tian-ren
Copy link

Hi @camilamacedo86, I would like to work on this issue as my first issue. Is it time sensitive?

@camilamacedo86
Copy link
Member Author

No, but that will b very helpful for us

@tian-ren
Copy link

Got you!

@tian-ren
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants