Skip to content

Commit

Permalink
RHCLOUD-34798 - Upgrade to protovalidate to handle message validation (
Browse files Browse the repository at this point in the history
…project-kessel#57)

* Update validation around proto files

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Add validation middleware & remove validateAll calls from services

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Update cluster & policy validation

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Rebase & update validation test

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Rebase

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Rebase & update few protos

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Rebase again :(

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Rebase

Signed-off-by: Jonathan Marcantonio <[email protected]>

---------

Signed-off-by: Jonathan Marcantonio <[email protected]>
  • Loading branch information
lennysgarage authored Sep 3, 2024
1 parent 43f4916 commit c6f6d49
Show file tree
Hide file tree
Showing 70 changed files with 610 additions and 8,660 deletions.
2 changes: 0 additions & 2 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ RUN ln -s /usr/local/go/bin/go /usr/local/bin/go
RUN go install google.golang.org/protobuf/cmd/[email protected]
RUN go install google.golang.org/grpc/cmd/[email protected]
RUN go install github.com/go-kratos/kratos/cmd/protoc-gen-go-http/[email protected]
RUN go install github.com/envoyproxy/[email protected]
RUN go install github.com/google/gnostic/cmd/[email protected]

# Install Buf
Expand All @@ -27,6 +26,5 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1052.1724178568
COPY --from=builder /root/go/bin/protoc-gen-go /usr/local/bin/protoc-gen-go
COPY --from=builder /root/go/bin/protoc-gen-go-grpc /usr/local/bin/protoc-gen-go-grpc
COPY --from=builder /root/go/bin/protoc-gen-go-http /usr/local/bin/protoc-gen-go-http
COPY --from=builder /root/go/bin/protoc-gen-validate /usr/local/bin/protoc-gen-validate
COPY --from=builder /root/go/bin/protoc-gen-openapi /usr/local/bin/protoc-gen-openapi
COPY --from=builder /root/go/bin/buf /usr/local/bin/buf
5 changes: 0 additions & 5 deletions api/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,3 @@ plugins:
- fq_schema_naming=true
- default_response=true
- naming=proto
- local: protoc-gen-validate
opt:
- paths=source_relative
- lang=go
out: .
6 changes: 3 additions & 3 deletions api/buf.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/envoyproxy/protoc-gen-validate
commit: daf171c6cdb54629b5f51e345a79e4dd
digest: b5:c745e1521879f43740230b1df673d0729f55704efefdcfc489d4a0a2d40c92a26cacfeab62813403040a8b180142d53b398c7ca784a065e43823605ee49681de
- name: buf.build/bufbuild/protovalidate
commit: a6c49f84cc0f4e038680d390392e2ab0
digest: b5:e968392e88ff7915adcbd1635d670b45bff8836ec2415d81fc559ca5470a695dbdc30030bad8bc5764647c731079e9e7bba0023ea25c4e4a1672a7d2561d4a19
- name: buf.build/googleapis/googleapis
commit: 8bc2c51e08c447cd8886cdea48a73e14
digest: b5:b7e0ac9d192bd0eae88160101269550281448c51f25121cd0d51957661a350aab07001bc145fe9029a8da10b99ff000ae5b284ecaca9c75f2a99604a04d9b4ab
2 changes: 1 addition & 1 deletion api/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ breaking:
- kessel/inventory/v1beta1
deps:
- buf.build/googleapis/googleapis
- buf.build/envoyproxy/protoc-gen-validate
- buf.build/bufbuild/protovalidate
Loading

0 comments on commit c6f6d49

Please sign in to comment.