Plugin venv path is <PLUGIN_DIR>/.venv, not <PLUGIN_DIR>/venv

Abierto Apto para principiantes
#7,997 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
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Empieza con content/shared/influxdb3-plugins/_index.md y compara sus instrucciones sobre el entorno virtual con el comportamiento de venv_path_for citado en el issue. Actualiza la ruta predeterminada, documenta la opción --virtual-env-location y explica la reutilización tras reiniciar y la persistencia del directorio venv en contenedores. El trabajo estará terminado cuando la página cubra correctamente los tres puntos.

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

Descripción

The Processing Engine docs give the wrong default path for the plugin virtual environment.

What's wrong

The plugins page says:

When you start the server with the --plugin-dir option, InfluxDB 3 creates a Python virtual environment (<PLUGIN_DIR>/venv) for your plugins.

The server creates <PLUGIN_DIR>/.venv.
Both v3.12.1 and v3.12.2 have:

pub fn venv_path_for(plugin_dir: &Path, virtual_env_location: Option<&PathBuf>) -> PathBuf {
    match virtual_env_location {
        Some(path) => path.clone(),
        None => plugin_dir.join(".venv"),
    }
}

Testing on Core 3.12.1 and 3.12.2 also found the venv at <PLUGIN_DIR>/.venv.

Also missing

  • --virtual-env-location (VIRTUAL_ENV) overrides the default path. The plugins page doesn't mention it.
  • The server reuses an existing venv and its packages after a restart. It runs python -m venv only when is_valid_venv() fails, which on Linux and macOS checks for <venv-path>/bin/activate. In containers, persist the venv directory with a volume or bind mount so it survives container replacement.

Suggested fix

  1. Change <PLUGIN_DIR>/venv to <PLUGIN_DIR>/.venv in content/shared/influxdb3-plugins/_index.md.
  2. Name --virtual-env-location as the override.
  3. Add the restart reuse and container volume note.

Related: #7811 (already uses .venv), influxdata/DAR#777.

Lenguaje dominante
JavaScript
Estrellas
83
Forks
334
Merge medio
1 d 21 h
PR fusionados (30 d)
106

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 influxdata/docs-v2

Todos los issues de influxdata/docs-v2

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.