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

Commit 047c0a2

Browse files
fix: surface processing errors (#262)
codecov/worker#99 had the unwanted and overlooked effect of slightly changing the format of the response from Codecov label-analysis. Before the "errors" key was inside the "result" (it shouldn't be) So the CLI is not surfacing these errors anymore. These changes fix that and move the log line to a more logical position.
1 parent 01f36c1 commit 047c0a2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

codecov_cli/commands/labelanalysis.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,16 @@ def label_analysis(
164164
)
165165
resp_json = resp_data.json()
166166
if resp_json["state"] == "finished":
167+
logger.info(
168+
"Received list of tests from Codecov",
169+
extra=dict(
170+
extra_log_attributes=dict(
171+
processing_errors=resp_json.get("errors", [])
172+
)
173+
),
174+
)
167175
request_result = _potentially_calculate_absent_labels(
168-
resp_data.json()["result"], requested_labels
176+
resp_json["result"], requested_labels
169177
)
170178
if not dry_run:
171179
runner.process_labelanalysis_result(request_result)
@@ -206,14 +214,6 @@ def label_analysis(
206214
def _potentially_calculate_absent_labels(
207215
request_result, requested_labels
208216
) -> LabelAnalysisRequestResult:
209-
logger.info(
210-
"Received list of tests from Codecov",
211-
extra=dict(
212-
extra_log_attributes=dict(
213-
processing_errors=request_result.get("errors", [])
214-
)
215-
),
216-
)
217217
if request_result["absent_labels"]:
218218
# This means that Codecov already calculated everything for us
219219
final_result = LabelAnalysisRequestResult(request_result)

0 commit comments

Comments
 (0)