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

subpath field is not removed when submitting workload from file#110

Merged
rashedkvm merged 1 commit into
vmware-tanzu:mainfrom
shashwathi:iss-88
May 16, 2022
Merged

subpath field is not removed when submitting workload from file#110
rashedkvm merged 1 commit into
vmware-tanzu:mainfrom
shashwathi:iss-88

Conversation

@shashwathi
Copy link
Copy Markdown
Contributor

Pull request
subpath field is not ignored when submitting workload from file(both while creating & updating)

What this PR does / why we need it

Fixes #88

Describe testing done for PR

  • create workload with subPath
  • export the workload into a file
  • apply the workload again, subPath should not be deleted

Comment thread pkg/commands/workload_apply_test.go Outdated
@atmandhol
Copy link
Copy Markdown
Contributor

Minor nit, when we merge this, we should change the commit message from [fix] to fix: to follow the standard.

Signed-off-by: Shash Reddy <snagarajared@vmware.com>
Comment thread pkg/commands/testdata/workload-subPath.yaml
@rashedkvm rashedkvm merged commit e46017e into vmware-tanzu:main May 16, 2022
@heyjcollins
Copy link
Copy Markdown
Contributor

heyjcollins commented May 17, 2022

AC

LGTM

confirm original issue fixed

  • created workload without subPath
  • added subpath via flag
  • export the workload into a file
  • apply the workload.yaml without any additional flags, subPath was not deleted.

confirm via alternate approach-ish

  • created workload via file, including a sub-path
  • exported workload yaml
  • applied workload yaml, sub-path was not deleted

confirm removal from file not regressed

  • removed source.sub-path from workload.yaml (for existing workload)
  • applied workload yaml, confirmed sub-path was removed

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.

--sub-path is removed when submitting the exact workload.yaml which includes it already

6 participants