fix unbound variable issue in the airlock processor#4929
Conversation
## What is being addressed If extract_properties() throws an exception (due to decoding errors or invalid structure) then an error 'request_properties' is not defined would be generated instead of reporting the actual error, masking the original root cause. ## How is this addressed - Define the variables before the try: so they always exist - Update CHANGELOG.md - Increment version
Unit Test Results24 tests 24 ✅ 0s ⏱️ Results for commit 3d63fde. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
Fixes an exception-masking bug in the airlock processor’s StatusChangedQueueTrigger so that failures in extract_properties() don’t cascade into an UnboundLocalError (or subsequent attribute errors) and hide the original root cause.
Changes:
- Initialize
request_properties/request_filesbefore thetryblock inmain(). - Add a guard in
set_output_event_to_report_failure()for cases where request properties could not be extracted.
|
/test |
|
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/28167315433 (with refid (in response to this comment from @maxmartin-cgi) |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/28178721581 (with refid (in response to this comment from @maxmartin-cgi) |
What is being addressed
If extract_properties() throws an exception (due to decoding errors or invalid structure) then an error 'request_properties' is not defined would be generated instead of reporting the actual error, masking the original root cause.
How is this addressed