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

Migrate inline_values to path_to_inline_values for package install #386

Merged
merged 6 commits into from
Apr 1, 2024

Conversation

ishangupta-ds
Copy link
Contributor

@ishangupta-ds ishangupta-ds commented Mar 20, 2024

  1. What this PR does / why we need it:

Fully Support for Tanzu Package by migrating inline_values to path_to_inline_values for package install.

Right now, when installing the Tanzu Package, inline_values can only be specified as String or float. However, most of the Tanzu Package has structural parameters rather than String or Float. Therefore, most Tanzu Packages cannot be deployed with the TMC Provider.

This PR also fixes broken tests for some packaging feature APIs. Namely - Packages, Helm Feature and Helm Release.

  1. Which issue(s) this PR fixes

Fixes #362

  1. Additional information

Since values is written in YAML, YAML support is desirable.

  1. Special notes for your reviewer

Enhancement / Bug fix PR.

Screenshots:

Package Install

Screenshot 2024-03-29 at 4 19 26 PM

Packages

Screenshot 2024-03-28 at 11 10 22 AM

Helm Feature

Screenshot 2024-03-29 at 9 44 35 AM

Helm Release

Screenshot 2024-03-29 at 10 42 58 AM

@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 11.27451% with 181 lines in your changes are missing coverage. Please review.

Project coverage is 24.60%. Comparing base (0dfb827) to head (c0dd7f0).
Report is 2 commits behind head on main.

Files Patch % Lines
internal/helper/yaml.go 0.00% 58 Missing ⚠️
...nternal/resources/tanzupackageinstall/spec/spec.go 0.00% 38 Missing ⚠️
.../tanzupackageinstall/package_install_datasource.go 0.00% 34 Missing ⚠️
...es/tanzupackageinstall/package_install_resource.go 0.00% 26 Missing ⚠️
...esources/tanzupackageinstall/spec/cluster_scope.go 25.80% 21 Missing and 2 partials ⚠️
...nal/resources/helmrelease/resource_helm_release.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #386      +/-   ##
==========================================
- Coverage   25.23%   24.60%   -0.64%     
==========================================
  Files         195      196       +1     
  Lines       16908    17079     +171     
==========================================
- Hits         4267     4202      -65     
- Misses      12423    12678     +255     
+ Partials      218      199      -19     

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

@ishangupta-ds
Copy link
Contributor Author

...es/tanzupackageinstall/package_install_resource.go - has acceptance tests

...esources/tanzupackageinstall/spec/cluster_scope.go - we don't have construct tests across the provider

...nternal/resources/tanzupackageinstall/spec/spec.go - we don't have construct tests across the provider

...nal/resources/helmrelease/resource_helm_release.go - has acceptance tests

internal/helper/yaml.go - let me know if tests are needed for this file, since it's a simple file reading opration.

@ishangupta-ds ishangupta-ds changed the title Draft: Migrate inline_values to path_to_inline_values for package install Migrate inline_values to path_to_inline_values for package install Mar 20, 2024
@ishangupta-ds ishangupta-ds force-pushed the deprecate/inline-values branch from 3234b40 to b0dd2b1 Compare March 20, 2024 05:52
Copy link

@vmw-vjn vmw-vjn left a comment

Choose a reason for hiding this comment

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

Looking at the changes, see text & label changes for many resources beyond PackageInstall. Suggest that appropriate owners of said resources/features be looped for approval - to ensure there isn't any loss of information or intent.

@ishangupta-ds ishangupta-ds force-pushed the deprecate/inline-values branch from b0dd2b1 to e6b4fb6 Compare March 20, 2024 10:02
@ishangupta-ds ishangupta-ds requested a review from vmw-vjn March 20, 2024 10:45
@ishangupta-ds ishangupta-ds force-pushed the deprecate/inline-values branch 3 times, most recently from 23f2da4 to d415320 Compare March 21, 2024 05:12
@ishangupta-ds
Copy link
Contributor Author

Looking at the changes, see text & label changes for many resources beyond PackageInstall. Suggest that appropriate owners of said resources/features be looped for approval - to ensure there isn't any loss of information or intent.

Removed all unrelated changes.

@ishangupta-ds ishangupta-ds requested a review from ankitsny March 21, 2024 05:39
Copy link

@vmw-vjn vmw-vjn left a comment

Choose a reason for hiding this comment

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

Migrating inline_values to path_to_inline_values seems like a breaking change, to me. Due to which existing customer Terraform scripts & states might break once these proposed changes are merged.

Would suggest not removing inline_values completely instead adding as addition field path_to_inline_values to package install; so that existing TF scripts & states in use aren't broken. And future usage can be adapt to use recommended path_to_inline_values.

Please note that final say here is with the feature team. So if FT feel the need to make such breaking changes, please go ahead and confirm intent to handle all customer tickets or feedback that the change brings.

@ishangupta-ds
Copy link
Contributor Author

Migrating inline_values to path_to_inline_values seems like a breaking change, to me. Due to which existing customer Terraform scripts & states might break once these proposed changes are merged.

Would suggest not removing inline_values completely instead adding as addition field path_to_inline_values to package install; so that existing TF scripts & states in use aren't broken. And future usage can be adapt to use recommended path_to_inline_values.

Please note that final say here is with the feature team. So if FT feel the need to make such breaking changes, please go ahead and confirm intent to handle all customer tickets or feedback that the change brings.

Sure.

AkbaraliShaikh
AkbaraliShaikh previously approved these changes Mar 28, 2024
@ishangupta-ds ishangupta-ds force-pushed the deprecate/inline-values branch 2 times, most recently from afea995 to 6c82979 Compare March 29, 2024 11:07
Signed-off-by: Ishan Gupta <gishan@vmware.com>
Signed-off-by: Ishan Gupta <gishan@vmware.com>
Signed-off-by: Ishan Gupta <gishan@vmware.com>
Signed-off-by: Ishan Gupta <gishan@vmware.com>
Signed-off-by: Ishan Gupta <gishan@vmware.com>
@ishangupta-ds ishangupta-ds force-pushed the deprecate/inline-values branch from 6c82979 to 2cdf849 Compare March 29, 2024 11:15
@ishangupta-ds
Copy link
Contributor Author

@AkbaraliShaikh / @ramya-bangera / @vmw-vjn / @ankitsny Please take a look again.

@ramya-bangera
Copy link
Contributor

@ishangupta-ds - You plan to merge this to main now? or it should go to the feature branch for tap saas?

@ishangupta-ds
Copy link
Contributor Author

@ramya-bangera these bug fixes / changes are for already released SaaS features via Terraform, not related to the TAP enablement.

AkbaraliShaikh
AkbaraliShaikh previously approved these changes Apr 1, 2024
Signed-off-by: Ishan Gupta <gishan@vmware.com>
@ishangupta-ds
Copy link
Contributor Author

Please take a look again. @AkbaraliShaikh / @ramya-bangera

@ishangupta-ds ishangupta-ds merged commit ca6d54d into main Apr 1, 2024
4 checks passed
@tenthirtyam tenthirtyam deleted the deprecate/inline-values branch November 13, 2024 06:37
Copy link

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fully Support for Tanzu Package
6 participants