Skip to content

Commit 1d321ea

Browse files
V2-V1 comparison checks use non-existent V2 result property (#2536)
* Fix issue * Format
1 parent fb9a400 commit 1d321ea

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
fixed:
4+
- V2 comparisons.

policyengine_api/jobs/calculate_economy_simulation_job.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ def run(
215215
progress_log.model_dump(mode="json"), severity="INFO"
216216
)
217217
except Exception as e:
218+
trace = traceback.format_exc()
218219
# Send error log to GCP
219220
error_log: V2V1Comparison = V2V1Comparison.model_validate(
220221
{
221222
**comparison_data,
222-
"v2_error": str(e),
223+
"v2_error": trace,
223224
}
224225
)
225226
logger.log_struct(
@@ -265,9 +266,7 @@ def run(
265266
api_v2_execution
266267
)
267268

268-
v2_country_package_version = api_v2_output[
269-
"country_package_version"
270-
]
269+
v2_country_package_version = api_v2_output["model_version"]
271270

272271
completion_log: V2V1Comparison = (
273272
V2V1Comparison.model_validate(
@@ -310,11 +309,12 @@ def run(
310309
)
311310

312311
except Exception as e:
312+
trace = traceback.format_exc()
313313
# If job fails, send error log to GCP
314314
error_log: V2V1Comparison = V2V1Comparison.model_validate(
315315
{
316316
**comparison_data,
317-
"v2_error": str(e),
317+
"v2_error": trace,
318318
"v1_impact": impact,
319319
"v2_impact": None,
320320
"v1_v2_diff": None,

0 commit comments

Comments
 (0)