Ed Overton

Results 46 comments of Ed Overton

I'm not seeing the same behavior that you're seeing. If it were failing the way you've described, then I would expect to see failures in [semver_test.go](https://github.com/kubernetes-sigs/kustomize/blob/kustomize%2Fv5.3.0/cmd/gorepomod/internal/semver/semver_test.go), particularly TestParse/two. I tried...

Looking at this one again, I would recommend that the caller trim its whitespace prior to invoking `.Parse()`. Whitespace is not allowed in a semver, so I don't think `semver.Parse()`...

Sorry, I don't understand what you're describing. If you have a test case that shows the incorrect `semver.Parse()` behavior, will you please copy-and-paste it in an update to this ticket?...

Another thought here would be to join the lookups done by Resource.CurId(). It calls Resource.GetGvk (which calls RNode.GetApiVersion and RNode.GetKind), Resource.GetName, and Resource.GetNamespace. That means there are four independent traversals...

> Another thought here would be to join the lookups done by Resource.CurId(). I took a little time to investigate this option, and the improvement was minor at best -...

Initial results for caching the [Resource.CurId()](https://github.com/kubernetes-sigs/kustomize/blob/e219b8864/api/resource/resource.go#L447-L450) return value are very promising. I hooked cache invalidation into [Resource.setPreviousId()](https://github.com/kubernetes-sigs/kustomize/blob/e219b8864/api/resource/resource.go#L314-L319) and [resWrangler.appendReplaceOrMerge()'s case 1 for replace and merge](https://github.com/kubernetes-sigs/kustomize/blob/e219b8864/api/resmap/reswrangler.go#L579-L592), and that looks to cover...

> Initial results for caching the [Resource.CurId()](https://github.com/kubernetes-sigs/kustomize/blob/e219b8864/api/resource/resource.go#L447-L450) return value are very promising. I went ahead and created #5481 for this effort. I still have some concerns about what other code...

@shapirus, I'm not surprised #5481 left the PSM performance (#5422) as-is. The optimization in #5481 was aimed at #5425, and in that context [it has dramatic improvements](https://github.com/kubernetes-sigs/kustomize/issues/5084#issuecomment-1806477953). If I can...

> [@ephesused](https://github.com/ephesused) have you had any further time/enthusiasm to look into this? :) I have not had additional time, no. Assuming there haven't been major changes in this area, I...

This change in behavior is expected when moving past v4.5.3. Quoting from the "Index by key-value pair matching with regexp" section in https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/replacements/#field-path-format: > After [kustomize v4.5.3](https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv4.5.3), The index by...