Skip to content

Honor falsey except fallbacks in python wrangle and emit concise error context - #1020

Draft
ebhills with Copilot wants to merge 2 commits into
mainfrom
copilot/wr-1019-add-except-param
Draft

Honor falsey except fallbacks in python wrangle and emit concise error context#1020
ebhills with Copilot wants to merge 2 commits into
mainfrom
copilot/wr-1019-add-except-param

Conversation

Copilot AI commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

python wrangle failures were still raising when except was set to a falsey value (e.g. {}), which blocked the intended offline-debugging flow. This change makes fallback behavior consistent for all explicit except values and surfaces a compact error signal in logs.

  • Fallback semantics in python wrangle

    • Switch exception-fallback guard from truthiness to explicit presence (is not None).
    • except now works for values like {}, 0, false, and "" instead of being ignored.
  • Debuggability on caught exceptions

    • When fallback is used, log a concise message including exception type/message and that except output is being returned.
  • Regression coverage

    • Add a focused recipe test for object fallback (except: {}) to prevent reintroducing falsey-handling regressions.
wrangles:
  - python:
      input: attributes_json
      output: attributes_dict
      command: {item.get('key'): item.get('value') for item in attributes_json if isinstance(item, dict) and item.get('key')}
      except: {}

Copilot AI changed the title [WIP] Add except param to python wrangle for better error handling Honor falsey except fallbacks in python wrangle and emit concise error context Jun 20, 2026
Copilot AI requested a review from ebhills June 20, 2026 16:49
@ebhills
ebhills removed their request for review July 27, 2026 14:03

ebhills commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Queue triage (2026-07-27)

  • Disposition: Draft — delivery-owner action
  • Delivery owner: @ebhills
  • Next action: Human sponsor is @ebhills. Keep this bot-authored work Draft until CI runs, overlap with current exception/error work is checked, and a primary reviewer other than the delivery owner is selected.

GitHub is the status record; update this PR rather than the external spreadsheet.

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