Detection rule response action identifiers always return an empty list
まだ誰も着手していません。
評価
調査の方向性
Issue に示されている graph_client.security.rules.detection_rules.get() エントリポイントと ResponseAction get_field_deserializers の実装から始めます。identifier がどのように生成され、デシリアライズされるかを、該当する場合はソーススキーマまたはジェネレーターも含めて追跡します。完了条件は、detection-rule response actions が空のリストではなく適切な enum identifier を返すことです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When calling a List or Get for detection rules, e.g. await self.graph_client.security.rules.detection_rules.get(), you get a DetectionRuleCollectionResponse.
This response contains a field detection_action.response_actions which is a list of type ResponseAction.
For a specific response action, e.g. IsolateDeviceResponseAction, the identifier field is always [] instead of the Enum it should be, e.g. identifier=<DeviceIdEntityIdentifier.DeviceId: 'deviceId'>.
I believe this is due to this code in the get_field_deserializers:
fields: Dict[str, Callable[[Any], None]] = {
"identifier": lambda n : setattr(self, 'identifier', n.get_collection_of_enum_values(DeviceIdEntityIdentifier)),
"isolationType": lambda n : setattr(self, 'isolation_type', n.get_enum_value(IsolationType)),
}
I suspect the get_collection_of_enum_values should be replaced with get_enum_value. Since I presume that this code is all generated, the root cause of this problem is probably somewhere else.
Expected behavior
Return the correct enum for all ResponseAction identifiers.
How to reproduce
Call await self.graph_client.security.rules.detection_rules.get() on a detection rule with a response action.
SDK Version
1.16.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
No response
Configuration
- OS: MacOS 14.5
- Architecture: Apple ARM
Other information
No response
- 主要言語
- Python
- スター
- 44
- フォーク
- 16
- 平均マージ
- 20時間 39分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-beta-sdk-python のほかの issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
type:bug type:investigation
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
microsoftgraph/msgraph-beta-sdk-python#1033 · リアクション 1 件 ·
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
microsoftgraph/msgraph-beta-sdk-python#1006 · コメント 1 件 ·
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
microsoftgraph/msgraph-beta-sdk-python#987 · コメント 2 件 ·
microsoftgraph/msgraph-beta-sdk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100