Skip to content

fix: only add activity output property if not none #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LeonardHd
Copy link
Collaborator

@LeonardHd LeonardHd commented Jul 29, 2025

This PR fixes an issue where activity properties with None values were incorrectly included in the activity result dictionary, causing that no parameter not found errors are thrown when expressions tried to access non-existent properties as they are passed as None.

  • Updates the expression evaluator to only include activity properties in the output body when they are not None
  • Changes the default status from being automatically set to SUCCEEDED to allowing explicit None values
  • Adds comprehensive test coverage for scenarios where activity properties are None

Fixes #164

@LeonardHd LeonardHd requested a review from Copilot July 29, 2025 15:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where activity properties with None values were incorrectly included in the activity result dictionary, causing parameter not found errors when expressions tried to access non-existent properties.

  • Updates the expression evaluator to only include activity properties in the output body when they are not None
  • Changes the default status from being automatically set to SUCCEEDED to allowing explicit None values
  • Adds comprehensive test coverage for scenarios where activity properties are None

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/data_factory_testing_framework/state/_activity_result.py Removes automatic defaulting of status to SUCCEEDED, allowing explicit None values
src/data_factory_testing_framework/_pythonnet/data_factory_testing_framework_expressions_evaluator.py Implements conditional inclusion of activity properties, only adding them to output body when not None
tests/unit/functions/test_data_factory_testing_framework_expression_evaluator.py Adds parameterized test to verify proper error handling when accessing None activity properties

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.

DataFactoryTestingFrameworkExpressionsEvaluator adds status property even if None is set.
1 participant