4

In Tekton it's possible to set up a pipeline with multiple tasks that can (potentially) run in parallel and that access the same workspace. However, the documentation is not completely clear on what happens in this situation. Does it "lock" the workspace and force one task to wait until the other is done using it, or can both the tasks access and modify it at the same time (potentially interfering with each others' execution)?

Hilda Hay
  • 87
  • 3

1 Answers1

3

Both tasks can access and modify it at the same time. There is no locking. Be careful that you do not have a concurrency problem!

Donat
  • 4,157
  • 3
  • 11
  • 26
  • Using RWO volumes, kubernetes would run "parallel" tasks sequentially. While RWX volumes could indeed be an issue, depending on what those tasks are doing. – SYN Jun 10 '22 at 16:44
  • 1
    The tekton documentation says that ReadWriteOnce means that the volume can only be mounted on one *node*. Imho this does not mean only one task. You can have a look at [Access Modes](https://tekton.dev/docs/pipelines/workspaces/#access-modes). – Donat Jun 10 '22 at 19:51