Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

fix: not add maven type on params if null or empty#279

Merged
shashwathi merged 3 commits into
vmware-tanzu:mainfrom
odinnordico:issue-276-maven-type-null
Aug 23, 2022
Merged

fix: not add maven type on params if null or empty#279
shashwathi merged 3 commits into
vmware-tanzu:mainfrom
odinnordico:issue-276-maven-type-null

Conversation

@odinnordico
Copy link
Copy Markdown
Contributor

Pull request

What this PR does / why we need it

When creating a workload with maven flags, the type was added as null if not provided, this PR solves that by having an different struct with type so it is not added to params if not present

Which issue(s) this PR fixes

Fixes #276

Describe testing done for PR

Local install of cli plugin agains GKE cluster with TAP 1.2

Additional information or special notes for your reviewer

image

Signed-off-by: Diego Alfonso <dalfonso@vmware.com>
Copy link
Copy Markdown
Contributor

@shashwathi shashwathi left a comment

Choose a reason for hiding this comment

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

Update type field with json tag json:"type,omitempty" to not print the field.

Use the existing MavenSource Type for this change and remove ToSource() func

Diego Alfonso added 2 commits August 23, 2022 16:04
Signed-off-by: Diego Alfonso <dalfonso@vmware.com>
@odinnordico odinnordico requested a review from shashwathi August 23, 2022 21:25
@shashwathi shashwathi merged commit da09949 into vmware-tanzu:main Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create/update/apply shouldn't include spec.params.maven.type unless --maven-type flag/value is provided in the command

3 participants