Client Returns undefined while checking get_feature_state_for_scope for new project
還沒有人認領這個 Issue。
評估
研究方向
先檢視 issue 中所示的 Python 功能管理用戶端與 get_feature_state_for_scope 呼叫,然後將其 undefined 回應與 Azure DevOps 所記錄的功能狀態行為進行比較。判斷 undefined 是預期的繼承狀態,還是用戶端/API 缺陷;完成的標準是記錄該行為,或找出為返回正確狀態所需的可重現變更。
由索引模型根據 Issue 內容生成。
描述
Hello Team,
I am using python API to check if there are some features enabled/disbaled at Project level e.g Repo's and Pipeline's.
Issue is that when a Private Project is created, everything is enabled by default. When I check the state for such projects it returns undefined
Below is the sample code and results:
feature_client = connection.clients_v7_0.get_feature_management_client()
repo: ContributedFeatureState = feature_client.get_feature_state_for_scope(feature_id='ms.vss-code.version-control', user_scope='host', scope_name='project', scope_value='<PROJECT_ID/NAME>')
pipeline: ContributedFeatureState = feature_client.get_feature_state_for_scope(feature_id='ms.vss-build.pipelines', user_scope='host', scope_name='project', scope_value='<PROJECT_ID/NAME>')
print(repo)
print(pipeline)
Results:
{
'additional_properties': {},
'feature_id': 'ms.vss-code.version-control',
'overridden': None,
'reason': None,
'scope': <azure.devops.v7_0.feature_management.models.ContributedFeatureSettingScope object at 0x10f2c2580>,
'state': 'undefined'
}
{
'additional_properties': {},
'feature_id': 'ms.vss-build.pipelines',
'overridden': None,
'reason': None,
'scope': <azure.devops.v7_0.feature_management.models.ContributedFeatureSettingScope object at 0x10f2c2af0>,
'state': 'undefined'
}
When I manually disable these features at Project level then it is able to identify them:
Disabled:
{
'additional_properties': {},
'feature_id': 'ms.vss-code.version-control',
'overridden': None,
'reason': None,
'scope': <azure.devops.v7_0.feature_management.models.ContributedFeatureSettingScope object at 0x1019d4580>,
'state': 'disabled'
}
{
'additional_properties': {},
'feature_id': 'ms.vss-build.pipelines',
'overridden': None,
'reason': None,
'scope': <azure.devops.v7_0.feature_management.models.ContributedFeatureSettingScope object at 0x1019d4af0>,
'state': 'disabled'
}
enabled back again:
{
'additional_properties': {},
'feature_id': 'ms.vss-code.version-control',
'overridden': None,
'reason': None,
'scope': <azure.devops.v7_0.feature_management.models.ContributedFeatureSettingScope object at 0x1050d4580>,
'state': 'enabled'
}
{
'additional_properties': {},
'feature_id': 'ms.vss-build.pipelines',
'overridden': None,
'reason': None,
'scope': <azure.devops.v7_0.feature_management.models.ContributedFeatureSettingScope object at 0x1050d4af0>,
'state': 'enabled'
}
Can you please guide on this, shall we assume that if it is undefined it is enabled
Best
Jashan
- 主要語言
- Python
- 星號
- 684
- 分支
- 218
- 平均合併
- 8 天 10 小時
- 30 天內合併 PR
- 1
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/azure-devops-python-api 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 55/100
-
難度 5/5 一週以上 新手友好度 25/100
-
難度 1/5 1 小時以內 新手友好度 55/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 45/100
查看 microsoft/azure-devops-python-api 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難度 2/5 1-3 小時 新手友好度 88/100
OpenHands/extensions#626 · 1 則留言 ·
-
難度 1/5 1 小時以內 新手友好度 90/100
CSCfi/sd-search-api#39 ·
-
難度 1/5 1 小時以內 新手友好度 90/100
-
難度 2/5 1-3 小時 新手友好度 68/100
StevenBlack/hosts#3255 ·