
Major changes: - Don't generate a patch, instead generate the merged object so it can be used with PUT - Separate tree parsing logic to collate items in a list from the delete / merge / replace / add logic when merging - Use openapi for merge strategy metadata so it works with extensions and version skew - Support multi-field mergekeys when merging lists - Support replace strategy for maps - Reduce complexity of generating order when merging lists - keep the locally defined order and append remote only-items Continue to support: - Explicitly setting fields to null - Merging lists of primitives - Don't randomize ordering when merging lists TODO: - Retain keys - Conflict detection
51 lines
1.3 KiB
Python
51 lines
1.3 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "go_default_library",
|
|
srcs = [
|
|
"factory.go",
|
|
"item.go",
|
|
"list_element.go",
|
|
"map_element.go",
|
|
"openapi.go",
|
|
"primitive_element.go",
|
|
"type_element.go",
|
|
"util.go",
|
|
"visitor.go",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pkg/kubectl/apply:go_default_library",
|
|
"//pkg/kubectl/cmd/util/openapi:go_default_library",
|
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "go_default_xtest",
|
|
srcs = ["suite_test.go"],
|
|
data = [
|
|
"//api/openapi-spec:swagger-spec",
|
|
],
|
|
deps = [
|
|
"//vendor/github.com/onsi/ginkgo:go_default_library",
|
|
"//vendor/github.com/onsi/ginkgo/config:go_default_library",
|
|
"//vendor/github.com/onsi/ginkgo/types:go_default_library",
|
|
"//vendor/github.com/onsi/gomega:go_default_library",
|
|
],
|
|
)
|
|
|
|
filegroup(
|
|
name = "package-srcs",
|
|
srcs = glob(["**"]),
|
|
tags = ["automanaged"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
filegroup(
|
|
name = "all-srcs",
|
|
srcs = [":package-srcs"],
|
|
tags = ["automanaged"],
|
|
visibility = ["//visibility:public"],
|
|
)
|