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: Adding skipSchemaValidation flag (#20771) #20831

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

dmosesson
Copy link
Contributor

@dmosesson dmosesson commented Nov 19, 2024

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Closes #20771

Tentatively also closes:

This allows argo to deploy helm charts that have JSON schema files for helm charts in locations that do not have internet access.

Some notes:

  • I had some issues regenerating some of the files, and probably too many of those are included (I tried to run make codegen and had issues, and make codegen-local ran with some slightly different versions I suspect.
  • The kustomize tests for me mostly failed, but I think that is more an artifact of the above, where I installed in somewhat incorrectly
  • Helm had to be updated to 3.16.0 for this change, not sure if that should be a separate PR or not (and most probably I missed some of the places it should have been updated)

@dmosesson dmosesson requested review from a team as code owners November 19, 2024 03:18
Copy link

bunnyshell bot commented Nov 19, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Besides one tweak, lgtm! Can you merge master and re-run codegen?

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
@dmosesson dmosesson force-pushed the master branch 3 times, most recently from 036c154 to 3805f94 Compare November 21, 2024 17:49
Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Nice test! One tweak

Daniel Mosesson (soandos) added 2 commits November 21, 2024 13:28
Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 55.00%. Comparing base (c6804e9) to head (5b9e20d).
Report is 432 commits behind head on master.

Files with missing lines Patch % Lines
util/helm/cmd.go 0.00% 2 Missing and 1 partial ⚠️
cmd/util/app.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20831      +/-   ##
==========================================
+ Coverage   54.97%   55.00%   +0.03%     
==========================================
  Files         324      324              
  Lines       55417    55427      +10     
==========================================
+ Hits        30464    30488      +24     
+ Misses      22334    22318      -16     
- Partials     2619     2621       +2     

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

@dmosesson
Copy link
Contributor Author

@crenshaw-dev Are there any more changes you are looking for, or its good to go from your perspective? I think all the issues flagged above have been addressed

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

Overall PR looks good to me!! Just left a quick question for understanding the extra change.

@crenshaw-dev any more concerns about the PR?

@@ -5,3 +5,4 @@ entries:
urls:
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm-1.0.0.tgz
version: 1.0.0
name: helm
Copy link
Member

Choose a reason for hiding this comment

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

QQ: Is the name field required here? I do not think this change is related to skipSchemaValidation flag changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is. In helm 3.16, this property is now required (its not documented anywhere, but the test errors were saying it was a missing required attribute). Given that helm 3.16 is a requirement for this feature, it was added here

Copy link
Member

@rumstead rumstead left a comment

Choose a reason for hiding this comment

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

LGTM

@crenshaw-dev
Copy link
Member

@ishitasequeira no concerns from me

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

Changes look good!! Thanks @dmosesson !!

@ishitasequeira ishitasequeira merged commit 9b481b1 into argoproj:master Dec 3, 2024
28 checks passed
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
* Adding skipSchemaValidation flag

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

* Adding specific test for skip schema validation

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

* Fix merge conflict

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

* Fixing index.yaml to support helm 3.16

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

---------

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
Co-authored-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
revitalbarletz pushed a commit to revitalbarletz/argo-cd that referenced this pull request Jan 20, 2025
* Adding skipSchemaValidation flag

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

* Adding specific test for skip schema validation

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

* Fix merge conflict

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

* Fixing index.yaml to support helm 3.16

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>

---------

Signed-off-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
Co-authored-by: Daniel Mosesson (soandos) <danielmosesson@gmail.com>
@jdvorak8660
Copy link

This is a fantastic change, but appears to only apply to single source applications. Is there a plan to incorporate this feature when using multiple sources?

@crenshaw-dev
Copy link
Member

@jdvorak8660 this should work fine for multi-source apps. The helm.skipSchemaValidation field is embedded in each item in the spec.sources field. They're the same struct.

@jdvorak8660
Copy link

jdvorak8660 commented Jan 24, 2025

@jdvorak8660 this should work fine for multi-source apps. The helm.skipSchemaValidation field is embedded in each item in the spec.sources field. They're the same struct.

Thanks for the response. I did not experience this when I attempted to use the option for multiple sources, but I'll go back and make sure I wasn't making some silly mistake. When it didn't work as expected I assumed it was not an option as it is also not referenced in the documentation for multiple sources.

Any chance you have an example of a working multi source application with this option I could reference?

Edit: @crenshaw-dev I may have found my issue. Can you confirm this change was only made in 2.14 (latest release candidate) and is not available in the latest stable release 2.13.3?

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.

Add support for passing --skip-schema-validation to help
5 participants