Skip to content

align frontend cluster CRUD to use internal types#3379

Merged
deads2k merged 3 commits intomainfrom
cs-50-model-replace
Dec 2, 2025
Merged

align frontend cluster CRUD to use internal types#3379
deads2k merged 3 commits intomainfrom
cs-50-model-replace

Conversation

@deads2k
Copy link
Collaborator

@deads2k deads2k commented Nov 21, 2025

Our decoding strategy results in vastly different newObjs for patch versus put. Currently, this means that validation won't pass on the patched version. When we have actual content in cosmos we have a couple choices for patch.

  1. actually find a way to model these as patches even though we're decoding into golang types and then express patches in cosmos
  2. use a merging strategy to determine the desired client state and then use an etag based replace. If we get a conflict, try the entire thing again.

Currently the patching code doesn't appear clear fields when the client desires it because the merge doesn't start with an original to clear. I'm thinking 2 will be better.

However, the error handling is driving me batty, so I'm going to try to fix that first.

@github-actions
Copy link

Please rebase pull request.

@deads2k deads2k changed the title [wip] refine update/patch to demonstrate the diff align frontend cluster CRUD to use internal types Dec 1, 2025
@deads2k deads2k force-pushed the cs-50-model-replace branch from 6460fa4 to 83dc42e Compare December 1, 2025 23:05
This refacts the frontend for clusters to be internal API only.  That
means that the first step to using data from anywhere else  is to get it
into an internal type. Then take action based on that and the last step
is the convert to external for serialization.
@deads2k deads2k force-pushed the cs-50-model-replace branch from 83dc42e to 83001f8 Compare December 2, 2025 14:11
@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2025

@deads2k: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-parallel 83001f8 link false /test e2e-parallel

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

2 participants