-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Drop unnecessary steps and better logging when generating docs #3435
Comments
@Kavinjsir: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@Kavinjsir |
+1, IMO we need to:
I am adding a good first issue on this one. If you be able to help on this one would be great. 🥇 |
Sure let me work on this @camilamacedo86 Thanks |
as descirbed by @Kavinjsir I have reprroduced the issue.
as I am more of a beginner I checked the gnereate_samples.go and couldnt find any print statement that print about docker. Also I have chekced two three related makefile but couldnt find the same. Can you please help me locate the file where changes are needed? Also through this pr we will try to add stack traces of which file and line have produced the error so user have ease as described above by @Kavinjsir also the component config tutorial is deprecated? right. Then why are we solving the issue. Sorry for the noob questions. |
What is required to be done in this task: 1) What is the main go of this task:The main go of this task is ensure that for each operation done in the hack implementation to generate the doc samples we have a check to verify the errors with an information that help us to know what fails so that we can fix it. For example, see: kubebuilder/hack/docs/internal/cronjob-tutorial/generate_cronjob.go Lines 469 to 475 in c2fbb3e
The both operations has an message 2) Second expected improvementSee the description kubebuilder/test/e2e/utils/test_context.go Lines 241 to 251 in c2fbb3e
Therefore, in the sample case we call Destroy but we do not need to call NOTE: It is recommended to create one PR for each improvement so that it will make easier the review process. |
Sure. I will first focus on the first task. |
Also can you please let me know how should I check my changes. |
I have done some research on my own it looks like withstack function can be used to debug errors more efficiently. i will try if succeded I will try to send the pr. |
I think we may also take care about: making sure that the execution of For now, the code for generation assumes the env provides I guess this might lead to confusion when we have updates the document to sync with certain plugins updates. |
So you mean that we should first update the kubebuilder repository and then generate docs which will be easy for users as they dont need to remember to run make install before make generate. right? |
Agree that this is an issue, that we are directly using the /assign @Kavinjsir |
What do you want to happen?
Background
1. Unnecessary
docker
commandsCurrently executing
![Screen Shot 2023-05-29 at 12 03 44 PM](https://private-user-images.githubusercontent.com/18136486/241769859-087f93a5-883e-4d45-9f43-a9ee5ddc68dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODUwMTEsIm5iZiI6MTcyMDM4NDcxMSwicGF0aCI6Ii8xODEzNjQ4Ni8yNDE3Njk4NTktMDg3ZjkzYTUtODgzZS00ZDQ1LTlmNDMtYTllZTVkZGM2OGRkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDIwMzgzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ4ODc1NWIwMzhhNDlkZDAzMGFmM2FhODgyNDAzZTI0OWJiODQ2YTFiZDg4NThhOTVhOTAwMDViZWJmNjk4YjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oqNxP469Xe73mmN7JBS8Z2FpV80J19ffvmcTQrOOHrE)
make generate-docs
will triggeddocker rmi -f
, which might not be necessary:2. Hard to debugging when error happens during docs generation
Another case is: when error happens during docs generation by
![Screen Shot 2023-05-29 at 12 06 27 PM](https://private-user-images.githubusercontent.com/18136486/241770815-99ab5bec-ea1e-4d25-b847-9276e73d01d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODUwMTEsIm5iZiI6MTcyMDM4NDcxMSwicGF0aCI6Ii8xODEzNjQ4Ni8yNDE3NzA4MTUtOTlhYjViZWMtZWExZS00ZDI1LWI4NDctOTI3NmU3M2QwMWQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDIwMzgzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQwOWU1ZTUzMTBhZGYyOTY5ZmQ3Y2VmMTY4NjRhMzY2YmE0Mjg1YWFlM2RhNDA0M2M1ZmMxMTBhYTRjZjY2NDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5BZ_DrkuSExJe4oupmDSt8NtPmTkbt-c7ZfXVhVGKac)
make generate-docs
, it is hard to locate the error position from the display log info:Suggestion
make generate-docs
One Approach for suggestion 2
For the UpdateTutorial method, we can change the comment lines to
![Screen Shot 2023-05-29 at 12 09 24 PM](https://private-user-images.githubusercontent.com/18136486/241771211-0e7efcdb-f69b-4902-a1bd-452810901852.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODUwMTEsIm5iZiI6MTcyMDM4NDcxMSwicGF0aCI6Ii8xODEzNjQ4Ni8yNDE3NzEyMTEtMGU3ZWZjZGItZjY5Yi00OTAyLWExYmQtNDUyODEwOTAxODUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDIwMzgzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlMjg0MmFmZjNiOWQ0NTZiOTc1Yzc0N2JhNzg2ZDEzNWYzMTI2YTU5NDUwZGM4ZTc5NzcwMmZmYTJiMWY4ZjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.TYdExYFQc8nbObnKKMrZN3GUSNlw9c_kUN_P3H87x4k)
log.Info
:So that when running
![Screen Shot 2023-05-29 at 12 10 03 PM](https://private-user-images.githubusercontent.com/18136486/241771299-4eaf9cdf-5635-4189-98b6-4c1089070b70.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODUwMTEsIm5iZiI6MTcyMDM4NDcxMSwicGF0aCI6Ii8xODEzNjQ4Ni8yNDE3NzEyOTktNGVhZjljZGYtNTYzNS00MTg5LTk4YjYtNGMxMDg5MDcwYjcwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDIwMzgzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2MGY0YWI2NmRhNmZjM2VhZWIxNjU2OWJhYjA2MmQ0NWU1ZGViZDQ2ZjJmZTczODBkOWQ1ZWRmODA5N2YwNTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.44Xkk9MTtUdTlaFcm_30wgmsvMpl6bNZe2Evb2LsWEk)
make generate-docs
, it support trace the process:Extra Labels
/kind documentation, /kind cleanup
The text was updated successfully, but these errors were encountered: