posit-dev / posit-dev/rsconnect-python

deploy fails to redeploy due to global config

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

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
37
Forks
28
Merge medio
1 d 3 h
PR fusionados (30 d)
7

Descripción

Replaces https://github.com/posit-dev/connect/issues/30437

System details

OS Version :  OSX Sonoma

Problem Statement

Creating it as a "bug" because it could be perceived as one from the users.

Steps to Reproduce

  1. Deploy an application (I'm using a streamlit dashboard, but shouldn't matter)
    • The application is deployed with an ID, for example: 87a2d580-58fd-4e85-9027-c7946958806c
  2. Delete the application
    • Removed application 87a2d580-58fd-4e85-9027-c7946958806c ("main")
  3. Deploy the same application again
    • The deploy fails with an error: Posit Connect reported an error (calling /__api__/applications/87a2d580-58fd-4e85-9027-c7946958806c): The requested object does not exist.

Actual Behavior

The deploy fails because it tries to reuse an application that was deleted.

This happens even when the user deletes the rsconnect-python directory from the application itself.

That is caused by rsconnect-python saving a global state in /Users/{ME}/Library/Application Support/rsconnect-python where the application ID is stored.

There are 3 problems that I see:

  1. The user is unable to deploy the application again after deleting it
  2. rsconnect-python behaviour is different based on the computer where it gets run as the global state is different
  3. Moving the project directory around causes a mismatch between the global state and the project state (because the global state stores the PATH) even though the project is the same and its state didn't change.

Expected Behavior

  • Doing the deploy again succeeds and creates a new application
  • There is no global state.
    • I think it's perfectly reasonable to store the state in the application itself (as it already does within the $PROJECT_DIR/rsconnect-python subdirectory) so that it can be committed.

Guía de contribución

Abrir la 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.

Línea de trabajo

Comienza rastreando cómo el comando deploy lee y escribe el estado en el directorio rsconnect-python del proyecto y en la ubicación global /Users/{ME}/Library/Application Support/rsconnect-python. Reproduce la secuencia de eliminar y volver a desplegar con el ID de aplicación de ejemplo y, después, determina cómo debería comportarse el estado cuando se mueve el proyecto. Se considera terminado cuando volver a desplegar crea una aplicación nueva sin depender del estado global.

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

Evaluación

Stack tecnológico
python
Área
cli
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.