Skip to content
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

refactor: make each rule implement validationrule.Interface #130

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

mattwelke
Copy link
Member

Description

Makes each rule in the plugin implement validationrule.Interface from validator@v0.1.7.

Signed-off-by: Matt Welke <matt.welke@spectrocloud.com>
@mattwelke mattwelke requested a review from a team as a code owner August 22, 2024 19:33
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement Enhancement to an existing feature labels Aug 22, 2024
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Files Patch % Lines
api/v1alpha1/maasvalidator_types.go 66.66% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
- Coverage   74.92%   74.78%   -0.15%     
==========================================
  Files           9        9              
  Lines         343      349       +6     
==========================================
+ Hits          257      261       +4     
- Misses         70       72       +2     
  Partials       16       16              
Files Coverage Δ
pkg/validators/dns/internal_dns_validator.go 95.65% <100.00%> (ø)
pkg/validators/os/os_validator.go 94.44% <100.00%> (ø)
api/v1alpha1/maasvalidator_types.go 88.88% <66.66%> (-11.12%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cab9803...1fa4bf8. Read the comment docs.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 22, 2024
@ahmad-ibra ahmad-ibra merged commit 381e3ab into main Aug 22, 2024
8 checks passed
@ahmad-ibra ahmad-ibra deleted the refactor/validation-rule-interface branch August 22, 2024 20:10
mattwelke pushed a commit that referenced this pull request Aug 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.8](v0.0.7...v0.0.8)
(2024-08-22)


### Other

* satisfy ValidationRule
([#121](#121))
([5894f51](5894f51))


### Dependency Updates

* **deps:** update module github.com/onsi/ginkgo/v2 to v2.20.0
([951e094](951e094))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.20.1
([cab9803](cab9803))
* **deps:** update module github.com/validator-labs/validator to v0.1.2
([df63d44](df63d44))
* **deps:** update module github.com/validator-labs/validator to v0.1.5
([#123](#123))
([a856370](a856370))
* **deps:** update module github.com/validator-labs/validator to v0.1.6
([5dbc31f](5dbc31f))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.19.0
([#124](#124))
([e903cc7](e903cc7))


### Refactoring

* make each rule implement `validationrule.Interface`
([#130](#130))
([381e3ab](381e3ab))
* support direct rule evaluation
([#118](#118))
([e4d873d](e4d873d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@mattwelke mattwelke restored the refactor/validation-rule-interface branch August 23, 2024 00:10
ahmad-ibra pushed a commit that referenced this pull request Aug 23, 2024
## Description
Forgot two of the four rules when doing
#130. This
does the rest.

Signed-off-by: Matt Welke <matt.welke@spectrocloud.com>
ahmad-ibra pushed a commit that referenced this pull request Aug 23, 2024
## Description
Forgot two of the four rules when doing
#130. This
does the rest.

Signed-off-by: Matt Welke <matt.welke@spectrocloud.com>
mattwelke pushed a commit that referenced this pull request Aug 23, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.8](v0.0.7...v0.0.8)
(2024-08-23)


### Bug Fixes

* embedding structs related to `validationrule.Interface`
([#135](#135))
([4ebf38a](4ebf38a))


### Other

* assert that PluginSpec is implemented
([#133](#133))
([cf2c23f](cf2c23f))
* satisfy ValidationRule
([#121](#121))
([5894f51](5894f51))


### Dependency Updates

* **deps:** update module github.com/canonical/gomaasclient to v0.7.0
([4942f99](4942f99))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.20.0
([951e094](951e094))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.20.1
([cab9803](cab9803))
* **deps:** update module github.com/validator-labs/validator to v0.1.2
([df63d44](df63d44))
* **deps:** update module github.com/validator-labs/validator to v0.1.5
([#123](#123))
([a856370](a856370))
* **deps:** update module github.com/validator-labs/validator to v0.1.6
([5dbc31f](5dbc31f))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.19.0
([#124](#124))
([e903cc7](e903cc7))


### Refactoring

* make each rule implement `validationrule.Interface`
([#130](#130))
([381e3ab](381e3ab))
* make remaining rules implement rule interface
([#131](#131))
([ed0bc5b](ed0bc5b))
* support direct rule evaluation
([#118](#118))
([e4d873d](e4d873d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
TylerGillson added a commit that referenced this pull request Aug 23, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.8](v0.0.7...v0.0.8)
(2024-08-23)


### Bug Fixes

* embedding structs related to `validationrule.Interface`
([#135](#135))
([4ebf38a](4ebf38a))


### Other

* assert that PluginSpec is implemented
([#133](#133))
([cf2c23f](cf2c23f))
* satisfy ValidationRule
([#121](#121))
([5894f51](5894f51))


### Dependency Updates

* **deps:** update module github.com/canonical/gomaasclient to v0.7.0
([4942f99](4942f99))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.20.0
([951e094](951e094))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.20.1
([cab9803](cab9803))
* **deps:** update module github.com/validator-labs/validator to v0.1.2
([df63d44](df63d44))
* **deps:** update module github.com/validator-labs/validator to v0.1.5
([#123](#123))
([a856370](a856370))
* **deps:** update module github.com/validator-labs/validator to v0.1.6
([5dbc31f](5dbc31f))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.19.0
([#124](#124))
([e903cc7](e903cc7))


### Refactoring

* make each rule implement `validationrule.Interface`
([#130](#130))
([381e3ab](381e3ab))
* make remaining rules implement rule interface
([#131](#131))
([ed0bc5b](ed0bc5b))
* support direct rule evaluation
([#118](#118))
([e4d873d](e4d873d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
mattwelke pushed a commit that referenced this pull request Aug 24, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.11](v0.0.11...v0.0.11)
(2024-08-24)


### Other

* add retract directive for versions v0.0.8-v0.0.10, release 0.0.11
([#147](#147))
([27e1988](27e1988))
* assert that PluginSpec is implemented
([#133](#133))
([cf2c23f](cf2c23f))
* manually set version to 0.0.11 for release-please
([#145](#145))
([f26f1fa](f26f1fa))
* release 0.0.11
([#149](#149))
([297bb73](297bb73))


### Dependency Updates

* **deps**: update module github.com/validator-labs/validator to v0.1.8
* **deps:** update module github.com/canonical/gomaasclient to v0.7.0
([4942f99](4942f99))
* **deps:** update module github.com/validator-labs/validator to v0.1.2
([df63d44](df63d44))
* **deps:** update module github.com/validator-labs/validator to v0.1.5
([#123](#123))
([a856370](a856370))
* **deps:** update module github.com/validator-labs/validator to v0.1.6
([5dbc31f](5dbc31f))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.19.0
([#124](#124))
([e903cc7](e903cc7))


### Refactoring

* make each rule implement `validationrule.Interface`
* initial PR - make each rule implement `validationrule.Interface`
([#130](#130))
([381e3ab](381e3ab))
* bug fix 1 - embedding structs related to `validationrule.Interface`
([#135](#135))
([4ebf38a](4ebf38a))
* bug fix 2 - YAML rendering of structs embedded in rules
([#143](#143))
([c7ae66d](c7ae66d))
* make remaining rules implement rule interface
([#131](#131))
([ed0bc5b](ed0bc5b))
* support direct rule evaluation
([#118](#118))
([e4d873d](e4d873d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing feature lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants