--migrate-local-actions makes jobs download the whole repository archive, which times out in large repositories

Abierto
#268 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, github-actions, go
Área
cli, devtools

Línea de trabajo

Start by reading the README troubleshooting section for local-action and the help text for --migrate-local-actions; the issue names these as documentation targets. Then trace how local actions are migrated and how workflow dependencies are recorded. Done means documenting the archive download trade-off and adding an option that keeps ./ while recording the action’s remote dependencies; the optional repository size warning is separate.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

After running gh actions-lock --migrate-local-actions in our large private repository, every job that uses a migrated $/… action fails in "Set up job". The runner seems to download an archive of the whole repository at the workflow's commit just to get a composite action under .github/actions/, and the download times out:

Using locked action versions from the workflow's lockfile
##[warning]Failed to download action 'https://codeload.github.com/<owner>/<repo>/tar.gz/<sha>'. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
##[warning]Failed to download action 'https://codeload.github.com/<owner>/<repo>/tar.gz/<sha>'. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
##[error]Action 'https://codeload.github.com/<owner>/<repo>/tar.gz/<sha>' download has timed out. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
##[error]Failed to download archive 'https://codeload.github.com/<owner>/<repo>/tar.gz/<sha>' after 3 attempts.
  • It happens on both GitHub-hosted (ubuntu-slim) and self-hosted (Windows, runner v2.338.2) runners.
  • In the same PR, jobs that only use remote actions ran fine with the lockfile. Only jobs with $/ actions failed.
  • Environment: gh-actions-lock v0.4.1, github.com.

I know the download itself happens in the runner, not in this extension. I'm filing it here because the extension and the docs steer users toward --migrate-local-actions, and for a large repository that makes the workflows unusable. The other option, --ignore-local-actions, needs a hand-written if: false stub in every affected workflow.

Requests:

  1. Document the trade-off. In the README, the troubleshooting local-action section, and the --migrate-local-actions help, say that a $/ action is fetched from a repository archive at the workflow's commit, so large repositories can be slow or time out.
  2. Keep ./ but lock what the in-repo action uses. Add an option that keeps uses: ./…, reads the action's action.yml from the repository at lock time, and records its remote dependencies as entries for the calling workflow. That would automate the documented if: false stub workaround. I understand that ./ resolves against the runner's workspace, so this is weaker than $/. For repositories where $/ isn't practical, it would still be much easier to maintain than hand-written stubs.
  3. (Optional) Warn when migrating in a large repository. For example, warn during --migrate-local-actions when the repository size reported by the API is large.

Related discussion: https://github.com/orgs/community/discussions/194494

Lenguaje dominante
Go
Estrellas
295
Forks
21
Merge medio
1 d 3 h
PR fusionados (30 d)
64

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/gh-actions-lock

Todos los issues de github/gh-actions-lock

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.