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

EC-237 Add validate input and use policy config #1213

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

robnester-rh
Copy link
Contributor

This commit addresses EC-237 & EC-57 which marks ec validate definition as deprecated, adds ec validate input and allows ec validate input to utilize a policy config file in a similar manner as the ec validate image command.

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Merging #1213 (e2b64d8) into main (c777a88) will decrease coverage by 1.89%.
The diff coverage is 58.58%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1213      +/-   ##
==========================================
- Coverage   84.31%   82.43%   -1.89%     
==========================================
  Files          67       72       +5     
  Lines        5338     5721     +383     
==========================================
+ Hits         4501     4716     +215     
- Misses        837     1005     +168     
Flag Coverage Δ
acceptance 66.04% <27.91%> (-3.16%) ⬇️
generative 4.31% <ø> (ø)
integration 18.10% <ø> (ø)
unit 75.85% <60.58%> (-0.60%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/validate/definition.go 97.08% <100.00%> (+0.02%) ⬆️
cmd/validate/image.go 97.57% <100.00%> (+2.32%) ⬆️
cmd/validate/validate.go 100.00% <100.00%> (ø)
...ation_snapshot_image/application_snapshot_image.go 72.75% <100.00%> (-0.47%) ⬇️
internal/policy/source/source.go 96.15% <100.00%> (+1.70%) ⬆️
internal/policy/source/git_config.go 78.37% <50.00%> (ø)
internal/validate/helpers.go 74.28% <74.28%> (ø)
internal/policy/policy.go 82.15% <17.64%> (-4.46%) ⬇️
internal/input/validate.go 80.00% <80.00%> (ø)
internal/evaluation_target/input/input.go 0.00% <0.00%> (ø)
... and 2 more

@lcarva
Copy link
Member

lcarva commented Dec 11, 2023

Run UPDATE_SNAPS=true make acceptance to update the snapshots for the acceptance tests.

@lcarva
Copy link
Member

lcarva commented Dec 11, 2023

I think you need to rebase from main to get rid of the linting errors.

@robnester-rh
Copy link
Contributor Author

UPDATE_SNAPS=true make acceptance

Thanks, but this is failing locally. I had rebased before pushing...but I'll check it again.

@robnester-rh robnester-rh force-pushed the EC-237 branch 2 times, most recently from 6306bc1 to c135d8c Compare December 11, 2023 21:07
cmd/validate/definition.go Outdated Show resolved Hide resolved
cmd/validate/input.go Outdated Show resolved Hide resolved
cmd/validate/input.go Outdated Show resolved Hide resolved
cmd/validate/input.go Show resolved Hide resolved
cmd/validate/input.go Outdated Show resolved Hide resolved
internal/input/report_test.go Outdated Show resolved Hide resolved
internal/input/report_test.go Show resolved Hide resolved
internal/input/report_test.go Outdated Show resolved Hide resolved
internal/input/report_test.go Outdated Show resolved Hide resolved
internal/policy/policy.go Show resolved Hide resolved
@robnester-rh robnester-rh marked this pull request as draft December 11, 2023 21:46
Copy link

sonarcloud bot commented Dec 12, 2023

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

13 New issues
0 Security Hotspots
No data about Coverage
1.1% Duplication on New Code

See analysis details on SonarCloud

@robnester-rh robnester-rh marked this pull request as ready for review December 12, 2023 15:02
@robnester-rh robnester-rh requested a review from lcarva December 12, 2023 15:02
@robnester-rh robnester-rh force-pushed the EC-237 branch 2 times, most recently from e9b139b to 6aa6a86 Compare December 12, 2023 15:19
@zregvart
Copy link
Member

/retest

1 similar comment
@lcarva
Copy link
Member

lcarva commented Dec 14, 2023

/retest

go.mod Show resolved Hide resolved
internal/input/report.go Outdated Show resolved Hide resolved
internal/input/report.go Outdated Show resolved Hide resolved
This commit addresses EC-237 & EC-57 which marks `ec validate
definition` as deprecated, adds `ec validate input` and allows `ec
validate input` to utilize a policy config file in a similar manner as
the `ec validate image` command.
Copy link
Member

@lcarva lcarva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's some linting issues, but otherwise LGTM! Let's get this merged once that's addressed.

@robnester-rh robnester-rh merged commit 0c22525 into enterprise-contract:main Dec 14, 2023
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants