I upgraded to version 8.2.6 last week, and have just discovered a change that caused some of my jobs not to work correctly.
One of the key tasks of the job was a SQL task with the following as its execute text:
/*{TASK(PrevTask,StdOut)}
--*/
The preceding task was a Powershell script that built the query in a variable and then printed it to StdOut at the end, preceded by a
. That way if the code that created the output ever caused any output of its own for some reason, it would be commented out in the query.
After the upgrade, as best I can tell from the tests that I have run, the
no longer gets replaced before the query is sent to SQL, which prevented this task from doing what it was supposed to do for about a week before I realized what was happening. If I remove the comment from around it, it does get replaced. As best I've been able to determine so far, this behavior seems specific to SQL tasks.
If I remember correctly, I actually put this approach in place originally because there was a VisualCron version quite some time ago in which the output of Powershell tasks was being preceded by a bunch of VisualCron powershell internals information, and that had broken the task because it resulted in SQL syntax errors; that was why I didn't just do the entire comment-wrapping of any unexpected output inside the Powershell task itself.
Was this change unintentional, was it announced somewhere in the changelogs that I'm not seeing, or was it intentional but not announced because it was expected to be inconsequential?
As a side note, it appears that the task variable
from a SQL task is not, as I'd expected/hoped, the query that was actually executed on the last run, but rather the content of the query text box, and if that variable is output via a Powershell task, any Visualcron variables (inside SQL comments or not) that are in that text will get evaluated THEN. This had me barking up the wrong tree for a couple of hours convinced that somehow my SQL task was considering itself to be its own PrevTask.
Edited by moderator
2019-08-01T14:44:25Z
|
Reason: Not specified