Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@KirkMunro
Copy link
Contributor

@KirkMunro KirkMunro commented Aug 7, 2019

PR Summary

As part of the cleanup of workflow code, this PR does the following:

  • Treats ActionPreference.Suspend enumeration value as not supported and reserved for future use.
  • Update internal logic dependent on ActionPreference.Suspend such that using that value results in appropriate error messages.
  • Remove unused resource strings.
  • Updated and added tests related to ActionPreference.Suspend to ensure that it is generating the errors we expect when it is used.
  • Remove unnecessary restriction around ActionPreference.Ignore (see this discussion in issue 4348). This change is made as part of this PR because it is in the exact same body of code, and it makes sense to include it here.

PR Context

See issue #9570.

PR Checklist

Copy link
Collaborator

@iSazonov iSazonov 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 one comment.

src/System.Management.Automation/engine/CommandBase.cs Outdated Show resolved Hide resolved
@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Aug 8, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.3 milestone Aug 8, 2019
@iSazonov iSazonov self-assigned this Aug 8, 2019
@iSazonov iSazonov added the Breaking-Change breaking change that may affect users label Aug 8, 2019
Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

LGTM

@SteveL-MSFT SteveL-MSFT added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label Aug 19, 2019
@SteveL-MSFT
Copy link
Member

@PowerShell/powershell-committee the decision here is what to do about removing a workflow specific value from the existing public enum. One option is to mark it obsolete.

@SteveL-MSFT
Copy link
Member

@PowerShell/powershell-committee reviewed this, we discussed removal, using [obsolete] attribute, and leaving as-is. We discussed the possibility of using this value in the future for job control if there is a way to suspend a PSJob. For that reason, we agreed to leave this enum value. We also recommend that we explicitly number enum values so in the future, if we do decide to remove a value and add another one, then existing code will break/behavior appropriately.

@SteveL-MSFT SteveL-MSFT added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Aug 21, 2019
@KirkMunro
Copy link
Contributor Author

To address the committee review feedback, I just made the following changes:

  1. Put the enumerated value back.
  2. Updated internal logic to generate appropriate errors about using an enumerated value that is not supported and reserved for future use.
  3. Updated tests to ensure that it's behaving properly everywhere we need it to.

I'll also update the OP accordingly.

@KirkMunro
Copy link
Contributor Author

KirkMunro commented Aug 22, 2019

Note that regarding explicit numbering of the ActionPreference enumerated values, I have that handled in PR #8205.

Also, once either this PR or #8205 are merged in, I will update the other PR accordingly because there are some overlapping changes that I doubt will merge without manual intervention.

@KirkMunro KirkMunro changed the title Remove deprecated ActionPreference.Suspend enumeration value Transition ActionPreference.Suspend enumeration value into a non-supported, reserved state. Aug 22, 2019
@iSazonov iSazonov removed the Breaking-Change breaking change that may affect users label Aug 23, 2019
@KirkMunro
Copy link
Contributor Author

Just FYI in case it wasn't clear: I updated this PR once #8205 was merged into PowerShell, so this PR is one again ready for review/merge.

Two of the three Codacy issues are incorrect (looks like it needs to be updated for modern syntax), and the third one is related to a Pester test and will be ignored.

@iSazonov
Copy link
Collaborator

@PaulHigin Could you please update your review (we have new commits)?

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Aug 29, 2019
@KirkMunro
Copy link
Contributor Author

FYI, I will not be making changes based on the Codacy review because one of the issues is a false positive, and the other two are incorrect. This PR is ready for review by other reviewers.

@iSazonov
Copy link
Collaborator

iSazonov commented Sep 5, 2019

@SteveL-MSFT PowerShell Committee request was addressed. Can we merge?

@daxian-dbw daxian-dbw added the Breaking-Change breaking change that may affect users label Sep 6, 2019
@KirkMunro KirkMunro changed the title Transition ActionPreference.Suspend enumeration value into a non-supported, reserved state. Transition ActionPreference.Suspend enumeration value into a non-supported, reserved state, and remove restriction on using ActionPreference.Ignore in preference variables Sep 6, 2019
KirkMunro added a commit to KirkMunro/PowerShell that referenced this pull request Sep 6, 2019
@iSazonov iSazonov added CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log and removed CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log labels Sep 6, 2019
@daxian-dbw daxian-dbw removed Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log labels Sep 6, 2019
@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Sep 7, 2019
@iSazonov iSazonov merged commit 139cd94 into PowerShell:master Sep 7, 2019
@KirkMunro KirkMunro deleted the deprecate-actionpreference-suspend branch September 9, 2019 17:31
TravisEz13 pushed a commit to TravisEz13/PowerShell that referenced this pull request Sep 14, 2019
…orted, reserved state, and remove restriction on using ActionPreference.Ignore in preference variables (PowerShell#10317)
@ghost
Copy link

ghost commented Sep 19, 2019

🎉v7.0.0-preview.4 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-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.