Comments (9)
I attempted to reproduce it, but it passed. Can you still reproduce it now?
from kruise.
I attempted to reproduce it, but it passed. Can you still reproduce it now?
Yes, maybe because I use mac M1? I'm really confused, could u plz tell me ur environment?
Running tool: /opt/homebrew/bin/go test -timeout 30s -run ^TestMatchRegistryAuths$ github.com/openkruise/kruise/pkg/daemon/criruntime/imageruntime
--- FAIL: TestMatchRegistryAuths (0.00s)
--- FAIL: TestMatchRegistryAuths/test4 (0.00s)
/Users/bytedance/Profile/go_workspace/src/data-kruise/pkg/daemon/criruntime/imageruntime/helpers_test.go:117: convertToRegistryAuths failed
FAIL
FAIL github.com/openkruise/kruise/pkg/daemon/criruntime/imageruntime 0.834s
FAIL
Env:
go version go1.19.13 darwin/arm64
go version go1.20.14 darwin/arm64
from kruise.
Hi, @Colvin-Y .
I successfully reproduced the issue and discovered that it fails on any PC without Docker installed.
The core code stack is:
credentialprovider.ReadDockerConfigJSONFile (config.go:146) k8s.io/kubernetes/pkg/credentialprovider
credentialprovider.ReadDockerConfigFile (config.go:171) k8s.io/kubernetes/pkg/credentialprovider
credentialprovider.(*defaultDockerConfigProvider).Provide (provider.go:79) k8s.io/kubernetes/pkg/credentialprovider
credentialprovider.(*CachingDockerConfigProvider).Provide (provider.go:103) k8s.io/kubernetes/pkg/credentialprovider
credentialprovider.(*providersDockerKeyring).Lookup (keyring.go:269) k8s.io/kubernetes/pkg/credentialprovider
credentialprovider.UnionDockerKeyring.Lookup (keyring.go:299) k8s.io/kubernetes/pkg/credentialprovider
<autogenerated>:2
secret.ConvertToRegistryAuths (parse.go:33) github.com/openkruise/kruise/pkg/util/secret
imageruntime.TestMatchRegistryAuths.func6 (helpers_test.go:112) github.com/openkruise/kruise/pkg/daemon/criruntime/imageruntime
testing.tRunner (testing.go:1689) testing
testing.(*T).Run.gowrap1 (testing.go:1742) testing
runtime.goexit (asm_arm64.s:1222) runtime
- Async Stack Trace
testing.(*T).Run (testing.go:1742) testing
ReadDockerConfigJSONFile(nil)
will return different results based on whether Docker is installed.
from kruise.
ReadDockerConfigJSONFile
Hi, @ABNER-1.
Thanks for your reply, but actually I've installed docker
➜ ~ cat ~/.docker/config.json
{
"auths": {
},
"credsStore": "desktop",
"currentContext": "desktop-linux"
}
And I've tried to print the result from function secret.ConvertToRegistryAuths(cs.GetSecrets(), repoToPull)
infos: [{echoserver test}]
--- FAIL: TestMatchRegistryAuths (0.00s)
--- FAIL: TestMatchRegistryAuths/test4 (0.00s)
helpers_test.go:120: convertToRegistryAuths failed
FAIL
What config should I check?
from kruise.
I plan to debug it again this weekend. However, if you'd like to take a crack at it, please feel free to do so. @Colvin-Y
from kruise.
I plan to debug it again this weekend. However, if you'd like to take a crack at it, please feel free to do so. @Colvin-Y
Thank u! I also plan to figure out what the whole test cases are doing. @ABNER-1
from kruise.
func readDockerConfigJSONFileFromBytes(contents []byte) (cfg DockerConfig, err error) {
var cfgJSON DockerConfigJSON
if err = json.Unmarshal(contents, &cfgJSON); err != nil {
return nil, errors.New("error occurred while trying to unmarshal json")
}
cfg = cfgJSON.Auths
return
}
The 'auths' value in docker/config.json will be regarded as authentication information for the public Docker registry. It should be disregarded in Test Case 4.
from kruise.
A simple solution in my opinion:
len(infos) != cs.Expect
=> len(infos) < cs.Expect
refer code:
from kruise.
func readDockerConfigJSONFileFromBytes(contents []byte) (cfg DockerConfig, err error) { var cfgJSON DockerConfigJSON if err = json.Unmarshal(contents, &cfgJSON); err != nil { return nil, errors.New("error occurred while trying to unmarshal json") } cfg = cfgJSON.Auths return }The 'auths' value in docker/config.json will be regarded as authentication information for the public Docker registry. It should be disregarded in Test Case 4.
Got it! thx!
from kruise.
Related Issues (20)
- [BUG] Advanced StatefulSet In situ upgrade card owner
- [BUG] Creating a WorkloadSpread with a patch for the priorityClassName fails HOT 1
- Report the use of components with vulnerabilities in kruise HOT 3
- [feature request] ResourceDistribution point at secret HOT 2
- [feature request] add validating webhook for ejob HOT 2
- [BUG] E2E Test Failed on arm HOT 2
- 1.5.4原地升级失效 HOT 1
- [feature request] the rescheduleCriticalSeconds range is too small.
- [feature request] deploy specified CRDs and its corresponding controllers
- advanced statefulset in place update do not update annotations of pod when image not changed
- [BUG] CRR is blocking, if recreate a pod which is already during recreate HOT 2
- [feature request] Make CloneSet and StatefulSet Support the generateName setting HOT 6
- [feature request] WorkloadSpread supports option to disable/ignore StatefulSet ordinal check
- [feature request] Support cri-docker HOT 1
- [BUG] 为什么首次通过修改annotation来实现原地升级就会激活backoff定时器? HOT 4
- [feature request] SidecarSet supports to customize container injection for specific settings. HOT 1
- [BUG] SidecarSet meaningless status update when restart
- [BUG] markdownlint-misspell-shellcheck always failed in e2e when use checkout@v4 HOT 2
- [BUG] Override namespace config after deploying HOT 1
- [feature request] StatefulSet StartOrdinal implement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kruise.