Skip to content

WIP: Add a test to compare two SDK and show file diff - #1611

Merged
crummel merged 1 commit into
dotnet:release/3.1from
omajid:test-sdk-diff
Jun 18, 2020
Merged

crummel merged 1 commit into
dotnet:release/3.1from
omajid:test-sdk-diff

Conversation

@omajid

@omajid omajid commented Jun 4, 2020 •

Copy link
Copy Markdown
Member

This should let us catch surprises in releases.

Here's the current output of this script when comparing my local /usr/lib64/dotnet (source-build, 3.1.103) with ~/local/dotnet-sdk-3.1.103 (Microsoft's build, downloaded from dot.net):

https://gist.github.com/omajid/9111a9310d452b3594b770d4ca8a3d87

A couple of questions:

  1. Does this seem useful?

  2. Do we want to run this manually at release time? Is there a release-checklist I should edit?

  3. Is the output useful in its current form? Should I be filtering out more or fewer things?

  4. Do we want to hook this into CI? And somehow flag any changes to the expected diff? If that's the case, how do we want to handle file version differences?

@omajid

omajid commented Jun 4, 2020

Copy link
Copy Markdown
Member Author

Any other thoughts/suggestions to make this more useful?

cc @crummel @dagood @dseefeld @RheaAyase @tmds

Comment thread compare-builds.sh Resolved
@dagood

dagood commented Jun 5, 2020

Copy link
Copy Markdown
Member
  1. Does this seem useful?

To me, yes. I think we should probably start putting utilities like this in scripts/ (extract-patches.sh would be another), to keep the root a little cleaner and mainly for build/(auto-)test entrypoints.

  1. Do we want to run this manually at release time? Is there a release-checklist I should edit?

Checklist WIP at #1555, so soon in there, yeah.

  1. Do we want to hook this into CI? And somehow flag any changes to the expected diff? If that's the case, how do we want to handle file version differences?

Yeah, I think this makes sense as a smoke-test with baseline. We'll need some way to fetch the N Microsoft SDK to compare against. (Should aim to have auto-updates drive the artifact version, at least.) For the version numbers in dir names, I think we can drive them down (by setting build version properly--or forcing it), or we can manually ignore it when we baseline diffs are reviewed. If we compare against source-built N-1 as well we'd probably need some more specific pattern matching.

  1. Is the output useful in its current form? Should I be filtering out more or fewer things?

It definitely looks like useful data. I suspect a lot of it could be explained by going back through source-build history, but I wonder if we should actually add comments to a baseline diff as a way to write down the reasons? Certainly seems like a good document to have, and it would help speed up baseline diff reviews to have the history in context.

Comment thread scripts/fetch-microsoft-sdk.sh Outdated
curl -L "$install_script_url" -o "${install_script_dir}/dotnet-install.sh"

chmod +x "${install_script_dir}/dotnet-install.sh"
url=$(/tmp/tmp.Jhl1JIGIpU/dotnet-install.sh --dry-run --version "$sdk_version"| grep https | sed -E 's|.*(https://.*tar.gz)$|\1|' | head -1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this meant to be:

Suggested change
url=$(/tmp/tmp.Jhl1JIGIpU/dotnet-install.sh --dry-run --version "$sdk_version"| grep https | sed -E 's|.*(https://.*tar.gz)$|\1|' | head -1)
url=$("$install_script_dir/dotnet-install.sh" --dry-run --version "$sdk_version"| grep https | sed -E 's|.*(https://.*tar.gz)$|\1|' | head -1)

(Clever approach, I like how it isolates us from funny script behavior.)

In the end, we'll need something special to handle the internal scenario and (if we can) put the Msft SDK in smoke-test prereqs, but managing to implement that without Msft internal access would be magic so IMO getting this impl in for now is perfectly fine. 😄

@omajid
omajid force-pushed the test-sdk-diff branch 4 times, most recently from 2aa150b to 464012d Compare June 9, 2020 20:33
This should let us catch surprises in releases, but requires a manual
review of the output.
@omajid
omajid marked this pull request as ready for review June 15, 2020 19:58

@dagood dagood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, LGTM. Next steps for usefulness here would be 1. a baseline diff vs. last release, 2. filtering such that any output that makes it past is something we don't know about and may be scenario impacting. For now I think it will be useful for us to review the diff itself in the release checklist.

Similar to prebuilt tracking. (But there, we targeted 0 prebuilts as a step 3, which doesn't seem possible here (yet).)

@crummel crummel left a comment

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.

LGTM, thanks for adding this!

@crummel
crummel merged commit e89f045 into dotnet:release/3.1 Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants