Skip to content

fix unbound variable issue in the airlock processor#4929

Open
JC-wk wants to merge 3 commits into
microsoft:mainfrom
JC-wk:airlock-processor-errors
Open

fix unbound variable issue in the airlock processor#4929
JC-wk wants to merge 3 commits into
microsoft:mainfrom
JC-wk:airlock-processor-errors

Conversation

@JC-wk

@JC-wk JC-wk commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

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

## 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
@JC-wk JC-wk requested a review from a team as a code owner June 8, 2026 15:36
Copilot AI review requested due to automatic review settings June 8, 2026 15:36
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Unit Test Results

24 tests   24 ✅  0s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 4f465e9.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_files before the try block in main().
  • Add a guard in set_output_event_to_report_failure() for cases where request properties could not be extracted.

Comment thread airlock_processor/StatusChangedQueueTrigger/__init__.py Outdated
Comment thread airlock_processor/StatusChangedQueueTrigger/__init__.py
Comment thread airlock_processor/StatusChangedQueueTrigger/__init__.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants