Skip to content

Initial PowerShelll kernel prototype#9

Merged
jonsequitur merged 27 commits intodotnet:masterfrom
TylerLeonhardt:add-powershell-subkernel
Jan 31, 2020
Merged

Initial PowerShelll kernel prototype#9
jonsequitur merged 27 commits intodotnet:masterfrom
TylerLeonhardt:add-powershell-subkernel

Conversation

@TylerLeonhardt
Copy link
Copy Markdown
Contributor

@TylerLeonhardt TylerLeonhardt commented Jan 23, 2020

Original PR: dotnet/try#751 (all feedback addressed)

This handles the 3 basic messages:

  • HandleSubmitCode
  • HandleRequestCompletion
  • HandleCancelCurrentCommand (implemented but waiting until dotnet-interactive supports it better)

This change also includes tests 🙂

Example PowerShell notebook that came from this very change.

cc @SteveL-MSFT @daxian-dbw

@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

Ok I believe I've addressed all feedback from the original PR and cleaned up some copy-paste relics.

# Generated by: tyleonha
#
# Generated on: 1/23/2020
#
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.

Replace this comment section with the following?

//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

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.

The copyright and license we're using elsewhere is:

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated 👍 Not sure what you want the AuthorName and CompanyName to be in the psd1 so I left it at Microsoft for now. Let me know if you prefer something else.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should probably be .NET Foundation instead of Microsoft

@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

Not really sure what to do about the CI failure:

.packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20073.17\tools\Sign.proj(81,5): error SIGN001: Signing 3rd party library 'D:\a\1\s\artifacts\tmp\Release\ContainerSigning\200\tools/netcoreapp3.1/any/Markdig.Signed.dll' with Microsoft certificate 'Microsoft400'. The library is considered 3rd party library due to its copyright: 'Alexandre Mutel'.

@TylerLeonhardt TylerLeonhardt marked this pull request as ready for review January 24, 2020 19:31
@TylerLeonhardt TylerLeonhardt changed the title WIP Initial PowerShelll kernel prototype Initial PowerShelll kernel prototype Jan 24, 2020
@brettfo
Copy link
Copy Markdown
Member

brettfo commented Jan 24, 2020

@TylerLeonhardt For the Markdig.Signed.dll issue, you'll have to add an entry to this file.

Copy link
Copy Markdown
Contributor

@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

@TylerLeonhardt TylerLeonhardt force-pushed the add-powershell-subkernel branch from ac96a71 to 3c05dbc Compare January 27, 2020 22:55
@TylerLeonhardt TylerLeonhardt force-pushed the add-powershell-subkernel branch from a1c0b3e to fdf28a3 Compare January 29, 2020 01:05
@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

rebased and added better support for parse errors:

image

@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

Can someone help me understand the CI failure?

.packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20077.7\tools\Publish.proj(283,5): error : Invalid ELF BuildID '<null>' for tools/netcoreapp3.1/any/runtimes/linux-x64/native/libmi.so

@jonsequitur
Copy link
Copy Markdown
Contributor

@brettfo Does this build failure ring any bells?

Copy link
Copy Markdown
Member

@colombod colombod left a comment

Choose a reason for hiding this comment

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

I am concerned with the lack of tests.

@brettfo
Copy link
Copy Markdown
Member

brettfo commented Jan 29, 2020

@jonsequitur The build failure is due to dotnet/symstore#81. I've sent email internally to figure out what the workaround is and how to apply it here. I'll reply once I have something actionable.

Copy link
Copy Markdown
Contributor Author

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

I've added powershell to a few tests and added a test to test all the different streams and their order.

Any other tests you'd like?

@TylerLeonhardt TylerLeonhardt force-pushed the add-powershell-subkernel branch from 8c13d8d to 2a08ea9 Compare January 29, 2020 22:57
e => e.Should().BeOfType<CommandHandled>());
}

[Fact(Timeout = 45000)]
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.

You don't need to add the timeouts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All the other tests in this file have timeouts for similar tests. Should remove those as well?

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.

If you want to, feel free. If not, we'll do it. These were an artifact of an investigation into timeout and memory issues that were plaguing us but have been resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed them just from my added tests.

@brettfo
Copy link
Copy Markdown
Member

brettfo commented Jan 30, 2020

@TylerLeonhardt Can you try merging/cherry-picking/manually-applying the head commit in the snupkg branch? It may help with the Invalid ELF BuildID '<null>' issue.

@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

@brettfo doesn't look like that did the trick :(

@brettfo
Copy link
Copy Markdown
Member

brettfo commented Jan 30, 2020

I just added a commit that manually strips the offending files from the symbols packages. Build worked locally, now we'll see what happens in the PR.

@brettfo
Copy link
Copy Markdown
Member

brettfo commented Jan 31, 2020

The recent MSBuild hackery gets us past the symbol uploading and the Linux leg now passes.

I'll pass this back to @TylerLeonhardt now to look into the test failure(s) in Windows and add any extra features/tests you may want.

@TylerLeonhardt TylerLeonhardt force-pushed the add-powershell-subkernel branch from 248f653 to 1cb3994 Compare January 31, 2020 18:49
@jonsequitur jonsequitur merged commit d880b2a into dotnet:master Jan 31, 2020
@TylerLeonhardt TylerLeonhardt deleted the add-powershell-subkernel branch January 31, 2020 23:09
@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

🎉🎉🎉🎉

@brettfo
Copy link
Copy Markdown
Member

brettfo commented Feb 1, 2020

@TylerLeonhardt The full-signed build with the PowerShell kernel failed due to signing issues (link here). Do you know who owns the publishing of the Microsoft.Management.Infrastructure package? Looking at the NuGet packages, there are different public keys used for Unix vs. Windows binaries, and not everything is consistent. I'm not aware of a workaround on our end that could avoid checking those assemblies, but I'll keep looking.

I tried using the 3PartySHA2 key in eng/Signing.props, but that doesn't pass build, while the None key currently specified passes build but not official signing validation.

My guess is that this package (and it's Unix and Windows sub-packages) will have to be re-published with consistent signing/keys.

@TylerLeonhardt
Copy link
Copy Markdown
Contributor Author

@adityapatwardhan @TravisEz13 @SteveL-MSFT can one of you guys offer some advice here? I'm not familiar with this package.

@TravisEz13
Copy link
Copy Markdown

TravisEz13 commented Feb 1, 2020

@brettfo The Windows and non-Windows packages are separate packages from separate sources and policy says we should sign them with different Authenticode signatures.

What kind of signing are we talking about here? Authenticode or strong name?
Update: the tool appears to be checking Authenticode signatures.

@brettfo
Copy link
Copy Markdown
Member

brettfo commented Feb 3, 2020

After speaking with some people, I found a way to exclude just that one file from the signing checks due to the different signatures. See PR #110.

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.

7 participants