-
Notifications
You must be signed in to change notification settings - Fork 579
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
docker-build test task is failing #481
Comments
/kind bug |
cc @popcor255 @PuneetPunamiya @imjasonh @vdemeester (people in the owners file for docker-build task) it is breaking the catalog CI fyi, |
This is unexpected, since the Task's sidecar shouldn't report as ready until the certs are generated and available: catalog/task/docker-build/0.1/docker-build.yaml Lines 100 to 103 in cb2b319
|
I can not reproduce the error. @chmouel |
@popcor255 could you please clone #485 and then try reproducing the problem. For now I skipped the tests in the CI e2e. |
This is weird, maybe there is some race going on, i can def reproduce it every time when running the test manually : Manual run output:name: output kind: List metadata: resourceVersion: "" selfLink: "" + echo '--- Container Logs' --- Container Logs ++ kubectl get pod -o name -n docker-build-0-1 + for pod in $(kubectl get pod -o name -n ${tns}) + kubectl logs --all-containers -n docker-build-0-1 pod/affinity-assistant-f5130924a6-0 Error from server (BadRequest): container "affinity-assistant" in pod "affinity-assistant-f5130924a6-0" is waiting to start: ContainerCreating + true + for pod in $(kubectl get pod -o name -n ${tns}) + kubectl logs --all-containers -n docker-build-0-1 pod/docker-test-pipeline-run-docker-build-ckphn-pod-ws67h + docker build --no-cache -f ./Dockerfile -t localhost:5000/nocode . unable to resolve docker endpoint: open /certs/client/ca.pem: no such file or directory 2020/08/11 13:33:08 Skipping step because a previous step failed 2020/08/11 13:33:14 Exiting... + for pod in $(kubectl get pod -o name -n ${tns}) + kubectl logs --all-containers -n docker-build-0-1 pod/docker-test-pipeline-run-fetch-repository-9nsnz-pod-9b4jw + CHECKOUT_DIR=/workspace/output/ + '[[' true '==' true ]] + cleandir + '[[' -d /workspace/output/ ]] + rm -rf /workspace/output//lost+found + rm -rf '/workspace/output//.[!.]*' + rm -rf '/workspace/output//..?*' + test -z + test -z + test -z + /ko-app/git-init -url https://github.com/popcor255/nocode -revision master -refspec -path /workspace/output/ '-sslVerify=true' '-submodules=true' -depth 1 {"level":"info","ts":1597152766.533512,"caller":"git/git.go:139","msg":"Successfully cloned https://github.com/popcor255/nocode @ ef1a65b2f8e9a0cbf15c24c03ff8d202620512c5 (grafted, HEAD, origin/master) in path /workspace/output/"} {"level":"info","ts":1597152766.5688412,"caller":"git/git.go:180","msg":"Successfully initialized and updated submodules in path /workspace/output/"} + cd /workspace/output/ + git rev-parse HEAD + tr -d '\n' + RESULT_SHA=ef1a65b2f8e9a0cbf15c24c03ff8d202620512c5 + EXIT_CODE=0 + '[' 0 '!=' 0 ] + echo -n ef1a65b2f8e9a0cbf15c24c03ff8d202620512c5 + exit 1 + clean + rm -f /tmp/.mm.ZYnuZH Can you try getting the latest catalog/master and run this on yoru cluster and see if that reproduces for you ? % ./test/run-test.sh docker-build 0.1 it seems only to show up only randomly in CI |
It just happened in Ci for me
CI Job Run Link |
we are going to disable the test in CI until we figure it out... |
Raised PR #487 to disable in CI |
Hey @chmouel @piyush-garg @vinamra28. Thanks for getting back to me. I would have not been able to recreate the error without your help. 🎉 So, I did some debugging and I found something really interesting. The difference from running the script manually vs the run-test.sh script: error: a container name must be specified for pod docker-test-pipeline-run-docker-build-zrbgw-pod-gvbqv, choose one of:
+ [step-docker-build step-docker-push sidecar-registry]
- [step-docker-build step-docker-push sidecar-server]
or one of the init containers: [place-scripts working-dir-initializer place-tools] If you look closely at the containers sidecar-server is now sidecar-registry. import yaml
f = open(0, encoding = "utf-8")
data = yaml.load(f.read(), Loader = yaml.FullLoader)
data["spec"]["sidecars"] = [{
"image": "registry",
"name": "registry"
}];
print(yaml.dump(data, default_flow_style = False)) This script just not add the sidecar. It overwrites the sidecar. - cat ${TMPF}.read | python3 -c 'import yaml;f=open(0, encoding="utf-8"); data=yaml.load(f.read(), Loader=yaml.FullLoader);data["spec"]["sidecars"]=[{"image":"registry", "name": "registry"}];print(yaml.dump(data, default_flow_style=False));' > ${TMPF}
+ cat ${TMPF}.read | python3 -c 'import yaml;f=open(0, encoding="utf-8"); data=yaml.load(f.read(), Loader=yaml.FullLoader);sidecars=data["spec"].get("sidecars"); sidecars = [[], data["spec"].get("sidecars")][sidecars != None]; sidecars.append({"image":"registry", "name": "registry"}); data["spec"]["sidecars"]=sidecars;print(yaml.dump(data, default_flow_style=False));' > ${TMPF} As @imjasonh mentioned, the sidecar-server generates the cert.
TLDR; dind-sidecar container is never ran with the test script. |
The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. tektoncd#481
…ecar The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. tektoncd#481
…ecar The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. tektoncd#481
…ecar The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. tektoncd#481
…ecar The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. Also, refactored the python script that manipulate json and yaml payloads in order to increase readability and improve local dev environment. tektoncd#481
…ecar The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. Also, refactored the python script that manipulate json and yaml payloads in order to increase readability and improve local dev environment. tektoncd#481
…ecar The end to end test attaches a sidecar with a image registry for tasks to push into to. This task is optional and is encouraged to be used for testing. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Allowing the sidecar-registry to run alongside with other tasks will fix this bug. Also, refactored the python script that manipulate json and yaml payloads in order to increase readability and improve local dev environment. tektoncd#481
/assign |
@vdemeester FYI |
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
@afrittoli I wrote a pr to fix this bug specifically. There is some discussion having a one shared local repo. #491 However, there is gonna need some discussion on image-name/tags. Cause, if it's not consistent throughout all tasks, test will break. |
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. tektoncd#481
Expected Behavior
No failure :)
Actual Behavior
The test are sometime failing :
FAILED: docker-build task has failed to comeback properly
The main issue seems to be with this :
Steps to Reproduce the Problem
Additional Info
The text was updated successfully, but these errors were encountered: