Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build in dev container #5477

Closed
junekhan opened this issue Feb 4, 2024 · 5 comments · Fixed by #5481
Closed

Fail to build in dev container #5477

junekhan opened this issue Feb 4, 2024 · 5 comments · Fixed by #5481
Labels
bug Something isn't working

Comments

@junekhan
Copy link
Contributor

junekhan commented Feb 4, 2024

Report

I tried building the project in dev container as instructed in BUILD.md.
As I ran the command make build, the build terminated due to some undefined reference errors.

Expected Behavior

Seeing a successful build

Actual Behavior

Receiving errors

root@dd666a615af0:/workspaces/keda# make build
test -s /workspaces/keda/bin/controller-gen || GOBIN=/workspaces/keda/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen
test -s /workspaces/keda/bin/mockgen || GOBIN=/workspaces/keda/bin go install github.com/golang/mock/mockgen
PATH="/workspaces/keda/bin:/vscode/vscode-server/bin/linux-arm64/8b3775030ed1a69b13e4f4c628c612102e30a681/bin/remote-cli:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" protoc -I vendor --proto_path=hack LiiklusService.proto --go_out=pkg/scalers/liiklus --go-grpc_out=pkg/scalers/liiklus
PATH="/workspaces/keda/bin:/vscode/vscode-server/bin/linux-arm64/8b3775030ed1a69b13e4f4c628c612102e30a681/bin/remote-cli:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" protoc -I vendor --proto_path=pkg/scalers/externalscaler externalscaler.proto --go_out=pkg/scalers/externalscaler --go-grpc_out=pkg/scalers/externalscaler
PATH="/workspaces/keda/bin:/vscode/vscode-server/bin/linux-arm64/8b3775030ed1a69b13e4f4c628c612102e30a681/bin/remote-cli:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" protoc -I vendor --proto_path=pkg/metricsservice/api metrics.proto --go_out=pkg/metricsservice/api --go-grpc_out=pkg/metricsservice/api
/workspaces/keda/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
# github.com/DataDog/datadog-api-client-go/api/v1/datadog
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/client.go:100:11: undefined: TagsApiService
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_formula_and_function_metric_query_definition.go:17:13: undefined: FormulaAndFunctionMetricDataSource
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_event_timeline_widget_definition.go:27:7: undefined: EventTimelineWidgetDefinitionType
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_free_text_widget_definition.go:23:7: undefined: FreeTextWidgetDefinitionType
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_table_widget_definition.go:29:7: undefined: TableWidgetDefinitionType
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_widget_request_style.go:14:12: undefined: WidgetLineType
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_widget_definition.go:39:34: undefined: TreeMapWidgetDefinition
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_funnel_query.go:19:10: undefined: FunnelStep
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_logs_list_request.go:30:7: undefined: LogsListRequestTime
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_logs_exclusion.go:15:10: undefined: LogsExclusionFilter
vendor/github.com/DataDog/datadog-api-client-go/api/v1/datadog/model_logs_exclusion.go:15:10: too many errors

Steps to Reproduce the Problem

git clone git@github.com:kedacore/keda.git
cd keda
code .
  1. run CTRL+SHIFT+P -> Remote-Containers: Reopen in container
  2. use the integrated terminal to run: make build

Logs from KEDA operator

example

KEDA Version

2.13.0

Kubernetes Version

None

Platform

None

Scaler Details

No response

Anything else?

No response

@junekhan junekhan added the bug Something isn't working label Feb 4, 2024
@JorTurFer
Copy link
Member

JorTurFer commented Feb 4, 2024

Hello,
I can't reproduce the issue :/
Could you try executing the commands ?

go mod tidy
go mod vendor
make build

@junekhan
Copy link
Contributor Author

junekhan commented Feb 5, 2024

Hello, I can't reproduce the issue :/ Could you try executing the commands ?

go mod tidy
go mod vendor
make build

@JorTurFer Hey buddy, now it works. Thank you!
Then, these commands seem indispensable to building the project. Do you mind me making a fix to this?

@JorTurFer
Copy link
Member

In theory, you shouldn't need them during the initial building because as we using vendor folder, all the deps should already be there.
Did you have the repo already cloned for any reason and you pull any change or you faced with this error during the initial setup?
@zroubalik , should we include both commands as part of make build directly?

@junekhan
Copy link
Contributor Author

junekhan commented Feb 5, 2024

I forked KEDA two days ago as a very fresh start and did exactly what's informed in the build guide. I can't recall anything I did wrong or suspicious.

@zroubalik
Copy link
Member

In theory, you shouldn't need them during the initial building because as we using vendor folder, all the deps should already be there. Did you have the repo already cloned for any reason and you pull any change or you faced with this error during the initial setup? @zroubalik , should we include both commands as part of make build directly?

yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready To Ship
Development

Successfully merging a pull request may close this issue.

3 participants