Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PalmEmanuel opened this issue Dec 15, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@PalmEmanuel
Copy link
Owner

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

@PalmEmanuel
Copy link
Owner Author

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

@Szeraax
Copy link
Contributor

Szeraax commented Dec 15, 2022

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.

@PalmEmanuel PalmEmanuel added the enhancement New feature or request label Dec 15, 2022
@Studermarc
Copy link

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.

@PalmEmanuel
Copy link
Owner Author

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
Copy link
Owner Author

PalmEmanuel commented Jul 9, 2024

@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 🚀

@Studermarc
Copy link

Studermarc commented Jul 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants