Skip to content

Commit

Permalink
refactor merge docker and github actions workflow gen logic
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 8760: Size computation for allocation may overflow
Fix code scanning alert no. 8914: Size computation for allocation may overflow
style: format code with Gofumpt and Prettier

Signed-off-by: kpango <kpango@vdaas.org>
  • Loading branch information
kpango committed Dec 10, 2024
1 parent 6633cc9 commit 3c3d151
Show file tree
Hide file tree
Showing 99 changed files with 8,035 additions and 6,245 deletions.
5 changes: 0 additions & 5 deletions .gitfiles
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
.github/workflows/dockers-index-correction-image.yaml
.github/workflows/dockers-index-creation-image.yaml
.github/workflows/dockers-index-deletion-image.yaml
.github/workflows/dockers-index-deletion.yaml
.github/workflows/dockers-index-operator-image.yaml
.github/workflows/dockers-index-save-image.yaml
.github/workflows/dockers-loadtest-image.yaml
Expand Down Expand Up @@ -635,8 +634,6 @@ example/manifest/scylla/job.yaml
go.mod
go.sum
hack/CHANGELOG.template.md
hack/actions/gen/main.go
hack/actions/gen/main_test.go
hack/benchmark/assets/checksum/fashion-mnist-784-euclidean.md5
hack/benchmark/assets/checksum/gist-960-euclidean.md5
hack/benchmark/assets/checksum/glove-100-angular.md5
Expand Down Expand Up @@ -1463,8 +1460,6 @@ k8s/index/job/correction/configmap.yaml
k8s/index/job/correction/cronjob.yaml
k8s/index/job/creation/configmap.yaml
k8s/index/job/creation/cronjob.yaml
k8s/index/job/deletion/configmap.yaml
k8s/index/job/deletion/cronjob.yaml
k8s/index/job/save/configmap.yaml
k8s/index/job/save/cronjob.yaml
k8s/index/operator/configmap.yaml
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Vald Version: v1.7.14
- Go Version: v1.23.3
- Rust Version: v1.82.0
- Vald Version: v1.7.15
- Go Version: v1.23.4
- Rust Version: v1.83.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.2
- Helm Version: v3.16.2
- Kubernetes Version: v1.31.3
- Helm Version: v3.16.3
- NGT Version: v2.3.4
- Faiss Version: v1.9.0
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Vald Version: v1.7.14
- Go Version: v1.23.3
- Rust Version: v1.82.0
- Vald Version: v1.7.15
- Go Version: v1.23.4
- Rust Version: v1.83.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.2
- Helm Version: v3.16.2
- Kubernetes Version: v1.31.3
- Helm Version: v3.16.3
- NGT Version: v2.3.4
- Faiss Version: v1.9.0
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
### Versions

<!--- Please change the versions below along with your environment -->
- Vald Version: v1.7.14
- Go Version: v1.23.3
- Rust Version: v1.82.0
- Vald Version: v1.7.15
- Go Version: v1.23.4
- Rust Version: v1.83.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.2
- Helm Version: v3.16.2
- Kubernetes Version: v1.31.3
- Helm Version: v3.16.3
- NGT Version: v2.3.4
- Faiss Version: v1.9.0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
make coverage
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.out
Expand Down
252 changes: 218 additions & 34 deletions .github/workflows/dockers-agent-faiss-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

# DO_NOT_EDIT this workflow file is generated by https://github.com/vdaas/vald/blob/main/hack/actions/gen/main.go
# DO_NOT_EDIT this workflow file is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go

name: "Build docker image: agent-faiss"
on:
Expand All @@ -25,57 +25,241 @@ on:
- "!release/v*.*.*"
tags:
- "*.*.*"
- v*.*.*
- "*.*.*-*"
- v*.*.*
- v*.*.*-*
pull_request:
paths:
- hack/docker/gen/main.go
- dockers/agent/core/faiss/Dockerfile
- hack/actions/gen/main.go
- .github/workflows/dockers-agent-faiss-image.yaml
- "!**/*_mock.go"
- "!**/*_test.go"
- .github/actions/docker-build/action.yaml
- .github/workflows/_docker-image.yaml
- cmd/agent/core/faiss/**
- pkg/agent/core/faiss/**
- pkg/agent/internal/**
- apis/grpc/**
- .github/workflows/dockers-agent-faiss-image.yaml
- Makefile
- Makefile.d/**
- apis/grpc/v1/agent/core/*.go
- apis/grpc/v1/payload/*.go
- apis/grpc/v1/rpc/errdetails/*.go
- apis/grpc/v1/vald/*.go
- apis/proto/**
- cmd/agent/core/faiss/*.go
- dockers/agent/core/faiss/Dockerfile
- go.mod
- go.sum
- versions/GO_VERSION
- internal/**
- "!internal/**/*_test.go"
- "!internal/**/*_mock.go"
- "!internal/db/**"
- "!internal/k8s/**"
- hack/docker/gen/main.go
- internal/backoff/*.go
- internal/cache/*.go
- internal/cache/cacher/*.go
- internal/cache/gache/*.go
- internal/circuitbreaker/*.go
- internal/config/*.go
- internal/conv/*.go
- internal/core/algorithm/*.go
- internal/core/algorithm/faiss/*.go
- internal/db/kvs/redis/*.go
- internal/db/nosql/cassandra/*.go
- internal/db/rdb/mysql/*.go
- internal/db/rdb/mysql/dbr/*.go
- internal/encoding/json/*.go
- internal/errors/*.go
- internal/file/*.go
- internal/info/*.go
- internal/io/*.go
- internal/k8s/*.go
- internal/log/*.go
- internal/log/format/*.go
- internal/log/glg/*.go
- internal/log/level/*.go
- internal/log/logger/*.go
- internal/log/nop/*.go
- internal/log/retry/*.go
- internal/log/zap/*.go
- internal/net/*.go
- internal/net/control/*.go
- internal/net/grpc/*.go
- internal/net/grpc/admin/*.go
- internal/net/grpc/codes/*.go
- internal/net/grpc/credentials/*.go
- internal/net/grpc/errdetails/*.go
- internal/net/grpc/health/*.go
- internal/net/grpc/interceptor/client/metric/*.go
- internal/net/grpc/interceptor/client/trace/*.go
- internal/net/grpc/interceptor/server/logging/*.go
- internal/net/grpc/interceptor/server/metric/*.go
- internal/net/grpc/interceptor/server/recover/*.go
- internal/net/grpc/interceptor/server/trace/*.go
- internal/net/grpc/keepalive/*.go
- internal/net/grpc/logger/*.go
- internal/net/grpc/pool/*.go
- internal/net/grpc/proto/*.go
- internal/net/grpc/reflection/*.go
- internal/net/grpc/status/*.go
- internal/net/grpc/types/*.go
- internal/net/http/dump/*.go
- internal/net/http/json/*.go
- internal/net/http/metrics/*.go
- internal/net/http/middleware/*.go
- internal/net/http/rest/*.go
- internal/net/http/routing/*.go
- internal/net/quic/*.go
- internal/observability/*.go
- internal/observability/attribute/*.go
- internal/observability/exporter/*.go
- internal/observability/exporter/otlp/*.go
- internal/observability/metrics/*.go
- internal/observability/metrics/agent/core/faiss/*.go
- internal/observability/metrics/grpc/*.go
- internal/observability/metrics/info/*.go
- internal/observability/metrics/mem/*.go
- internal/observability/metrics/runtime/cgo/*.go
- internal/observability/metrics/runtime/goroutine/*.go
- internal/observability/metrics/version/*.go
- internal/observability/trace/*.go
- internal/os/*.go
- internal/params/*.go
- internal/rand/*.go
- internal/runner/*.go
- internal/safety/*.go
- internal/servers/*.go
- internal/servers/server/*.go
- internal/servers/starter/*.go
- internal/strings/*.go
- internal/sync/*.go
- internal/sync/errgroup/*.go
- internal/sync/semaphore/*.go
- internal/sync/singleflight/*.go
- internal/timeutil/*.go
- internal/timeutil/location/*.go
- internal/tls/*.go
- internal/version/*.go
- pkg/agent/core/faiss/config/*.go
- pkg/agent/core/faiss/handler/grpc/*.go
- pkg/agent/core/faiss/handler/rest/*.go
- pkg/agent/core/faiss/router/*.go
- pkg/agent/core/faiss/service/*.go
- pkg/agent/core/faiss/usecase/*.go
- pkg/agent/internal/kvs/*.go
- pkg/agent/internal/memstore/*.go
- pkg/agent/internal/metadata/*.go
- pkg/agent/internal/vqueue/*.go
- versions/FAISS_VERSION
- Makefile
- Makefile.d/**
- versions/GO_VERSION
pull_request_target:
paths:
- hack/docker/gen/main.go
- dockers/agent/core/faiss/Dockerfile
- hack/actions/gen/main.go
- .github/workflows/dockers-agent-faiss-image.yaml
- "!**/*_mock.go"
- "!**/*_test.go"
- .github/actions/docker-build/action.yaml
- .github/workflows/_docker-image.yaml
- cmd/agent/core/faiss/**
- pkg/agent/core/faiss/**
- pkg/agent/internal/**
- apis/grpc/**
- .github/workflows/dockers-agent-faiss-image.yaml
- Makefile
- Makefile.d/**
- apis/grpc/v1/agent/core/*.go
- apis/grpc/v1/payload/*.go
- apis/grpc/v1/rpc/errdetails/*.go
- apis/grpc/v1/vald/*.go
- apis/proto/**
- cmd/agent/core/faiss/*.go
- dockers/agent/core/faiss/Dockerfile
- go.mod
- go.sum
- versions/GO_VERSION
- internal/**
- "!internal/**/*_test.go"
- "!internal/**/*_mock.go"
- "!internal/db/**"
- "!internal/k8s/**"
- hack/docker/gen/main.go
- internal/backoff/*.go
- internal/cache/*.go
- internal/cache/cacher/*.go
- internal/cache/gache/*.go
- internal/circuitbreaker/*.go
- internal/config/*.go
- internal/conv/*.go
- internal/core/algorithm/*.go
- internal/core/algorithm/faiss/*.go
- internal/db/kvs/redis/*.go
- internal/db/nosql/cassandra/*.go
- internal/db/rdb/mysql/*.go
- internal/db/rdb/mysql/dbr/*.go
- internal/encoding/json/*.go
- internal/errors/*.go
- internal/file/*.go
- internal/info/*.go
- internal/io/*.go
- internal/k8s/*.go
- internal/log/*.go
- internal/log/format/*.go
- internal/log/glg/*.go
- internal/log/level/*.go
- internal/log/logger/*.go
- internal/log/nop/*.go
- internal/log/retry/*.go
- internal/log/zap/*.go
- internal/net/*.go
- internal/net/control/*.go
- internal/net/grpc/*.go
- internal/net/grpc/admin/*.go
- internal/net/grpc/codes/*.go
- internal/net/grpc/credentials/*.go
- internal/net/grpc/errdetails/*.go
- internal/net/grpc/health/*.go
- internal/net/grpc/interceptor/client/metric/*.go
- internal/net/grpc/interceptor/client/trace/*.go
- internal/net/grpc/interceptor/server/logging/*.go
- internal/net/grpc/interceptor/server/metric/*.go
- internal/net/grpc/interceptor/server/recover/*.go
- internal/net/grpc/interceptor/server/trace/*.go
- internal/net/grpc/keepalive/*.go
- internal/net/grpc/logger/*.go
- internal/net/grpc/pool/*.go
- internal/net/grpc/proto/*.go
- internal/net/grpc/reflection/*.go
- internal/net/grpc/status/*.go
- internal/net/grpc/types/*.go
- internal/net/http/dump/*.go
- internal/net/http/json/*.go
- internal/net/http/metrics/*.go
- internal/net/http/middleware/*.go
- internal/net/http/rest/*.go
- internal/net/http/routing/*.go
- internal/net/quic/*.go
- internal/observability/*.go
- internal/observability/attribute/*.go
- internal/observability/exporter/*.go
- internal/observability/exporter/otlp/*.go
- internal/observability/metrics/*.go
- internal/observability/metrics/agent/core/faiss/*.go
- internal/observability/metrics/grpc/*.go
- internal/observability/metrics/info/*.go
- internal/observability/metrics/mem/*.go
- internal/observability/metrics/runtime/cgo/*.go
- internal/observability/metrics/runtime/goroutine/*.go
- internal/observability/metrics/version/*.go
- internal/observability/trace/*.go
- internal/os/*.go
- internal/params/*.go
- internal/rand/*.go
- internal/runner/*.go
- internal/safety/*.go
- internal/servers/*.go
- internal/servers/server/*.go
- internal/servers/starter/*.go
- internal/strings/*.go
- internal/sync/*.go
- internal/sync/errgroup/*.go
- internal/sync/semaphore/*.go
- internal/sync/singleflight/*.go
- internal/timeutil/*.go
- internal/timeutil/location/*.go
- internal/tls/*.go
- internal/version/*.go
- pkg/agent/core/faiss/config/*.go
- pkg/agent/core/faiss/handler/grpc/*.go
- pkg/agent/core/faiss/handler/rest/*.go
- pkg/agent/core/faiss/router/*.go
- pkg/agent/core/faiss/service/*.go
- pkg/agent/core/faiss/usecase/*.go
- pkg/agent/internal/kvs/*.go
- pkg/agent/internal/memstore/*.go
- pkg/agent/internal/metadata/*.go
- pkg/agent/internal/vqueue/*.go
- versions/FAISS_VERSION
- Makefile
- Makefile.d/**
- versions/GO_VERSION
jobs:
build:
uses: ./.github/workflows/_docker-image.yaml
Expand Down
Loading

0 comments on commit 3c3d151

Please sign in to comment.