jobset icon indicating copy to clipboard operation
jobset copied to clipboard

update gen-sdk.sh to generate sdk using docker container

Open epicseven-cup opened this issue 1 year ago • 9 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

Updates sdk generation using docker container

Which issue(s) this PR fixes:

Fixes #190

Special notes for your reviewer:

This is a draft pr

Does this PR introduce a user-facing change?

None

epicseven-cup avatar Sep 29 '24 22:09 epicseven-cup

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: epicseven-cup / name: Jacky (611b1447d07e2d05d133605d301f9d8d544527c0, abe1d456d9b25e7353acc40ec2963417807793f8, cdd94dea42dc168df223d01372c0c1423dc41f39, a4bd93a609f06a5ba05013cb3b681d4093c49436, 9747188f343ff7a166a56a931d2d332660ff5839, e81b842dda6ce6a3735eded47238fc4f29ef7312, b248701795f8acd1e27c55f20f8e0bd497876f43, 04903927e64787dbace6d43dc43e5acf417a250a, 16425394e070c29be91faa6a59e5a83691d73906, e31006d7cba3d7cecd56448c6dff1fb13fb95937, 712dcfb68360c9bbdeda91db60159b6fb3131c40, 2843c4d7c239dde34922262eccc6095fda97c619, 1ad7b04b1e45ff5e9cff3fc9d6aceca4a1d4b36d, 44a9dff3e505b1d0182a7739b0e837c1cc7928bc)

Welcome @epicseven-cup!

It looks like this is your first PR to kubernetes-sigs/jobset 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/jobset has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Sep 29 '24 22:09 k8s-ci-robot

Hi @epicseven-cup. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

k8s-ci-robot avatar Sep 29 '24 22:09 k8s-ci-robot

Deploy Preview for kubernetes-sigs-jobset ready!

Name Link
Latest commit e31006d7cba3d7cecd56448c6dff1fb13fb95937
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-jobset/deploys/6789da3e4971cf0008ee809f
Deploy Preview https://deploy-preview-681--kubernetes-sigs-jobset.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 configuration.

netlify[bot] avatar Sep 29 '24 22:09 netlify[bot]

Hi sorry for all these message, this is currently a draft pr.

The direction I was going was to just use the openapi tool docker image to generate the sdk within the gen-sdk.sh script.

I will need to up some of the old apt installs and move the generated sdk correctly though feel free to take a look

epicseven-cup avatar Sep 29 '24 23:09 epicseven-cup

/ok-to-test

danielvegamyhre avatar Sep 29 '24 23:09 danielvegamyhre

Hi sorry for all these message, this is currently a draft pr.

The direction I was going was to just use the openapi tool docker image to generate the sdk within the gen-sdk.sh script.

I will need to up some of the old apt installs and move the generated sdk correctly though feel free to take a look

No worries, tag me when it is ready for review or if you have any questions

danielvegamyhre avatar Sep 29 '24 23:09 danielvegamyhre

/hold cancel

I think it won't run tests while being in Draft.

kannon92 avatar Oct 08 '24 18:10 kannon92

/retest

kannon92 avatar Oct 08 '24 18:10 kannon92

yup sorry taking a while, I think I can finish this weekend

epicseven-cup avatar Oct 08 '24 22:10 epicseven-cup

I just noticed my mistake last weekend that I was trying to use SWAGGER_CODEGEN_FILE as conf and not SWAGGER_CODEGEN_CONF.

Everything looks good on my local machine (have both docker and podman setup). The result from

make test-integration, make verify and make test looks good as well.

The only issue that I'm encountering is that my script installs docker as binary by directly grabbing docker tar files from their website. Though this only happens if it notices that user does not have both docker and podman install (Which I noticed on the first test run log that the test machine does not have docker setup)

The link for docker tar is hard-coded to a specific version (currently set to latest of 17.03) will this be a good way to setup and generate the sdk? Also I'm not sure if I should pauses docker daemon when finish generating the sdks.

edit:

oh.. I committed some of the extra generated files.. I will clean that up

epicseven-cup avatar Oct 10 '24 01:10 epicseven-cup

/retest

epicseven-cup avatar Oct 13 '24 20:10 epicseven-cup

I removed to docker installed process so it will be similar to the python sdk docker setup

epicseven-cup avatar Oct 13 '24 20:10 epicseven-cup

Hmm seems like it is expecting a docker install ./hack/python-sdk/gen-sdk.sh: line 50: docker: command not found

epicseven-cup avatar Oct 13 '24 20:10 epicseven-cup

Hi @kannon92 @danielvegamyhre @ahg-g just a quick update from the information I got from slack. I'm going to submit a image change for jobset, by including docker into the image allowing the open api tool to be run in docker container

epicseven-cup avatar Oct 29 '24 01:10 epicseven-cup

/test

kannon92 avatar Nov 22 '24 18:11 kannon92

@kannon92: The /test command needs one or more targets. The following commands are available to trigger required jobs:

  • /test pull-jobset-test-e2e-main-1-28
  • /test pull-jobset-test-e2e-main-1-29
  • /test pull-jobset-test-e2e-main-1-30
  • /test pull-jobset-test-e2e-main-1-31
  • /test pull-jobset-test-integration-main
  • /test pull-jobset-test-unit-main
  • /test pull-jobset-verify-main

Use /test all to run all jobs.

In response to this:

/test

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-sigs/prow repository.

k8s-ci-robot avatar Nov 22 '24 18:11 k8s-ci-robot

Is this PR still relevant?

ahg-g avatar Dec 09 '24 16:12 ahg-g

Is this PR still relevant?

Yup, sorry I hadn't gotten time to submit a PR for the testing image update to include docker. I will get this in by next week

epicseven-cup avatar Dec 09 '24 17:12 epicseven-cup

I added the pr for image update to include podman (since it requires less changes to the image building process). https://github.com/kubernetes/test-infra/pull/33955

epicseven-cup avatar Dec 15 '24 23:12 epicseven-cup

I made a new pr to enable docker-in-docker for the pull-job-verify-main image, here is the link https://github.com/kubernetes/test-infra/pull/33977

epicseven-cup avatar Dec 17 '24 04:12 epicseven-cup

/retest

ahg-g avatar Dec 17 '24 04:12 ahg-g

/retest

ahg-g avatar Dec 18 '24 03:12 ahg-g

Looks like I still need to start the docker daemon within the pull-jobset-verify-main job image, I will check on that as well

epicseven-cup avatar Dec 18 '24 04:12 epicseven-cup

Looks like I still need to start the docker daemon within the pull-jobset-verify-main job image, I will check on that as well

Hi @epicseven-cup , are you able to conclude this PR?

ahg-g avatar Jan 06 '25 23:01 ahg-g

yup! I will start again this weekend

epicseven-cup avatar Jan 07 '25 00:01 epicseven-cup

I added the labels here: https://github.com/kubernetes/test-infra/pull/34123

epicseven-cup avatar Jan 11 '25 22:01 epicseven-cup

/retest

epicseven-cup avatar Jan 17 '25 03:01 epicseven-cup

looks good, on the test

epicseven-cup avatar Jan 17 '25 04:01 epicseven-cup

/lgtm /approve

ahg-g avatar Jan 17 '25 20:01 ahg-g