Closed errordeveloper closed 11 months ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: errordeveloper Once this PR has been reviewed and has the lgtm label, please assign xmcqueen for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Welcome @errordeveloper!
It looks like this is your first PR to kubernetes-sigs/kubetest2 🎉. 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/kubetest2 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:
Hi @errordeveloper. 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.
@amwat as you mentioned in https://github.com/kubernetes-sigs/kubetest2/pull/135#pullrequestreview-667126661
Usability of deployers as libraries is questionable considering the contract between deployers and testers is still binary invocation.
I can see that testers are already exported, e.g.:
I'm sure there are many exec's, but I'm not hugely objected as long as I can start with outer logic controlled by a Go program. The chances are that I might have to implement a custom tester.
Hi
Thank you for opening this PR. The deployers are effectively a finished program that shouldn't be called as libraries. If there is a missing feature, we recommend that you open a PR here and add it.
We have external implementations listed here that use pkg/* to create their own deployers.
What problem are you trying to solve?
@upodroid thanks for your comment. I thought this change would be reasonable given GKE deployer is public (see #135).
I'd like to use kubetest2 in a project and will likely have a custom tester. I'd rather avoid creating a bash wrapper or a go program that uses exec, I don't see what would be the issue in exporting these structs, given GKE one is already is already exported. If there was a major objection, I suppose you should put the package under internal/
, which would give a stronger signal that something is not intended to be shared outside the repo.
We have external implementations listed here that use pkg/* to create their own deployers.
What I want to do is use GKE and kind deployers, at the moment I can use the GKE one, but not kind. I'd rather not fork/rewrite same code.
I'd like to use kubetest2 in a project and will likely have a custom tester. I'd rather avoid creating a bash wrapper or a go program that uses exec, I don't see what would be the issue in exporting these structs, given GKE one is already is already exported.
kubetest2 should be used like this. https://github.com/kubernetes-sigs/kubetest2/blob/master/kubetest2-gce/ci-tests/buildupdown-legacy.sh or https://github.com/kubernetes-sigs/kubetest2/blob/master/kubetest2-tester-node/ci-tests/gce-test.sh It should be the only program you call to run the entire process of creating a cluster, testing it and tearing it down.
The GKE one was exported for another project I work on and it wasn't a good idea. https://github.com/knative/hack/pull/230 we embedded that deployer in another program and it was painful to work with and I got rid of it.
Thanks, I guess I'll just look for something else or write my own library.
The GKE one was exported for another project I work on and it wasn't a good idea. https://github.com/knative/hack/pull/230 we embedded that deployer in another program and it was painful to work with and I got rid of it.
Just curious, what was the most painful aspect of that?
this will ensure that each deployer can be easily called as a library, which GKE deployer already allows (kubernetes-sigs/kubetest2#135)