AzBobbyTables icon indicating copy to clipboard operation
AzBobbyTables copied to clipboard

Commands that execute a transaction should return a response with some result details

Open PalmEmanuel opened this issue 2 years ago • 6 comments

The Add, Update, Remove (etc.) commands should return some type of output with information on how they did.

PalmEmanuel avatar Dec 15 '22 18:12 PalmEmanuel

A suggestion is to add a parameter that specifies the level of output, "Quiet" or "Detailed" or something similar.

PalmEmanuel avatar Dec 15 '22 18:12 PalmEmanuel

if you use something like InformationLevel for the param name, you can use the same param name for Get-AzDataTableEntity to indicate whether you are wanting to get the full objects back or just the count. in #21.

If you go this route, something else to consider is whether you will allow multiple information levels to be allowed in a single invocation. [string[]] and whatnot. I would personally advise AGAINST allowing a streaming output of true/false down the pipeline that will end with a final object that has totals.

Just some thoughts on what I am thinking would fulfill all the ways that I think a user may want output:

[ValidateSet('Detailed','Total','Pipeline','Quiet')]
[string]$InformationLevel

Quiet could be the default and returns nothing.

Pipeline could return true/false down the pipeline as responses come back from the sdk.

Total could return a totals object that has the number operations that were successful vs failed

Detailed could be whatever comes back from the sdk. Dunno if it'd be streamed down the pipeline or all at once after the batch completes or what.

Szeraax avatar Dec 15 '22 18:12 Szeraax

Is it correct, that currently the commands only return an empty line? Even when piping the commands into "Out-Null", an empty line is added in the terminal.

Studermarc avatar Jul 09 '24 14:07 Studermarc

Is it correct, that currently the commands only return an empty line? Even when piping the commands into "Out-Null", an empty line is added in the terminal.

That seems to be the case, yeah. Definitely a bug, will look into it!

PalmEmanuel avatar Jul 09 '24 15:07 PalmEmanuel

@Studermarc this is now solved in #70 (not this issue #22, but your comment about empty lines). Version 3.2.1 with a fix should be up on the Gallery soon 🚀

PalmEmanuel avatar Jul 09 '24 16:07 PalmEmanuel

Awesome. Many thanks.

On Tue, 9 Jul 2024, 18:22 Emanuel Palm, @.***> wrote:

@Studermarc https://github.com/Studermarc this is now solved in #70 https://github.com/PalmEmanuel/AzBobbyTables/pull/70. Version 3.2.1 with a fix should be up on the Gallery soon 🚀

— Reply to this email directly, view it on GitHub https://github.com/PalmEmanuel/AzBobbyTables/issues/22#issuecomment-2218130208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHM3P7YNIH4TPB4E237K3SDZLQE4FAVCNFSM6AAAAABKTARACOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYGEZTAMRQHA . You are receiving this because you were mentioned.Message ID: @.***>

Studermarc avatar Jul 09 '24 17:07 Studermarc