Skip condition based on context variable not evaluating

Issue:
Working expression for skip condition intermittently fails with below error:

Error evaluating skip condition: ${context.deploy.varName}=='TRUE': Property: io.harness.expression.ExpressionEvaluator.evaluate@1:8 unsolvable property 'deploy'; Cause: SweepingOutputException: STATE_MACHINE_ISSUE

The above error causes the pipeline to fail intermittently.

Cause:
The expression used here is based on a context variable. If there are any issues publishing the context variable expires or fails it will cause the context to not publish.
This will in turn cause the step using these context variables to fails as the step will not be able to evaluate based on the variable which failed to publish. As these are published during runtime there can not be a pre-check on these and is completely dependent on the success of the step publishing the context variable.

In such scenarios we should first identify if we are using a context variable in expression or not. If a context variable is being used and we do not see it in the input variables for step using it we should check the corresponding step publishing the variable if they are failing for any reason and solve it accordingly.