Fix permission denied while running docker-in-docker CI builds
Changes
CI builds are failed with permission denied while running browser e2e testcase. This commit will remove node user and use default user. https://dashboard.dogfooding.tekton.dev/#/namespaces/bastion-z/pipelineruns/tekton-dashboard-s390x-nightly-run-np27x?pipelineTask=e2e-test-dashboard&step=run-e2e-tests&retry=0
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
- [ ] Docs included if any changes are user facing
- [ ] Tests included if any functionality added or changed
- [x] Follows the commit message standard
- [x] Meets the Tekton contributor standards (including functionality, content, code)
See the contribution guide for more details.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign briangleeson after the PR has been reviewed.
You can assign the PR to them by writing /assign @briangleeson in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/assign @AlanGreene
@AlanGreene would you please review this PR?
@Basavaraju-G The logs for the run you linked are no longer available. Can you confirm whether the error you're seeing is similar to the following or something different?
Logs from today's run: https://dashboard.dogfooding.tekton.dev/#/namespaces/bastion-z/pipelineruns/tekton-dashboard-s390x-nightly-run-kfcqd?pipelineTask=e2e-test-dashboard&step=run-e2e-tests&retry=0
Warning: We failed to record the video.
This error will not alter the exit code.
Error: ffmpeg exited with code 1: /home/node/cypress/videos/about.cy.js.mp4: Permission denied
at ChildProcess.<anonymous> (/home/node/.cache/Cypress/10.9.0/Cypress/resources/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
at ChildProcess.emit (node:events:526:28)
at ChildProcess.emit (node:domain:475:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Warning: We failed processing this video.
This error will not alter the exit code.
Error: ffmpeg exited with code 1: /home/node/cypress/videos/about.cy.js.mp4: Permission denied
at ChildProcess.<anonymous> (/home/node/.cache/Cypress/10.9.0/Cypress/resources/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
at ChildProcess.emit (node:events:526:28)
at ChildProcess.emit (node:domain:475:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Deleting video for passing test
An error was thrown in your plugins file while executing the handler for the after:spec event.
The error we received was:
Error: ENOENT: no such file or directory, unlink '/home/node/cypress/videos/about.cy.js.mp4'
ERROR: Browser E2E tests failed
==================================
==== INTEGRATION TESTS FAILED ====
==================================
The e2e tests running in prow are already run in a docker-in-docker environment, so this is likely something specific to your setup for the tests on Z.
We do not want to run the tests as root which is why we explicitly switch to the provided node user.
Since you haven't provided a path in the ARTIFACTS environment variable the test script creates a temporary directory to store the videos, you can see this output in the logs:
Videos of failing tests will be stored at /tmp/tmp.bIBjSXIiph/videos which must be writeable.
Are you planning to store the recorded videos of the tests? If not we could provide a way to disable the recording and avoid these errors entirely. If you do want to store the videos you should provide a path in the ARTIFACTS environment variable to the location you want, and the user running the step should have permission to write to this folder.
PR open to make recording of videos opt-in. If the ARTIFACTS variable is not set the recording of videos will be skipped.
#2536
@AlanGreene yes im getting same error. will try again, after your PR merges https://github.com/tektoncd/dashboard/pull/2536

Same error on P will get resolved after PR #2536
#2536 is merged, can you try running your pipelines again?
@Basavaraju-G: PR needs rebase.
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.
#2536 is merged, can you try running your pipelines again?
okay. thanks
@Basavaraju-G Looking at recent runs in the bastion-z namespace I see the update mentioned above didn't work as expected 😞
However, I found the cause. There's a script in tektoncd/plumbing that's being loaded and sets ARTIFACTS to a temp folder if the variable is not already set. This means we cannot use the presence of that variable as our flag as I had originally hoped, instead we need a separate variable we can use to explicitly disable recording videos.
https://github.com/tektoncd/dashboard/pull/2541 introduces support for setting E2E_VIDEO=false to disable recording. Once that PR is merged and your pipelines have been updated to set this environment variable we should be in business 🤞
UPDATE: #2541 is merged so you should be able to set E2E_VIDEO=false in your pipelines to skip this now.
PR to use video-skip flag in plumbing repo: https://github.com/tektoncd/plumbing/pull/1248