Skip to content

Update script to automatically take new preview pre-release builds#17375

Merged
daxian-dbw merged 3 commits intoPowerShell:masterfrom
adityapatwardhan:updateDotnetUpdate
May 20, 2022
Merged

Update script to automatically take new preview pre-release builds#17375
daxian-dbw merged 3 commits intoPowerShell:masterfrom
adityapatwardhan:updateDotnetUpdate

Conversation

@adityapatwardhan
Copy link
Copy Markdown
Member

@adityapatwardhan adityapatwardhan commented May 18, 2022

PR Summary

Use new feature in dotnet-install.ps1 to automatically update to latest available preview build.
Some things to note:

  1. The script now has 7.0.1xx as the nextChannel. This means it will look for the latest preview even if PS skips a preview.
  2. The default quality to look for is now daily. If not available, then we fallback to preview. Preview means last release .NET 7 preview version.
  3. One additional change is that the script also updates DotnetRuntimeMetadata.json as well to update the value for channel. This is used by Start-PSBootstrap to know which build to install. The format for that is like: 7.0.1xx-preview4. So, we construct that from the latest SDK found and update it.

PR Context

Marking this a WIP till we snap for next preview.

PR Checklist

@ghost ghost assigned daxian-dbw May 18, 2022
@adityapatwardhan adityapatwardhan changed the title Update script to automatically take new preview pre-release builds WIP: Update script to automatically take new preview pre-release builds May 18, 2022
[string] $newSdk
)

# -replace uses regex so we are splitting on "."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment doesn't make sense to me. Why should regex cause us to split on '.'?

Suggested change
# -replace uses regex so we are splitting on "."
# -replace uses regex so we are splitting on "."
# Example SDK version: '7.0.100-preview.4' -> '7.0.1xx-preview4'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated comment to: # -replace uses regex so we are splitting on "." and not on "\.". "\" is escaped in the regex.

@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 May 18, 2022
@adityapatwardhan adityapatwardhan changed the title WIP: Update script to automatically take new preview pre-release builds Update script to automatically take new preview pre-release builds May 18, 2022
@adityapatwardhan
Copy link
Copy Markdown
Member Author

@PaulHigin - please re-review. I have addressed your comment

Copy link
Copy Markdown
Member

@daxian-dbw daxian-dbw 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 a comment.

Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
@pull-request-quantifier-deprecated
Copy link
Copy Markdown

This PR has 22 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       : +19 -3
Percentile : 8.8%

Total files changed: 2

Change summary by file extension:
.json : +3 -3
.ps1 : +16 -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 detetcted.
  • 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.

@daxian-dbw daxian-dbw merged commit f47159b into PowerShell:master May 20, 2022
@adityapatwardhan adityapatwardhan added the CL-Tools Indicates that a PR should be marked as a tools change in the Change Log label Jun 20, 2022
@ghost
Copy link
Copy Markdown

ghost commented Jun 22, 2022

🎉v7.3.0-preview.5 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-Tools Indicates that a PR should be marked as a tools change in the Change Log Extra Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants