Skip to content

Fix logging in parallel runspaces - #7

Merged
dlwyatt merged 17 commits into
dlwyatt:masterfrom
Jaykul:jaykul/6/FixRunspaces
Jul 30, 2019
Merged

dlwyatt merged 17 commits into
dlwyatt:masterfrom
Jaykul:jaykul/6/FixRunspaces

Conversation

@Jaykul

@Jaykul Jaykul commented Jul 3, 2019 •

Copy link
Copy Markdown

This fixes #6 and also fixes the module to work in PowerShell 6 and 7

Comment thread HostIOInterceptor.cs Outdated
Comment thread HostIOInterceptor.cs Outdated
Comment thread Tests/Simple.Tests.ps1 Outdated
Comment thread Tests/Runspace.Tests.ps1 Outdated
Comment thread Tests/Remote.Tests.ps1 Outdated
Comment thread Tests/Invoke.Tests.ps1 Outdated
Comment thread .gitignore Outdated
Comment thread HostIOInterceptor.cs Outdated
@Jaykul
Jaykul force-pushed the jaykul/6/FixRunspaces branch from 159e907 to 8335c04 Compare July 4, 2019 15:43
@dlwyatt if you don't like this I can revert this, but @JPRuskin is right that this is how I prefer to do it
@Jaykul

Jaykul commented Jul 4, 2019 •

Copy link
Copy Markdown
Author

@dlwyatt this last commit changes the build.ps1 script I added to accept a Version parameter (and by default use gitversion to calculate it) and build output to a folder with that as the name by default. That, in our experience, makes the dev versions of the module easier to test (if you make sure the parent to your project is in your $Env:PSModulePath).

Having done that, I can also update all the version numbers in the build output (in the library file and in the metadata), so I went ahead and did all of that in the build script too.

I stuck it in a single commit, so if you don't want it, I can revert that commit ...

Joel Bennett added 4 commits July 4, 2019 15:33
Previously, running the runspace or invoke tests would break each other (and the simple) test.
+semver:feature
ParallelRunspace tests (ThreadJobs) are WIP: currently fail
@Jaykul
Jaykul force-pushed the jaykul/6/FixRunspaces branch from 09444c9 to 3a6fd10 Compare July 5, 2019 21:28
@Jaykul

Jaykul commented Jul 5, 2019

Copy link
Copy Markdown
Author
  • The module now works in Invoke and in Runspaces without hosts now.
  • It even works in remote runspaces without hosts (which is what I really needed right now).

However, his last commit demonstrates a remaining problem found in our QA:

Parallel runspaces in the same process still cause problems due to the
public static readonly HostIOInterceptor Instance.

Personally I'd like to see this merged, and will create a new issue for the other problem...

Comment thread Test.ps1 Outdated
} else {
Write-Warning "Skipping PowerShell Core tests"
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ahem.

@Jaykul

Jaykul commented Jul 8, 2019

Copy link
Copy Markdown
Author

While setting up an automated build against my branch I ran into some issues with the tests ...
Since the PR is still open, I've fixed those and added a couple showing the problem mentioned in #8

@Jaykul

Jaykul commented Jul 30, 2019

Copy link
Copy Markdown
Author

FWIW, these changes passed our tests and QA and we're now working with a forked version ...

@dlwyatt

dlwyatt commented Jul 30, 2019

Copy link
Copy Markdown
Owner

Cool. I’m on vacation for a couple of weeks. I can merge the PR now with my phone, but won’t be able to publish until I get back home

@dlwyatt
dlwyatt merged commit 6bf6aab into dlwyatt:master Jul 30, 2019
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.

When using with PowerShell.Create PowerShellLogging throws on all Write Output

4 participants