Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

DataFactoryTestingFrameworkExpressionsEvaluator adds status property even if None is set.

Open Beginner friendly
#164 0 comments 0 reactions 0 assignees View on GitHub

@LeonardHd is already working on this.

Since Jul 29, 2025.

  • #165 by @LeonardHd — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
azure, python
Domain
testing-qa

Research direction

Open src/data_factory_testing_framework/_pythonnet/data_factory_testing_framework_expressions_evaluator.py around line 40 and inspect how activity result properties are added. Reproduce the expression-evaluation case described in the issue, then verify that properties set to None are omitted while non-None properties remain available.

Written by the indexing model from the issue text.

Description

bug

We have scenarios where certain Activity outputs (like status as described in #162 ) are not present on the Activity Outputs.

Currently neither functional tests nor activity tests can capture these scenarios because we add the status always to the activity results (see https://github.com/microsoft/data-factory-testing-framework/blob/main/src/data_factory_testing_framework/_pythonnet/data_factory_testing_framework_expressions_evaluator.py#L40).

The expression evaluator returns a error we can handle to mimic the behaviour:

>           raise Exception(f"Unknown error: {e}") from e
E           Exception: Unknown error: The template language expression 'contains(
E             createArray(
E               activity('Fail').status,
E               activity('Notebook').status
E             ),
E             'Failed'
E           )' cannot be evaluated because property 'status' doesn't exist, available properties are 'output, error'. Please see https://aka.ms/logicexpressions for usage details.
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionTextExpression.SelectObjectProperty(JObject root, JToken property, Boolean safeDereference)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionTextExpression.SelectProperty(JToken root, TemplateDereferenceExpression[] dereferences, TemplateExpressionEvaluationContext context, Boolean failOnError)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionTextExpression.EvaluateRootExpression(TemplateExpressionEvaluationContext context, Boolean failOnError, ISkippableEnumerator`1 parameterValues, Int32 parametersCount)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionExpression.EvaluateExpression(TemplateExpressionEvaluationContext context, Boolean failOnError)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionExpression.LazyParameterEnumerator.MoveNext(Int32 skip)
E              at Microsoft.Azure.Workflows.Templates.ISkippableEnumeratorExtensions.ToEnumerable[T](ISkippableEnumerator`1 enumerator)+MoveNext()
E              at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
E              at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateExpressionBuiltInFunctions.EvaluateFunction(String functionName, ISkippableEnumerator`1 parameters, Int32 parametersCount, Boolean preserveAnnotations)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateExpressionEvaluationHelper.EvaluateFunction(String functionName, ISkippableEnumerator`1 parameters, Int32 parametersCount)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionTextExpression.EvaluateRootExpression(TemplateExpressionEvaluationContext context, Boolean failOnError, ISkippableEnumerator`1 parameterValues, Int32 parametersCount)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionExpression.EvaluateExpression(TemplateExpressionEvaluationContext context, Boolean failOnError)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionExpression.LazyParameterEnumerator.MoveNext(Int32 skip)
E              at Microsoft.Azure.Workflows.Templates.ISkippableEnumeratorExtensions.ToEnumerable[T](ISkippableEnumerator`1 enumerator)+MoveNext()
E              at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
E              at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateExpressionBuiltInFunctions.EvaluateFunction(String functionName, ISkippableEnumerator`1 parameters, Int32 parametersCount, Boolean preserveAnnotations)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateExpressionEvaluationHelper.EvaluateFunction(String functionName, ISkippableEnumerator`1 parameters, Int32 parametersCount)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionTextExpression.EvaluateRootExpression(TemplateExpressionEvaluationContext context, Boolean failOnError, ISkippableEnumerator`1 parameterValues, Int32 parametersCount)
E              at Microsoft.Azure.Workflows.Templates.Expressions.TemplateFunctionExpression.EvaluateExpression(TemplateExpressionEvaluationContext context, Boolean failOnError)
E              at Microsoft.Azure.Workflows.Templates.Helpers.TemplateExpressionsHelper.EvaluateTemplateLanguageExpression(String expression, TemplateExpressionEvaluationContext evaluationContext)
E              at Microsoft.Azure.DataFactoryTestingFramework.Expressions.Evaluator.EvaluateExpression(String expression, String parametersJson, String variablesJson, String itemValueJson, String activityValuesJson)
E              at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
E              at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Proposed solution:

Only add the add properties if they are set to anything other than None.

Dominant language
Python
Stars
135
Forks
43
Avg merge
1h 14m
Merged PRs (30d)
1

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/data-factory-testing-framework

All issues in microsoft/data-factory-testing-framework

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.