Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 54d1bf4

Browse files
Add logging
1 parent 1075adf commit 54d1bf4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

graphql_api/types/impacted_file/impacted_file.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import hashlib
22
from typing import List, Union
3+
import logging
34

45
import sentry_sdk
56
from ariadne import ObjectType, UnionType
@@ -19,6 +20,7 @@
1920

2021
impacted_file_bindable = ObjectType("ImpactedFile")
2122

23+
log = logging.getLogger(__name__)
2224

2325
@impacted_file_bindable.field("fileName")
2426
def resolve_file_name(impacted_file: ImpactedFile, info) -> str:
@@ -74,13 +76,19 @@ def resolve_segments(
7476
filters = {}
7577
if "comparison" not in info.context:
7678
return SegmentComparisons(results=[])
77-
7879
comparison: Comparison = info.context["comparison"]
7980
try:
8081
comparison.validate()
8182
except MissingComparisonReport:
8283
return SegmentComparisons(results=[])
8384
path = impacted_file.head_name
85+
log.info(
86+
"Segment Args",
87+
filters.get("has_unintended_changes"),
88+
extra=dict(
89+
filters=filters,
90+
),
91+
)
8492

8593
try:
8694
file_comparison = comparison.get_file_comparison(

0 commit comments

Comments
 (0)