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

Intermittent failures in TestHashicorpVaultHandler_ResolveSecrets_SameCertAndKey #5702

Open
SaschaSchwarze0 opened this issue Apr 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SaschaSchwarze0
Copy link

Report

We are compiling our own version of Keda and see errors when running make test that started to happen with Go 1.22.

The test case that fails is TestHashicorpVaultHandler_ResolveSecrets_SameCertAndKey.

Our analysis so far is the following:

=== RUN   TestHashicorpVaultHandler_ResolveSecrets_SameCertAndKey
len: 2, grouped: map[{pki/issue/default pki 0xc0004f4280}:[{certificate pki/issue/default certificate pki {test      } }] {pki/issue/default pki 0xc0004f4400}:[{certificate pki/issue/default certificate pki {test      } }]]
    hashicorpvault_handler_test.go:436:
                Error Trace:    .../keda/pkg/scaling/resolver/hashicorpvault_handler_test.go:436
                Error:          Not equal:
                                expected: "-----BEGIN CERTIFICATE-----\nmzx6wnt8rgZwre5gMXubAI3JJXLjaWqlPNu7-ZGymwZ0JTTSf4_YxFc0MpQ-i5k-CQ\n-----END CERTIFICATE-----"
                                actual  : "-----BEGIN CERTIFICATE-----\nBkZA-zHp12bzMIFl-rvnh3lVO5wS7MN_PQrpM_dMpPGBptY9iOYh5qcjS1_2Npm_zQ\n-----END CERTIFICATE-----"

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1,3 +1,3 @@
                                 -----BEGIN CERTIFICATE-----
                                -mzx6wnt8rgZwre5gMXubAI3JJXLjaWqlPNu7-ZGymwZ0JTTSf4_YxFc0MpQ-i5k-CQ
                                +BkZA-zHp12bzMIFl-rvnh3lVO5wS7MN_PQrpM_dMpPGBptY9iOYh5qcjS1_2Npm_zQ
                                 -----END CERTIFICATE-----
                Test:           TestHashicorpVaultHandler_ResolveSecrets_SameCertAndKey
                Messages:       Refetching same path should yield same value

We are wondering whether a struct with a "fresh" pointer to structs that contain the same values but are different structs, are really equal, or if maybe the new Go 1.22 behavior on for-range loops is hitting here.

Expected Behavior

make test to pass

Actual Behavior

It fails for us on Go 1.22

Steps to Reproduce the Problem

  1. Use Go 1.22
  2. run make test

Logs from KEDA operator

N/A

KEDA Version

2.13.1

Kubernetes Version

None

Platform

None

Scaler Details

No response

Anything else?

No response

@SaschaSchwarze0 SaschaSchwarze0 added the bug Something isn't working label Apr 17, 2024
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
None yet
Development

No branches or pull requests

1 participant