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

feat(lsp): add validation checking to lsp #7097

Conversation

aaron-prindle
Copy link
Contributor

@aaron-prindle aaron-prindle commented Feb 10, 2022

This PR wires up the skaffold lsp to the validation logic, allowing the LSP to mark (via Diagnostics) any skaffold.yaml validation errors that occur while iterating in an IDE

Example showing this PR displaying the "Duplicate Image" validation rule in an IDE:
image

@aaron-prindle aaron-prindle requested a review from a team as a code owner February 10, 2022 05:13
@aaron-prindle aaron-prindle force-pushed the add-validation-logic-lsp-v2 branch from ec49e6b to b746f0d Compare February 10, 2022 05:17
@aaron-prindle aaron-prindle changed the title Add validation logic to lsp feat(lsp): add validation checking to lsp Feb 10, 2022
@aaron-prindle aaron-prindle force-pushed the add-validation-logic-lsp-v2 branch 2 times, most recently from 8382042 to 98ec01c Compare February 10, 2022 19:33
@tejal29
Copy link
Contributor

tejal29 commented Feb 17, 2022

Looks like some tests are failing. Can you please update the PR?

@aaron-prindle aaron-prindle force-pushed the add-validation-logic-lsp-v2 branch from 98ec01c to a1c761a Compare February 17, 2022 21:31
@aaron-prindle
Copy link
Contributor Author

aaron-prindle commented Feb 17, 2022

PR is updated, should be fixed now. Accidentally pushed a change to examples/profile-test which had a validation error (the change made to demonstrate how this works in the image posted)

@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #7097 (a1c761a) into main (290280e) will decrease coverage by 1.96%.
The diff coverage is 56.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7097      +/-   ##
==========================================
- Coverage   70.48%   68.52%   -1.97%     
==========================================
  Files         515      558      +43     
  Lines       23150    26148    +2998     
==========================================
+ Hits        16317    17917    +1600     
- Misses       5776     7002    +1226     
- Partials     1057     1229     +172     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/deploy.go 52.00% <ø> (-1.85%) ⬇️
cmd/skaffold/app/cmd/dev.go 84.61% <0.00%> (ø)
cmd/skaffold/app/cmd/render.go 36.66% <0.00%> (-4.72%) ⬇️
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/inspect_tests.go 62.50% <14.28%> (-1.14%) ⬇️
cmd/skaffold/app/cmd/lsp.go 28.12% <28.12%> (ø)
cmd/skaffold/app/cmd/fix.go 68.85% <40.00%> (-7.62%) ⬇️
cmd/skaffold/app/cmd/lint.go 42.85% <42.85%> (ø)
cmd/skaffold/app/cmd/find_configs.go 48.88% <50.00%> (+0.24%) ⬆️
cmd/skaffold/app/skaffold.go 76.19% <70.00%> (-8.43%) ⬇️
... and 212 more

Continue to review full report at Codecov.

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

@aaron-prindle
Copy link
Contributor Author

I believe the kokoro test failure is a known flake -
TestBuildKanikoInsecureRegistry

@aaron-prindle aaron-prindle added the kokoro:force-run forces a kokoro re-run on a PR label Feb 17, 2022
@kokoro-team kokoro-team removed the kokoro:force-run forces a kokoro re-run on a PR label Feb 17, 2022
Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

LGTM!

@aaron-prindle aaron-prindle merged commit f191006 into GoogleContainerTools:main Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants