Client Returns undefined while checking get_feature_state_for_scope for new project
まだ誰も着手していません。
評価
調査の方向性
まず、issue に示されている Python feature-management client と get_feature_state_for_scope 呼び出しを確認し、その undefined 応答を Azure DevOps に文書化されている feature-state の動作と比較します。undefined が想定された継承状態なのか、client/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時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/azure-devops-python-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 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
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zostera/django-bootstrap4#894 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·