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

Make Update-Help throw proper error when current culture is not associated with a language #19765

Merged

Conversation

josea
Copy link
Contributor

@josea josea commented Jun 7, 2023

PR Summary

Fix #19633

Fix logic to check for no language in current culture (linux C.UTF-8).

PR Context

Check the current culture (if no parameter is passed). If no language is found, throw exception with the designated message.

PR Checklist

@josea
Copy link
Contributor Author

josea commented Jun 7, 2023

@microsoft-github-policy-service agree

@josea josea closed this Jun 7, 2023
@josea josea force-pushed the issue-19633-update-error-culture-C.UTF8 branch from 1489fe0 to b159db3 Compare June 7, 2023 20:13
@josea josea reopened this Jun 7, 2023
@StevenBucher98 StevenBucher98 added the PowerShell-Docs needed The PR was reviewed and a PowerShell Docs update is needed label Jun 12, 2023
@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 Jun 19, 2023
@josea
Copy link
Contributor Author

josea commented Jun 19, 2023

@adityapatwardhan : ok, so that's an option. See how it looks like.

image

@adityapatwardhan
Copy link
Member

@josea I like the one above. Please push the changes and I will re-review. Thanks!

@adityapatwardhan
Copy link
Member

Also, please check CI failures for the test you added.

@josea josea force-pushed the issue-19633-update-error-culture-C.UTF8 branch from 034c974 to b608697 Compare June 19, 2023 20:54
@josea josea force-pushed the issue-19633-update-error-culture-C.UTF8 branch from b608697 to 7c3f5b6 Compare June 19, 2023 21:07
@josea
Copy link
Contributor Author

josea commented Jun 19, 2023

@adityapatwardhan : changes are done. CI now passes.

@daxian-dbw
Copy link
Member

@josea CIs are all failing, please take a look.

@josea josea force-pushed the issue-19633-update-error-culture-C.UTF8 branch from 7c3f5b6 to 014217b Compare June 19, 2023 22:41
@adityapatwardhan
Copy link
Member

The PR has unrelated commits, it needs to be rebased.

@daxian-dbw daxian-dbw added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Jun 19, 2023
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jun 20, 2023
@josea
Copy link
Contributor Author

josea commented Jun 20, 2023

@adityapatwardhan : I cleaned the commit.

@daxian-dbw , @adityapatwardhan : I am having issues with the tests. They are failing and I am not sure it is related to my changes. See image below - it seems a test is setting up a web listener and it times out. I have no way to re-run the test (other than change the commit forcing it to happen again, but ideally I would just re-run this test to see what is happening).

Still, the error doesn't seem to be related to my changes. Please advise.

image

@adityapatwardhan
Copy link
Member

@josea pushed 1 small change. Rest looks good. The test failure is intermittent and does typically work fine on re-run.

@pull-request-quantifier-deprecated

This PR has 13 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Small
Size       : +13 -0
Percentile : 5.2%

Total files changed: 3

Change summary by file extension:
.cs : +7 -0
.resx : +3 -0
.ps1 : +3 -0

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@josea josea requested a review from SteveL-MSFT June 20, 2023 15:44
@daxian-dbw daxian-dbw dismissed SteveL-MSFT’s stale review June 20, 2023 16:47

Comment was addressed.

@daxian-dbw daxian-dbw changed the title Add check for no UI language in the current culture (linux C.UTF-8) t… Make Update-Help throw proper error when current culture is not associated with a language Jun 20, 2023
@daxian-dbw daxian-dbw merged commit 16558c9 into PowerShell:master Jun 20, 2023
40 checks passed
@josea josea deleted the issue-19633-update-error-culture-C.UTF8 branch June 20, 2023 17:30
@ghost
Copy link

ghost commented Jun 29, 2023

🎉v7.4.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-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Extra Small PowerShell-Docs needed The PR was reviewed and a PowerShell Docs update is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update error message of Update-Help when culture is C.UTF8
6 participants