mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-10 10:13:50 +08:00
This mostly eliminates the need to hand-write validation code. This PR is a long series of commits which add DV for most of Actor and all of Atespace. Here is a map to the commits: * The first few take a dep on a new Kubernetes tag, import the code into third_party, and apply a single patch. Because we have different Go modules for tools, I had to do it twice. When that patch lands, we can revert these commits, but that won't be until the 1.38 cycle in a few months. * The next commits slowly add DV support, so a human can review each of them in a reasonable amount of time. The emphasis is on great test cases. * I made a bad choice early on as to where to generate the code into, so I moved it. Rebasing on that was exceedingly hard, so I left it as a move. * This required changing update/go-generate -> update/codegen -- we need to get the ordering of tools right, which `go generate` does not guarantee. * Then I added a "middle" layer called "ServiceImpl" between the RPC and storage layers. This allows things like workflow to call the same business logic as the RPC layer, including validation. Lots of test fixes. * Then I finished the Create() and Update() paths for Actor. Those represent the "right" (or closest to) way to implement resources, and tests for validation. I strongly encourage reviewers to read it commit-by-commit. Rebasing this is VERY tedious, so the sooner it lands or dies completely, the better. Then we can start converting the rest. `./hack/run-tool.sh validation-gen --docs` will produce some docs on the tool and the available tags. @laoj2 @juli4n @EItanya @HavenXia @lalitc375 @yongruilin @jpbetz FYI
61 lines
2.5 KiB
AMPL
61 lines
2.5 KiB
AMPL
module github.com/agent-substrate/substrate/hack/tools/code-generator
|
|
|
|
go 1.26.1
|
|
|
|
require (
|
|
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
|
|
github.com/fxamacker/cbor/v2 v2.9.2 // indirect
|
|
github.com/go-logr/logr v1.4.4 // indirect
|
|
github.com/go-openapi/jsonpointer v1.0.0 // indirect
|
|
github.com/go-openapi/jsonreference v1.0.0 // indirect
|
|
github.com/go-openapi/swag v0.28.0 // indirect
|
|
github.com/go-openapi/swag/cmdutils v0.28.0 // indirect
|
|
github.com/go-openapi/swag/conv v0.28.0 // indirect
|
|
github.com/go-openapi/swag/fileutils v0.28.0 // indirect
|
|
github.com/go-openapi/swag/jsonutils v0.28.0 // indirect
|
|
github.com/go-openapi/swag/loading v0.28.0 // indirect
|
|
github.com/go-openapi/swag/mangling v0.28.0 // indirect
|
|
github.com/go-openapi/swag/netutils v0.28.0 // indirect
|
|
github.com/go-openapi/swag/pools v0.28.0 // indirect
|
|
github.com/go-openapi/swag/stringutils v0.28.0 // indirect
|
|
github.com/go-openapi/swag/typeutils v0.28.0 // indirect
|
|
github.com/go-openapi/swag/yamlutils v0.28.0 // indirect
|
|
github.com/google/gnostic-models v0.7.1 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
|
|
github.com/spf13/pflag v1.0.10 // indirect
|
|
github.com/x448/float16 v0.8.4 // indirect
|
|
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
|
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
|
golang.org/x/mod v0.40.0 // indirect
|
|
golang.org/x/net v0.58.0 // indirect
|
|
golang.org/x/sync v0.22.0 // indirect
|
|
golang.org/x/text v0.41.0 // indirect
|
|
golang.org/x/tools v0.49.0 // indirect
|
|
google.golang.org/protobuf v1.36.12 // indirect
|
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
|
k8s.io/apimachinery v0.37.0-rc.0 // indirect
|
|
k8s.io/code-generator v0.37.0-rc.0 // indirect
|
|
k8s.io/gengo/v2 v2.0.0-20260408192533-25e2208e0dc3 // indirect
|
|
k8s.io/klog/v2 v2.140.0 // indirect
|
|
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect
|
|
k8s.io/streaming v0.37.0-rc.0 // indirect
|
|
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 // indirect
|
|
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
|
|
sigs.k8s.io/randfill v1.0.0 // indirect
|
|
sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect
|
|
sigs.k8s.io/yaml v1.6.0 // indirect
|
|
)
|
|
|
|
tool (
|
|
k8s.io/code-generator/cmd/client-gen
|
|
k8s.io/code-generator/cmd/informer-gen
|
|
k8s.io/code-generator/cmd/lister-gen
|
|
k8s.io/code-generator/cmd/validation-gen
|
|
)
|
|
|
|
replace k8s.io/code-generator => ./third_party/k8s.io/code-generator
|
|
|
|
replace k8s.io/apimachinery => ./third_party/k8s.io/apimachinery
|