Skip to content

Conversation

@shuchu
Copy link
Collaborator

@shuchu shuchu commented Sep 23, 2025

What this PR does / why we need it:

There are few function calls are deprecated.

Which issue(s) this PR fixes:

Fix #5623

Misc


(feast) shuchu@shuchu-win:~/feast$ make test-go
python infra/scripts/generate_protos.py
Writing mypy to feast/core/Aggregation_pb2.pyi
Writing mypy to feast/core/Permission_pb2.pyi
Writing mypy to feast/core/DataFormat_pb2.pyi
Writing mypy to feast/core/Transformation_pb2.pyi
Writing mypy to feast/core/StreamFeatureView_pb2.pyi
Writing mypy to feast/core/FeatureView_pb2.pyi
Writing mypy to feast/core/InfraObject_pb2.pyi
Writing mypy to feast/core/Project_pb2.pyi
Writing mypy to feast/core/FeatureTable_pb2.pyi
Writing mypy to feast/core/Policy_pb2.pyi
Writing mypy to feast/core/DatastoreTable_pb2.pyi
Writing mypy to feast/core/OnDemandFeatureView_pb2.pyi
Writing mypy to feast/core/SqliteTable_pb2.pyi
Writing mypy to feast/core/SavedDataset_pb2.pyi
Writing mypy to feast/core/Entity_pb2.pyi
Writing mypy to feast/core/FeatureService_pb2.pyi
Writing mypy to feast/core/Feature_pb2.pyi
Writing mypy to feast/core/ValidationProfile_pb2.pyi
Writing mypy to feast/core/DataSource_pb2.pyi
Writing mypy to feast/core/Registry_pb2.pyi
Writing mypy to feast/core/FeatureViewProjection_pb2.pyi
Writing mypy to feast/core/Store_pb2.pyi
Writing mypy to feast/registry/RegistryServer_pb2.pyi
Writing mypy to feast/serving/ServingService_pb2.pyi
Writing mypy to feast/serving/GrpcServer_pb2.pyi
Writing mypy to feast/serving/Connector_pb2.pyi
Writing mypy to feast/serving/TransformationService_pb2.pyi
Writing mypy to feast/types/Field_pb2.pyi
Writing mypy to feast/types/Value_pb2.pyi
Writing mypy to feast/types/EntityKey_pb2.pyi
Writing mypy to feast/storage/Redis_pb2.pyi
unzip -u /home/shuchu/feast/tools/protoc-30.2-linux-x86_64.zip -d /home/shuchu/feast/tools
Archive:  /home/shuchu/feast/tools/protoc-30.2-linux-x86_64.zip
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
mkdir -p /home/shuchu/feast/go/protos
protoc --proto_path=/home/shuchu/feast/protos --go_out=/home/shuchu/feast/go/protos --go_opt=module=github.com/feast-dev/feast/go/protos --go-grpc_out=/home/shuchu/feast/go/protos --go-grpc_opt=module=github.com/feast-dev/feast/go/protos /home/shuchu/feast/protos/feast/core/*.proto;   protoc --proto_path=/home/shuchu/feast/protos --go_out=/home/shuchu/feast/go/protos --go_opt=module=github.com/feast-dev/feast/go/protos --go-grpc_out=/home/shuchu/feast/go/protos --go-grpc_opt=module=github.com/feast-dev/feast/go/protos /home/shuchu/feast/protos/feast/registry/*.proto;   protoc --proto_path=/home/shuchu/feast/protos --go_out=/home/shuchu/feast/go/protos --go_opt=module=github.com/feast-dev/feast/go/protos --go-grpc_out=/home/shuchu/feast/go/protos --go-grpc_opt=module=github.com/feast-dev/feast/go/protos /home/shuchu/feast/protos/feast/serving/*.proto;   protoc --proto_path=/home/shuchu/feast/protos --go_out=/home/shuchu/feast/go/protos --go_opt=module=github.com/feast-dev/feast/go/protos --go-grpc_out=/home/shuchu/feast/go/protos --go-grpc_opt=module=github.com/feast-dev/feast/go/protos /home/shuchu/feast/protos/feast/types/*.proto;   protoc --proto_path=/home/shuchu/feast/protos --go_out=/home/shuchu/feast/go/protos --go_opt=module=github.com/feast-dev/feast/go/protos --go-grpc_out=/home/shuchu/feast/go/protos --go-grpc_opt=module=github.com/feast-dev/feast/go/protos /home/shuchu/feast/protos/feast/storage/*.proto;  true
go install golang.org/x/tools/cmd/goimports
uv pip install "pybindgen==0.22.1" "grpcio-tools>=1.56.2,<2" "mypy-protobuf>=3.1"
Audited 3 packages in 2ms
uv pip install -e "."
Resolved 65 packages in 2.02s
      Built feast @ file:///home/shuchu/feast
Prepared 1 package in 1.96s
Uninstalled 1 package in 0.64ms
Installed 1 package in 2ms
 ~ feast==0.53.1.dev15+g5ab18a6a2.d20250923 (from file:///home/shuchu/feast)
/home/shuchu/feast/tools/bin:/home/shuchu/feast/.venv/bin:/home/shuchu/.vscodium-server/bin/b18126fb99b60533fc069575d08d72758cd90fed/bin/remote-cli:/home/shuchu/.local/bin:/home/shuchu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA App/NvDLISR:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/RedHat/Podman/:/mnt/c/Users/shuch/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/shuch/AppData/Local/Programs/VSCodium/bin
CGO_ENABLED=1 go test -coverprofile=coverage.out ./... && go tool cover -html=coverage.out -o coverage.html
ok      github.com/feast-dev/feast/go   0.023s  coverage: 3.8% of statements
        github.com/feast-dev/feast/go/embedded          coverage: 0.0% of statements
ok      github.com/feast-dev/feast/go/internal/feast    5.725s  coverage: 53.9% of statements
        github.com/feast-dev/feast/go/internal/feast/model              coverage: 0.0% of statements
ok      github.com/feast-dev/feast/go/internal/feast/onlineserving      0.030s  coverage: 49.1% of statements
ok      github.com/feast-dev/feast/go/internal/feast/onlinestore        16.426s coverage: 44.0% of statements
ok      github.com/feast-dev/feast/go/internal/feast/registry   0.030s  coverage: 28.7% of statements
ok      github.com/feast-dev/feast/go/internal/feast/server     17.069s coverage: 29.6% of statements
ok      github.com/feast-dev/feast/go/internal/feast/server/logging     0.141s  coverage: 62.3% of statements
        github.com/feast-dev/feast/go/internal/feast/transformation             coverage: 0.0% of statements
        github.com/feast-dev/feast/go/internal/test             coverage: 0.0% of statements
        github.com/feast-dev/feast/go/protos/feast/core         coverage: 0.0% of statements
        github.com/feast-dev/feast/go/protos/feast/registry             coverage: 0.0% of statements
        github.com/feast-dev/feast/go/protos/feast/serving              coverage: 0.0% of statements
        github.com/feast-dev/feast/go/protos/feast/storage              coverage: 0.0% of statements
        github.com/feast-dev/feast/go/protos/feast/types                coverage: 0.0% of statements
ok      github.com/feast-dev/feast/go/types     0.010s  coverage: 86.1% of statements

@shuchu shuchu requested a review from a team as a code owner September 23, 2025 02:48
@shuchu shuchu added the go Pull requests that update Go code label Sep 23, 2025
@shuchu shuchu requested review from Copilot and franciscojavierarceo and removed request for a team September 23, 2025 02:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates deprecated Go functions and imports to use their modern equivalents, addressing deprecation warnings in the Go feature server codebase.

  • Replace deprecated io/ioutil functions with their os and io equivalents
  • Update gRPC client initialization to use the newer grpc.NewClient API
  • Modernize slice operations using Go 1.21's slices package

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go/internal/feast/server/logging/offlinestoresink.go Replace ioutil.TempDir with os.MkdirTemp
go/internal/feast/server/logging/logger_test.go Replace ioutil.ReadDir with os.ReadDir
go/internal/feast/server/grpc_server_test.go Update gRPC client creation and replace deprecated functions
go/internal/feast/registry/s3.go Replace ioutil.ReadAll with io.ReadAll
go/internal/feast/registry/registry_test.go Replace ioutil.NopCloser with io.NopCloser
go/internal/feast/registry/local.go Replace ioutil.ReadFile and ioutil.WriteFile with os equivalents
go/internal/feast/model/featureview.go Replace manual loop with slices.Contains
go/infra/docker/feature-server/Dockerfile Update Go version from 1.22.5 to 1.23.12

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@shuchu shuchu requested a review from HaoXuAI September 23, 2025 02:49
shuchu and others added 2 commits September 23, 2025 20:01
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
…ast-dev#5626)

* Added featureView in the response for search results of features

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>

* Added tests to check featureView addition in feature search results

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>

---------

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
"name": feature.get("name", ""),
"description": feature.get("description", ""),
"project": current_project,
"featureView": feature.get("featureView", ""),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is from another PR, probably came while rebase

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, create a new PR: #5632

@shuchu shuchu closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the deprecated imported library of Go feature server.

3 participants