microsoft / microsoft/azure-devops-python-api
Client Returns undefined while checking get_feature_state_for_scope for new project
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 684
- フォーク
- 218
- 平均マージ
- 8日 10時間
- マージ済み PR(30日)
- 1
説明
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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に示されている Python feature-management client と get_feature_state_for_scope 呼び出しを確認し、その undefined 応答を Azure DevOps に文書化されている feature-state の動作と比較します。undefined が想定された継承状態なのか、client/API の不具合なのかを判断します。正しい状態を返すために必要な再現可能な変更を特定するか、動作を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, python
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100