fix: only add activity output property if not none#165
Open
fix: only add activity output property if not none#165
Conversation
Contributor
There was a problem hiding this comment.
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
SUCCEEDEDto allowing explicitNonevalues - 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 |
...factory_testing_framework/_pythonnet/data_factory_testing_framework_expressions_evaluator.py
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where activity properties with
Nonevalues 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 asNone.NoneSUCCEEDEDto allowing explicitNonevaluesNoneFixes #164