-
Notifications
You must be signed in to change notification settings - Fork 256
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
Run local markdown tests inside an isolated container #882
Conversation
Hi @fmuyassarov. 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 Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test run on an isolated container at /~https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/node-feature-discovery/node-feature-discovery-presubmits.yaml#L38.
If what you want is a devel make
target, then you need to have in consideration the above.
Yes, so my plan is run it in a container when testing locally. If I am not wrong, this won't break Prow tests too, it is just that there will be an extra container created within prowJob container. |
I think the idea makes sense. Makes life easier for most of the people
I think the idea behind he scripts under
WDYT? |
Got it.
Yes this should work and I'm fine with this. I will just mention that, we can reuse the same scripts/test-infra/mdlint.sh for both local and Prow tests. When running on Prow, we just have to add variable in test infra with |
And to put it in other words, the stuff under
Yeah, I think this is fine. No need to have two separate scripts |
Hmm, actually what I don't like in this is the recursive nature of the script. With a small mistake end up with infinite loop of nested containers... There should be no duplication with the scripts: one script simply runs mdlint, another script runs the first one in a container environment, and test-infra script simply calls the first one as well. WDYT? |
Sorry perhaps I confused you. But I'm not changing how we run tests in Prow, because in prow config, we will have
Basically nothing changes from the Prow's perspective and we are not having nested containers. As a developer who wants to test locally, we would just run |
It is the same as Prow, because ProwJob also creates the same temporary container with the same container image that we are using here(ruby:slim) |
I've updated kubernetes/test-infra#27376 to match the changes. Let know what you think. Thanks |
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
1704c4a
to
1e3bfcc
Compare
Thanks for reviews Markus. Updated as per suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviews Markus. Updated as per suggestion.
Thanks, looks quite simple and clean to me now 😎 Others might see it otherwisem though....
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ArangoGutierrez, fmuyassarov, marquiz 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 |
/cherry-pick release-0.11 |
@fmuyassarov: #882 failed to apply on top of branch "release-0.11":
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. |
well, I will do it manually:) |
When working on a patch that touches docs/, there is no way to test changes against markdown checks before submitting a PR. In fact, we have a makefile target
mdlint
but it has a prerequisite of having mdl installed on the developer machine. What do you think of swapping the tasks of mdlint Makefile target with scripts/test-infra/mdlint.sh script with minor modifications so that developer can just runmake mdlint
which calls scripts/test-infra/mdlint.sh and the tests get executed within a container. Once execution is completed the temporary container gets removed so that we don't have garbage collected. I've chosen ruby:slim image (70.39 MB), which is almost five times smaller than ruby:2.7 (321.36 MB) that we use in our Prow tests.