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

Serverless tests fail with missing dependency #8513

Closed
kwiatekus opened this issue Aug 3, 2023 · 4 comments
Closed

Serverless tests fail with missing dependency #8513

kwiatekus opened this issue Aug 3, 2023 · 4 comments
Assignees
Labels
area/ci Issues or PRs related to CI related topics area/serverless Issues or PRs related to serverless kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. priority/critical Priority indication

Comments

@kwiatekus
Copy link
Contributor

Description

Serverless tests require binaries that are not present in the container where they are executed

Expected result

Actual result

# pkg-config --cflags  -- libgit2
pkg-config: exec: "pkg-config": executable file not found in $PATH
?   	github.com/kyma-project/kyma/components/function-controller/cmd/registry-gc	[no test files]
?   	github.com/kyma-project/kyma/components/function-controller/cmd/webhook	[no test files]
ok  	github.com/kyma-project/kyma/components/function-controller/internal/config	2.027s	coverage: 89.7% of statements
--- FAIL: TestConfigMapReconciler_Reconcile (0.11s)
    suite_test.go:22: 
        Expected
            <*fmt.wrapError | 0xc0005714e0>: {
                msg: "unable to start control plane itself: failed to start the controlplane. retried 5 times: fork/exec /usr/local/kubebuilder/bin/etcd: no such file or directory",
                err: <*fmt.wrapError | 0xc0005714c0>{
                    msg: "failed to start the controlplane. retried 5 times: fork/exec /usr/local/kubebuilder/bin/etcd: no such file or directory",
                    err: <*fs.PathError | 0xc00031b2c0>{
                        Op: "fork/exec",
                        Path: "/usr/local/kubebuilder/bin/etcd",
                        Err: <syscall.Errno>0x2,
                    },
                },
            }
        to be nil

Steps to reproduce

Run pull-function-controller-unit-test test on prow

@kwiatekus kwiatekus added area/serverless Issues or PRs related to serverless area/ci Issues or PRs related to CI related topics labels Aug 3, 2023
@kyma-bot
Copy link
Contributor

kyma-bot commented Aug 3, 2023

There is no kind/ label present. Please add one by using the following command:

  • `/kind

Available kinds:
deprecation, bug, chore, feature, flake, cleanup, missing-test, failing-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kwiatekus kwiatekus added kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. priority/critical Priority indication and removed needs-kind kind/bug Categorizes issue or PR as related to a bug. labels Aug 3, 2023
@Ressetkk
Copy link
Contributor

Ressetkk commented Aug 3, 2023

I have a question regarding kubebuilder configuration - which version of the kubebuilder api does the application use? Basically the /usr/local/kubebuilder/bin/etcd is missing for envtest. I have configured kubebuilder regarding the latest documentation, and there was no information about downloading etc whatsoever. If you can point me out to the configuration that is needed to be done additionally, I'd be very grateful

@dbadura
Copy link
Contributor

dbadura commented Aug 4, 2023

You should install setup-envtest: go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
then download all needed bins with exporting the path to those bins.:

export KUBEBUILDER_ASSETS=$(setup-envtest use 1.25.0 --bin-dir ${BINARY_DIR} -p path)

@dbadura
Copy link
Contributor

dbadura commented Aug 4, 2023

Install libgit2-dev from alpine in version 1.5.*: https://pkgs.alpinelinux.org/packages?name=libgit2-dev&branch=v3.18&repo=&arch=&maintainer=

Also builiding requires apk add --no-cache gcc libc-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to CI related topics area/serverless Issues or PRs related to serverless kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. priority/critical Priority indication
Projects
None yet
Development

No branches or pull requests

4 participants