structured-merge-diff icon indicating copy to clipboard operation
structured-merge-diff copied to clipboard

Set list w/ atomic map types is not yet supported

Open yue9944882 opened this issue 5 years ago • 16 comments

https://github.com/kubernetes-sigs/structured-merge-diff/blob/17912732856ce1817c889fd8a8815083f6e0f826/typed/helpers.go#L211-L213

i was hitting above line when using an atomic map as the element of a set-list. is there a plan for supporting such schema? thanks! @apelisse @jennybuckley

yue9944882 avatar May 13 '20 10:05 yue9944882

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Aug 11 '20 10:08 fejta-bot

@jpbetz Good question, we should definitely add a test for that

apelisse avatar Aug 11 '20 16:08 apelisse

@yue9944882 What was your exact case?

jpbetz avatar Aug 11 '20 16:08 jpbetz

@apelisse @jpbetz thanks for reviving this thread. for my case, an example will be kubefed's model deifinition:

https://github.com/kubernetes-sigs/kubefed/blob/fd10623848151303a8e9e0d60a0dcace49cf9c43/example/sample1/federatedconfigmap.yaml#L16-L19

the model has an array of json-patches which is a map of op, path, value

yue9944882 avatar Aug 12 '20 08:08 yue9944882

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot avatar Sep 11 '20 08:09 fejta-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

fejta-bot avatar Oct 11 '20 09:10 fejta-bot

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

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/test-infra repository.

k8s-ci-robot avatar Oct 11 '20 09:10 k8s-ci-robot

/reopen /lifecycle frozen

yue9944882 avatar Oct 12 '20 06:10 yue9944882

@yue9944882: Reopened this issue.

In response to this:

/reopen /lifecycle frozen

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/test-infra repository.

k8s-ci-robot avatar Oct 12 '20 06:10 k8s-ci-robot

Thanks @yue9944882, I think @jpbetz solved this one.

Feel free to re-open if I'm wrong. /close

apelisse avatar Oct 12 '20 15:10 apelisse

@apelisse: Closing this issue.

In response to this:

Thanks @yue9944882, I think @jpbetz solved this one.

Feel free to re-open if I'm wrong. /close

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/test-infra repository.

k8s-ci-robot avatar Oct 12 '20 15:10 k8s-ci-robot

/reopen

This is clearly not implemented yet :-)

apelisse avatar Jan 06 '21 18:01 apelisse

@apelisse: Reopened this issue.

In response to this:

/reopen

This is clearly not implemented yet :-)

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/test-infra repository.

k8s-ci-robot avatar Jan 06 '21 18:01 k8s-ci-robot

I don't think it's specifically super hard to implement. I wouldn't be completely opposed to forbidding it also (I'm not completely convinced we have a good use-case for that). What does the documentation say about this (for CRDs)?

apelisse avatar Jan 06 '21 18:01 apelisse

https://v1-18.docs.kubernetes.io/docs/reference/using-api/api-concepts/#merge-strategy

apelisse avatar Jan 06 '21 18:01 apelisse

i was hitting above line when using an atomic map as the element of a set-list. is there a plan for supporting such schema?

I'd love to understand the use-case to know if it's really useful, I have concerns because:

  1. The current documentation says that's its not possible,
  2. We have to save the entire atomic element in the managedFields if they are part of a set (to know who owns which one). If people start using it by accident, they may break things in unexpected ways.

apelisse avatar Jan 07 '21 18:01 apelisse