get_last_versions(active=True) returns nothing when the newest version is inactive — next publish restarts at v001
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
Start in ayon_api/_api_helpers/versions.py and trace how latestOnly is sent and how the client applies the active filter. Check the query behavior against the reproduction with active versions v001–v005 and inactive v006; verify that the last active version returned is v005. Done means a subsequent publish uses v006 rather than restarting at v001.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
get_last_versions(..., active=True) (the default) returns nothing for a product whose newest version is inactive, even when older active versions exist. Publishing then restarts at version 1, and the core integrator updates the existing v001 instead of creating a new version.
Where
ayon_api/_api_helpers/versions.py (checked on develop at 4b248d4): with latest=True the query sends latestOnly: true to the server, and the active filter is applied afterwards, on the client:
if latest:
standard_query.set_variable_value("latestOnly", True)
...
for version in parsed_data["project"]["versions"]:
if active is not None and version["active"] is not active:
continue
The server returns only the newest version (the inactive one), the client drops it, and the product looks like it has no versions.
Steps to reproduce
- A product with versions v001…v005, all active.
- Publish v006, then deactivate it (
active = False), e.g. from the web UI. get_last_versions(project, [product_id])→{}(expected: v005).- Publish again: ayon-core's
CollectAnatomyInstanceDatafinds no last version and uses the versioning start (1);IntegrateAssetfinds the existing v001 and updates it in place: its representations/files are replaced by the new publish (and on a shared storage the v001 files would be overwritten).
Expected
The latest active version (v005), so the next publish is v006 (but never v001).
Environment
AYON server 1.17.3, ayon-core 1.9.12, AYON launcher 1.6.3 (Python 3.11.9), Windows client. Same code on ayon-python-api develop 4b248d4.
Possible fix
When latest and active are both set, either filter by active on the server side before "latest" is applied, or (if the server can't) query without latestOnly and pick the highest version per product among the matching ones on the client.
- Lenguaje dominante
- Python
- Estrellas
- 17
- Forks
- 15
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 6
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ynput/ayon-python-api
-
type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ynput/ayon-python-api#363 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ynput/ayon-python-api#351 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
ynput/ayon-python-api#350 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
ynput/ayon-python-api#199 ·
-
Entity Hub: Refactor get children to work with added entity types supportQuizá libre de nuevo @iLLiCiTiT la tomó hace 766 días y no hay ningún pull request abierto. Abierto
ynput/ayon-python-api#198 · 1 asignado ·
Todos los issues de ynput/ayon-python-api
Issues similares
-
bug feature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Qiskit/qiskit-obp#156 ·
-
perf(batch-jobs): discover-misses reads the state list without running the whole stage reportAbiertoaction-item enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
getcommunityone/open-navigator#1658 ·
Los mantenedores suelen responder en 1 día
-
review-panel severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kristovatlas/coin-accounting#636 ·
Los mantenedores suelen responder en 1 día