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
-
area/auth bug comp/agent P3 platform/discord type/security
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
bancolombia/sentinel#23 ·
-
test md 未关闭CI
难度 2/5 1-3 小时 新手友好度 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
bug client
难度 2/5 1-3 小时 新手友好度 88/100