get_last_versions(active=True) returns nothing when the newest version is inactive — next publish restarts at v001
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 72/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- python
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 17
- 分支
- 15
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 6
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ynput/ayon-python-api 的其他 Issue
-
type: enhancement
難度 2/5 1-3 小時 新手友好度 68/100
ynput/ayon-python-api#363 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
ynput/ayon-python-api#351 ·
-
難度 3/5 1-2 天 新手友好度 68/100
ynput/ayon-python-api#350 ·
-
難度 3/5 1-2 天 新手友好度 45/100
ynput/ayon-python-api#199 ·
-
Entity Hub: Refactor get children to work with added entity types support可能重新可做 @iLLiCiTiT 於 766 天前認領,目前沒有進行中的 PR。 未關閉
ynput/ayon-python-api#198 · 已指派 1 人 ·
查看 ynput/ayon-python-api 的全部 Issue
相似的 Issue
-
bug feature request
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 66/100
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
Qiskit/qiskit-obp#156 ·
-
action-item enhancement
難度 2/5 1-3 小時 新手友好度 88/100
getcommunityone/open-navigator#1658 ·
維護者通常 1 天內回覆
-
review-panel severity:low
難度 2/5 1-3 小時 新手友好度 72/100
kristovatlas/coin-accounting#636 ·
維護者通常 1 天內回覆