-
Notifications
You must be signed in to change notification settings - Fork 30
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
Snapshot path problem on Linux build agent #196
Comments
Were you able to fix this? I have hit this too |
Running into a similar thing. Our paths start with |
I also ran into this problem. Interestingly, it seemed to work until roughly 5 months ago, the last change to our codebase was 7 months ago. So I can only assume that something regarding the OS or GitHub workflows caused the problem. The
|
@mtsfoni From what I can see the directory is determined here:
It fetches the stack frames StackFrame[] stackFrames = new StackTrace(true).GetFrames(); and searches for methods that have the Theory or Fact attribute and gets the corresponding directory. For me, this is working, and if I execute this manually, it results in something like this: Don't know what goes wrong, but you see further down often the "/_/" start in the directory name. |
Note the definition of StackFrame.GetFileName:
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stackframe.getfilename?view=net-6.0 i.e. it has to do with the debug information that is available while running the test. |
I assume something happens in the GitHub actions environment causing the .pdbs to come out with unexpected paths. I found this work around, which currently is good enough for me. |
Compare SwissLife-OSS/snapshooter#196 Signed-off-by: andreas hilti <[email protected]>
Fix build regarding SwissLife-OSS/snapshooter#196
Describe the bug
Looks like the snapshot folder isn't resolved properly, so Snapshooter tries to create a directory it doesn't have permissions for.
To Reproduce
Using:
Test passes on development machine (Windows 11, VS2022) but fails on Linux CI run. Snapshot file is checked in to the repository, SNAPSHOOTER_STRICT_MODE is set to true.
Expected behavior
The existing snaphot should be resolved correctly.
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: