Skip to content

Conversation

@chunqingchen
Copy link
Contributor

@chunqingchen chunqingchen commented Jan 10, 2017

Repro:

New-PSSessionConfigurationFile -Path .\basicRRS.pssc -SessionType RestrictedRemoteServer -RunAsVirtualAccount
Register-PSSessionConfiguration -Name 'JEARepro' -Path .\basicRRS.pssc
Enter-PSSession . -ConfigurationName JEARepro
Get-Help Select-Object

Expected behavior:
Help content is returned for the "Select-Object" cmdlet

Actual behavior:

Cannot find path '' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (:) [Get-Help], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

@PowerShellTeam PowerShellTeam added the Review - Needed The PR is being reviewed label Jan 10, 2017
@chunqingchen
Copy link
Contributor Author

@PaulHigin :)

@PaulHigin
Copy link
Contributor

Can you please respond to me comment above?

@SteveL-MSFT
Copy link
Member

Please add a test

@mirichmo mirichmo added Review - Waiting on Author and removed Review - Needed The PR is being reviewed labels Feb 17, 2017
@mirichmo
Copy link
Member

@chunqingchen Please update this PR with tests per @SteveL-MSFT 's request

@daxian-dbw
Copy link
Member

@chunqingchen Please use a meaningful title and description for the PR. The current title and description is suitable for an issue but not for a PR.
The guidelines are kept in CONTRIBUTING.md and I quote here:

Add a meaningful title of the PR describing what change you want to check in. Don't simply put: "Fixes issue #5". A better example is: "Add Ensure parameter to New-Item cmdlet", with "Fixes #5" in the PR's body.
When you create a pull request, including a summary of what's included in your changes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use $helpContent | Should Not Be $null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

corrected

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add new line.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make the title more informative for the test.
Sample - "Get-Help in JEA sessions".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the test suite contains different bug fixes for JEA sessions. The information is contained in each test itself. thank you.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe that we should not mention "bug fixes" in the title and it is better to make comments in It blocks with a link to the bug number below.

# Fix #1234567890

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use correct case and replace -force with -Force.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

corrected

@chunqingchen
Copy link
Contributor Author

@iSazonov your comment has been resolved. thank you

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the user experience with this change? With this change does help still appear for cmdlets that are available in the JEA session? Please always include a description of the change along rationale for the change and any modification in experience.

With this change we now no longer throw a PathNotFound exception. How does this affect non-JEA sessions when the path cannot be resolved? Is it Ok to suppress the exception in this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

Strange but my previous comment no longer appears. Anyway my concern with this change is that previously an exception was thrown if the resolvedProviderPath is null, but now it continues. This feels like a breaking change since it now can return incomplete help for non-JEA sessions. I am not sure if that is a big deal but maybe it would be possible to detect JEA session before skipping the error.

@iSazonov
Copy link
Collaborator

Test LGTM.

@PaulHigin
Copy link
Contributor

LGTM

@chunqingchen
Copy link
Contributor Author

@daxian-dbw Hi, dongbo, can you help to merge? :)

@daxian-dbw
Copy link
Member

daxian-dbw commented Mar 21, 2017

@chunqingchen It looks new commits were pushed after the sign-off from @iSazonov and @PaulHigin. Please work with @mirichmo to see if further review is needed.

@chunqingchen
Copy link
Contributor Author

@mirichmo @PaulHigin The additional change I made is set the test case as pending because our current test harness is not supporting Register-PSSessionConfiguration cmdlet and needs further work around. however it won't blocking the product fix. Paul, would you please confirm if you are good with this?

@mirichmo
Copy link
Member

@PaulHigin Please take a look and provide an updated sign off since there were updates since the original sign off.

@mirichmo mirichmo added Review - Needed The PR is being reviewed and removed Review - Waiting on Author labels Mar 22, 2017
Copy link
Contributor

Choose a reason for hiding this comment

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

I just checked and it turns out that ExecutionContext.InitialSessionState property can be null. Please add a check for this.

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.

Please add check for _executionContext.InitialSessionState == null

@chunqingchen
Copy link
Contributor Author

@PaulHigin the comment has been resolved

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

@mirichmo
Copy link
Member

@chunqingchen This PR has been approved, but has merge conflicts. Please resolve them and push an update. I'll merge after that.

@mirichmo mirichmo merged commit 1393f45 into PowerShell:master Mar 23, 2017
@iSazonov iSazonov removed the Review - Needed The PR is being reviewed label Mar 27, 2017
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.

8 participants