Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix merge bug in Linux when only pass file name without path #2408

Merged
merged 109 commits into from
Feb 18, 2022

Conversation

shaopeng-gh
Copy link
Collaborator

@shaopeng-gh shaopeng-gh commented Nov 11, 2021

Description:

merge bug in Linux when only pass file name, like this command:
merge --force --merge-runs --output-directory=result/ --output-file=MergeResult.sarif FileNameOnly.sarif

Fixes:

  1. The issue is our code use windows only file path, fixed the code.
  2. added Linux and macOS build and test pipeline.
  3. fix all build and test script for Linux issues encountered.
  4. fixed some tests not working in Linux btw since the new test I am adding is in the same place.
  5. also went though all failed tests and fix those easily fixable like path issue.
  6. for those have like .exe usage and win32 calls and need more time to see how to fix, added a attribute to skip them for now and fix in separate changesets.

@@ -273,7 +273,7 @@ private async Task<bool> FindFilesAsync()

if (directory.Length == 0)
{
directory = @".\";
directory = Directory.GetCurrentDirectory();
}
Copy link
Collaborator Author

@shaopeng-gh shaopeng-gh Nov 11, 2021

Choose a reason for hiding this comment

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

just a quick update that
will update the azure pipeline and add ubuntu-latest for this pr to see how the tests run in Linux. #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

able to add azure pipeline to also run test in Linux
but I found it does not even build before run unit test,
I think the Powershell script we have have the syntax for window only, I will check and fix issues.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed, also fixed the build in macos so tests can see how the test run in macos as well

@shaopeng-gh shaopeng-gh marked this pull request as draft November 11, 2021 21:02
jobs:
- job: NET_pipeline
strategy:
Copy link
Collaborator

@yongyan-gh yongyan-gh Nov 17, 2021

Choose a reason for hiding this comment

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

consider adding "maxParallel" to reduce overall build time #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

@shaopeng-gh shaopeng-gh linked an issue Feb 9, 2022 that may be closed by this pull request
@shaopeng-gh shaopeng-gh marked this pull request as draft February 9, 2022 19:56
<None Remove="TestData\ValidateCommand\Configuration.xml" />
<None Remove="TestData\ValidateCommand\ValidateSarifOneZeroZero.sarif" />
<None Remove="xunit.runner.json" />
</ItemGroup>
Copy link
Collaborator Author

@shaopeng-gh shaopeng-gh Feb 14, 2022

Choose a reason for hiding this comment

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

Michael: This is junk that VS insists on adding. You can see it's not in sync w/what's below, let's just delete it. #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

@microsoft microsoft deleted a comment from michaelcfanning Feb 14, 2022
@shaopeng-gh shaopeng-gh marked this pull request as ready for review February 14, 2022 08:41
@michaelcfanning
Copy link
Member

michaelcfanning commented Feb 16, 2022

  • BUGFIX: Fix 'InvalidOperationException' with message Collection was modified; enumeration operation may not execute in MultithreadedAnalyzeCommandBase, which is raised when analyzing with the --hashes switch. #2447

Why did this release note get deleted? Let's restore it.


In reply to: 1042368013


In reply to: 1042368013


In reply to: 1042368013


Refers to: src/ReleaseHistory.md:10 in 6f84064. [](commit_id = 6f84064, deletion_comment = True)

(@"\\hostname/path\file.ext", expectedResult),
(@"file:///C:\path/file.ext", expectedResult),
(@"\\hostname/c:\path\file.ext", expectedResult),
(@"\home\username/path/file.ext", expectedResult),
Copy link
Member

@michaelcfanning michaelcfanning Feb 16, 2022

Choose a reason for hiding this comment

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

home

Should we test the ~\path convention? #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

@shaopeng-gh
Copy link
Collaborator Author

  • BUGFIX: Fix 'InvalidOperationException' with message Collection was modified; enumeration operation may not execute in MultithreadedAnalyzeCommandBase, which is raised when analyzing with the --hashes switch. #2447

not an issue was looking at old version


In reply to: 1042368013


Refers to: src/ReleaseHistory.md:10 in 6f84064. [](commit_id = 6f84064, deletion_comment = True)

@michaelcfanning michaelcfanning merged commit 92cb8e0 into main Feb 18, 2022
@michaelcfanning michaelcfanning deleted the users/shaopeng-gh/mergeissueinlinux branch February 18, 2022 00:59
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.

merge produces empty SARIF file regardless of the inputs
4 participants