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

✨ reduce use of carvel validators #1269

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

everettraven
Copy link
Contributor

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

by implementing our own. This gives us more
freedom in maing changes and fixing bugs in the
actual validations instead of having to push
all fixes up to the carvel/kapp project.

Signed-off-by: everettraven <[email protected]>
@everettraven everettraven requested a review from a team as a code owner September 13, 2024 20:54
Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 787b148
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/66e9d478bd252600093fc888
😎 Deploy Preview https://deploy-preview-1269--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.87%. Comparing base (188858c) to head (787b148).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1269      +/-   ##
==========================================
+ Coverage   76.51%   77.87%   +1.36%     
==========================================
  Files          40       40              
  Lines        2363     2509     +146     
==========================================
+ Hits         1808     1954     +146     
  Misses        389      389              
  Partials      166      166              
Flag Coverage Δ
e2e 54.52% <7.64%> (-3.33%) ⬇️
unit 55.79% <100.00%> (+2.73%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -32,17 +32,18 @@ type Preflight struct {

func NewPreflight(crdCli apiextensionsv1client.CustomResourceDefinitionInterface, opts ...Option) *Preflight {
changeValidations := []kappcus.ChangeValidation{
Copy link
Member

Choose a reason for hiding this comment

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

How much further would we need to go to fully drop the kapp dependency?

Copy link
Contributor Author

@everettraven everettraven Sep 17, 2024

Choose a reason for hiding this comment

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

I think it would mostly be anything in our codebase that uses the kappcus import library which is probably just in this package. Level of effort depends on whether we want to re-implement in our own way such that we don't need to adhere to Apache 2.0 license guidelines or if we would want to copy-paste the code we need including maintaining and adhering to the Apache 2.0 license guidelines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That being said, I would say totally dropping the kapp dependency should be seen outside the scope of this PR. While this PR reduces our use of the carvel provided validators, the main reason for this PR is to address some minor bugs in the output when the checks fail. My approach to doing this just happens to reduce the carvel validator use because I felt it would be easier for us to maintain long-term as opposed to contributing the changes all the way upstream.

Copy link
Member

Choose a reason for hiding this comment

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

Are the check implementations copy/pasted from kapp or new implementations? I ask because:

  • If they are copy/pasted:
    • I don't need to review them as carefully,
    • BUT, we need some sort of attribution?
  • If they are not copy/pasted,
    • We should review thoroughly
    • We don't need attribution

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are not copy/paste-ed but inspired by the carvel implementation (which I helped write so hard to not be inspired by), but I think the implementation is changed significantly enough that it doesn't require any attribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants