8000 Add `-SkipLimitCheck` switch to `Import-PowerShellDataFile` by SteveL-MSFT · Pull Request #13672 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Sep 22, 2020

PR Summary

By default, there is a limit to the number of keys in a hashtable allowed to be converted from a psd1 file (500 keys). This limit is hitting user cases like DSC configuration. Change is to add a -SkipLimitCheck switch to by-pass the validation step for a hashtable.

PR Context

Fix #7979

PR Checklist

@TylerLeonhardt
Copy link
Member

Shouldn't this follow the JSON cmdlet's -De 8000 pth so it's consistant?

@vexx32
Copy link
Collaborator
vexx32 commented Sep 22, 2020

-Depth is a bit of a different concept than just maximum number of keys/properties.

But I do think following a similar pattern is probably a better call than a switch; if a user knows the ballpark value to use, let them specify 1000 or 2000 so they can keep some control over the input file and verify things aren't getting input over and above what they expected. Have it default to 500 and then if you really want no limit, set it to zero or something?

@rjmholt
Copy link
Collaborator
rjmholt commented Sep 22, 2020

if you really want no limit, set it to zero or something?

0 or -1 both seem logical to me

@SteveL-MSFT SteveL-MSFT changed the title Add -NoLimit switch to Import-PowerShellDataFile Add -SkipLimitCheck switch to Import-PowerShellDataFile Sep 23, 2020
@SteveL-MSFT
Copy link
Member Author

I think 0 or -1 to mean infinite only makes sense to a developer. Most users don't think like that. Per @PowerShell/powershell-committee updated to -SkipLimitCheck

Copy link
Collaborator
@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests LGTM. Small suggestion on the param name

@SteveL-MSFT
Copy link
Member Author

The static analysis credscan issue is fixed as part of #13692

@ghost ghost added the Review - Needed The PR is being reviewed label Oct 6, 2020
@ghost
Copy link
ghost commented Oct 6, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Review - Needed The PR is being reviewed labels Nov 4, 2020
@adityapatwardhan
Copy link
Member

@SteveL-MSFT Please update the PR.

@ghost ghost added the Stale label Nov 28, 2020
@ghost
Copy link
ghost commented Nov 28, 2020

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

…hell.Utility.psd1

Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>
Copy link
Collaborator
@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with @adityapatwardhan's suggestion applied

@ghost ghost removed the Stale label Dec 8, 2020
@rjmholt rjmholt assigned rjmholt and unassigned adityapatwardhan Dec 8, 2020
@rjmholt
Copy link
Collaborator
rjmholt commented Dec 8, 2020

@PoshChan please remind me in 18 hours

@PoshChan
Copy link
Collaborator
PoshChan commented Dec 9, 2020

@rjmholt, this is the reminder you requested 18 hours ago

@rjmholt rjmholt dismissed adityapatwardhan’s stale review December 9, 2020 19:06

Requested changes have been made

@rjmholt rjmholt merged commit 95ce064 into PowerShell:master Dec 9, 2020
@rjmholt rjmholt added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Dec 9, 2020
@ghost
Copy link
ghost commented Dec 15, 2020

🎉v7.2.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import-PowerShellDataFile Errors on files over 3230 lines

6 participants

0