kubernetes-sigs / node-feature-discovery-operator

Operator for managing Node Feature Discovery deployment
Apache License 2.0
66 stars 29 forks source link

Run local markdown tests inside an isolated container #163

Closed fmuyassarov closed 2 years ago

fmuyassarov commented 2 years ago

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 run make 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.

Replication of https://github.com/kubernetes-sigs/node-feature-discovery/pull/882. Also, this is required because I've already changed the container image we use in https://github.com/kubernetes/test-infra/pull/27376 without adding these changes here.

fmuyassarov commented 2 years ago

/cc @marquiz We need to take this a bit urgently, because PRs modifying docs will fail. Example: https://github.com/kubernetes-sigs/node-feature-discovery-operator/pull/163

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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: - ~~[OWNERS](https://github.com/kubernetes-sigs/node-feature-discovery-operator/blob/master/OWNERS)~~ [marquiz] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment