Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Cleanup is not running on self-hosted runners when using server config

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

@omribz156 ya está trabajando en esto.

Desde el 27/5/2026.

  • #340 de @omribz156 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
github-actions, typescript
Área
ci-cd, devops

Línea de trabajo

Empieza localizando configJFrogServers(), getServerIdForConfig() y shouldSkipCleanup() en el código fuente de la action; después, sigue la ruta JF_ENV_* y la exportación de SETUP_JFROG_CLI_SERVER_IDS. Reproduce el problema en un runner de Ubuntu autohospedado y verifica que las configuraciones de servidor importadas mediante JF_ENV_* se eliminen de ~/.jfrog/ durante el post-step.

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

Descripción

bug
Describe the bug

On self-hosted runners, JFrog CLI server configs in ~/.jfrog/ are never cleaned up after a job when using JF_ENV_* config tokens for authentication. configJFrogServers() has two code paths — when using JF_ENV_*, it calls jf config import directly and never reaches getServerIdForConfig(), which is the only place SETUP_JFROG_CLI_SERVER_IDS is written via core.exportVariable. Since that env var is empty, shouldSkipCleanup() exits silently at debug level and ~/.jfrog/ is never cleaned. Stale server configs accumulate with every run.

For now it's possible to workaround this by manually setting JFROG_CLI_HOME_DIR env var

Current behavior

Here are the snippet for run logs for setup-jfrog-cli:

  Found JFrog CLI in cache. No need to download
  /***/_work/_tool/jf/2.91.0/x64/jf config import ***
  02:33:23 [Debug] JFrog CLI version: 2.91.0
  02:33:23 [Debug] OS/Arch: linux/amd64
  02:33:23 [Info] Importing server ID 'artifactory_jenkins'

And the post action:

##[debug]Evaluating condition for step: 'Post Setup JFrog CLI'
##[debug]Evaluating: always()
##[debug]Evaluating always:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Post Setup JFrog CLI
##[debug]Loading inputs
##[debug]Loading env
Post job cleanup.
##[debug]isExplicit: 2.91.0
##[debug]explicit? true
##[debug]checking cache: /***/_work/_tool/jf/2.91.0/x64
##[debug]Found tool in cache jf 2.91.0 x64
##[debug]isExplicit: 2.91.0
##[debug]explicit? true
##[debug]checking cache: /***/_work/_tool/jfrog/2.91.0/x64
##[debug]Found tool in cache jfrog 2.91.0 x64
##[debug]No servers are configured. Skipping cleanup.
##[debug]Node Action run completed with exit code 0
##[debug]Finishing: Post Setup JFrog CLI
Reproduction steps
  1. Use a self-hosted runner
  2. Authenticate via JF_ENV_1: ${{ secrets.MY_CONFIG_TOKEN }} (no JF_URL/JF_ACCESS_TOKEN)
  3. Run the job — post-step skips cleanup silently
  4. Check ~/.jfrog/ on the runner — stale server configs accumulate with every run
Expected behavior

Server configs imported via JF_ENV_* should be cleaned up by the post-step, the same way as configs added via JF_URL/JF_ACCESS_TOKEN.

Setup JFrog CLI version

v5.0.0

JFrog CLI version

2.91.0

Workflow operating system type and version

Ubuntu 24.04

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

Lenguaje dominante
TypeScript
Estrellas
267
Forks
111
Merge medio
12 min
PR fusionados (30 d)
2

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 jfrog/setup-jfrog-cli

Todos los issues de jfrog/setup-jfrog-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.