Hi,
cat sgd_output.json | jq --raw-output '.warnings' give different output with sfdx plugin and old sgd npm style.
with sgd (old/v3) :
warnings = null
and with sfdx plugin (v4) I get :
warnings = []
It may ""break"" some pipeline.
Hi @alexmodis
With which version of the cli/plugin are you experiencing it ?
How to reproduce ? It happens when success ? When error ? With changes deploy ? With no changes to deploy ?
@alexmodis what do you mean by "old sgd npm style"?
Are you refering to sgd v3? (meaning that the behavior changed between v3 and v4)
Or do you see this difference between sdg v4 (installed via npm) VS the Salesforce CLI plugin? (meaning that you see a difference in behaviour between the 2 different ways to install the v4 tool)
Hi,
@mehdisfdc Seen the difference between v3 and v4 yes sorry (but I also switch to plugin style in the mean time so was referencing old as sgd v3@latest)
@scolladon it happens when success and no warnings, with changes in each cases.
Ok thanks to both of you,
I understand better now.
I propose to add a breaking change explanation in the release note of the release 4.0 to address this point.
I don't want to go back because it is too late (we already have multiple revision with this behaviour) and the code is simple this way.
@alexmodis & @mehdisfdc would it be suitable for you guys ?
The release 4.0 has been updated to indicate deprecation of the previous warning parameters having null when no warnings are encountered
Hi, @scolladon, just saw in version (4.0.3) that in fact warnings is null if output dir doesn't exist (success:false).
$ sfdx sgd:source:delta -d -t HEAD -f HEAD^1 -r . -o output
{
"error": "output folder does not exist",
"output": "output",
"success": false,
"warnings": null
}
And it is an array if success true.
Don't know if it's something to look into or not as null is a valid array.. but..
@alexmodis I hope you will be able to find the 4.0.4 release ;)
We included a patch to have a consistent output of the "warnings" attribute has you suggested, thanks for your contribution
Thanks @scolladon :)
Most helpful comment
@alexmodis I hope you will be able to find the 4.0.4 release ;)
We included a patch to have a consistent output of the "warnings" attribute has you suggested, thanks for your contribution