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

Use merge patch instead of Update method in test harness. #606

Merged

Conversation

jbarrick-mesosphere
Copy link
Member

@jbarrick-mesosphere jbarrick-mesosphere commented Jul 19, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:

This fixes the test harness to use a merge patch instead of Update. In our previous use of Update, we were replacing entire objects when updating them (e.g., if status is not defined in YAML it would get wiped out on update). Instead of using Update, we use the merge patching method.

We do not use strategic merge patch as it does not work with CRDs and my tests indicate the proper behavior that we want is achieved using only merge patch.

Additionally, as a side effect of this change, only minimal updates need to be defined in test steps.

If validated well, this can guide the implementation of CreateOrUpdate in KUDO (or be the implementation of CreateOrUpdate).

Does this PR introduce a user-facing change?:

The test harness now uses merge patching to update objects.

@jbarrick-mesosphere
Copy link
Member Author

It's not clear to me what benefit using strategic merge has over regular merge.

@jbarrick-mesosphere jbarrick-mesosphere merged commit c27a5be into kudobuilder:master Jul 23, 2019
@jbarrick-mesosphere jbarrick-mesosphere deleted the test-patching branch July 23, 2019 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants