[BUG] mkdir: file name too long #152

Open
opened 2024-02-19 23:06:28 +00:00 by msrd0 · 1 comment

Looks like the runner insists on creating a docker volume or something which contains an encoded version of all parts of the matrix of a job. Well, that's not always a good idea, as Set up job might fail:

mkdir /var/lib/docker/volumes/GITEA-ACTIONS-TASK-67539_WORKFLOW-Rust_JOB-Check-Rust-MSRV-default-and-native-features-map-flags-features-native-install-sudo-apt-get-update-y-sudo-apt-get-install-y-no-install-recommends-libgtk-3-dev-name-default-and-native-map-name-MSRV-nightly-false-toolchain-1-75-0-env: file name too long'

Maybe hashing them or using some other mechanism would be better.

Looks like the runner insists on creating a docker volume or something which contains an encoded version of all parts of the matrix of a job. Well, that's not always a good idea, as _Set up job_ might fail: ```bash mkdir /var/lib/docker/volumes/GITEA-ACTIONS-TASK-67539_WORKFLOW-Rust_JOB-Check-Rust-MSRV-default-and-native-features-map-flags-features-native-install-sudo-apt-get-update-y-sudo-apt-get-install-y-no-install-recommends-libgtk-3-dev-name-default-and-native-map-name-MSRV-nightly-false-toolchain-1-75-0-env: file name too long' ``` Maybe hashing them or using some other mechanism would be better.
earl-warren added the
Kind/Bug
label 2024-02-19 23:15:17 +00:00
Member

A cursory look suggests this is likely something that'll need to be fixed in act.

I suppose changing name here to a hash would do the trick. Either that, or going one step further and changing jobContainerName. It's used for container and network names too, which could benefit from some hashing too. Apart from the names being harder to associate to runs & steps and whatnot, I don't think hashing them has any unwanted side effects.

A cursory look suggests this is likely something that'll need to be fixed in [act](https://code.forgejo.org/forgejo/act/src/commit/d38e0690644fdd20d2a5dcb4bc4368327b019ada/pkg/runner/run_context.go#L143). I suppose changing `name` here to a hash would do the trick. Either that, or going one step further and changing `jobContainerName`. It's used for container and network names too, which could benefit from some hashing too. Apart from the names being harder to associate to runs & steps and whatnot, I don't think hashing them has any unwanted side effects.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/runner#152
No description provided.