-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add initial Linux platform and scripts #413
Conversation
.azure-pipelines/pull-request.yml
Outdated
pool: | ||
name: ubuntu-latest | ||
steps: | ||
- powershell: Scripts/CI/Set-Version.ps1 -SourceBranchCounter $(branchCounter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the PowerShell task #JustWork on linux agents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost certainly not. :-/ I had a dim recollection that it somehow just worked everywhere from setting up Linux build pipelines for VFS4G, but looking over those again I see we actually used the Bash job in all the Linux pipelines. Will change, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it called out but I'm guessing since the Demand
it makes is the DotNetFramework, that implies Windows? I asked since I know we now support Powershell on mac and linux, but I don't know what that requires :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I'm just going to heavily lean on the GitHub Actions setup you created in git-ecosystem/git-credential-manager#157 as a slightly modified version seems to be just fine here. That simplifies the whole CI setup quite a bit and so for now I think I'll ignore any attempt to get things working in Azure.
|
||
namespace Scalar.Platform.Linux | ||
{ | ||
public class LinuxFileBasedLock : FileBasedLock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will still need this for the scalar run
verb, I think. Good to include.
/azp run microsoft.scalar |
Azure Pipelines failed to run 1 pipeline(s). |
@chrisd8088: I started the pipeline as currently-written, and got an error. I expect that you're currently writing GitHub Actions YAML instead, so perhaps that error doesn't matter. |
c4a0da8
to
7f22e53
Compare
7f22e53
to
04b18db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside of the platform instance bug I found, I think this is an excellent first step! I'd be happy to merge in these results and start making the GitHub actions builds a required step for merging to main
!
Or, do you still think this merits a [WIP]
warning, @chrisd8088?
@@ -0,0 +1,8 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mimics scrips in the other directories, so this is fine.
To be honest, I think the decision to merge or not is entirely up to you! I've been holding off while I experiment with running the functional tests (which break in all kinds of ways), but if you wanted to move forwards with this as it stands, I'm OK with that too -- but I would want to rewrite the commits somewhat at a bare minimum. There will necessarily be refactoring of the Mac and Linux platforms to get them back to parity with the VFSForGit ones, where we'd made some progress eliminated duplicated code. Again, that's the sort of thing I thought I would try to get further along before proposing this as a "real" PR. Let me see if I can clean this up a bit more, at least, tomorrow, if that works for you. I am happy with the CI builds in Actions, though, so that could also be a separate PR, I suppose. |
This string was added when toying with testing SSH URLs in the functional tests. However, there was an issue with using SSH inside the build machines, so it was never used. It's now creating pain for the GitHub Actions workflows that will build Scalar. Drop it. (This was noticed by the warnings in #413.)
You're absolutely right, which is why I asked what was still "in progress" as part of your "WIP" designation.
Rewriting commits to satisfy your quality bar is definitely something you should take time to do. I would prefer that we get a PR that runs the build + unit test step before we do the extra work to get functional tests working. Trying to do them all at once sounds like a recipe for PR bloat that will make it hard to review.
Please don't consider "parity with VFS for Git" a goal. Updating the platforms to reflect necessary platform differences is a valuable effort, but preferably that would be isolated to demonstrating that functional tests start to pass with those changes. The unit tests don't need these platform updates.
Yes! I'm very happy to have the GitHub Actions workflows merged to the |
OK, I can tweak these into two PRs in the next while, one for the basic first pass on the platform, and one for adding the Actions builds. As for the functional tests, I'm just chipping away at problems, most of which so far have been config issues, but now seem to have something going sideways in FastFetch, but that too could be a config issue at its root. In brief, nothing too exciting to report there, just chipping at the coal face. |
FastFetch? Where is there still FastFetch code in scalar? |
04b18db
to
7d746ec
Compare
Yeah, don't take that too seriously -- I was just in the midst of debugging, and so far everything is purely config-related. In that case, |
Latest functional test run was actually pretty successful: |
589c6e2
to
75471c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge after #418 so we can run the PR validation here.
I'm going to close and reopen so the PR validation runs again (hopefully). |
This is an initial port of the GVFS.Platform.Linux classes and the Scripts/Linux scripts from both the Mac equivalents in this repository as well as the corresponding classes in the VFSForGit repository. Quoting from the primary VFSForGit commit microsoft/VFSForGit@b304cf7 from which this work was derived: We add the core GVFS.Platform.Linux classes, derived from their GVFS.Platform.Mac equivalents but with appropriate changes for syscall argument signatures and flag values, type definitions, and structure fields (e.g., mode_t is a uint, and the layout of struct stat is quite different). We also include all or portions of microsoft/VFSForGit@4ec09a8, microsoft/VFSForGit@7c3c4fa, and microsoft/VFSForGit@ef3201b. Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
These checks allow us to detect compilation on systems which may not meet requirements for stat(2) struct field layout and __xstat64() libc ABI support on Linux. From microsoft/VFSForGit@5b1236c.
75471c9
to
6614c18
Compare
This is an initial port of the
GVFS.Platform.Linux
classes and theScripts/Linux
scripts from both the Mac equivalents in this repository as well as the corresponding classes in the VFSForGit repository.Note that some useful refactoring which exists in the VFSForGit
features/linuxprototype
branch, such as microsoft/VFSForGit@7b70850, has not yet been ported; this would (re-)eliminate some of the duplication between the Mac and Linux platforms and move common code into the POSIX one.This PR also does not include the case-sensitive filename support in VFSForGit's
master
branch from microsoft/VFSForGit#1412.Quoting from the primary VFSForGit commit microsoft/VFSForGit@b304cf7 from which this work was derived:
Running
Scripts/Linux/RunUnitTests.sh
on my system with .NET Core 3.1.302 reports:(With the still draft-only work in #422, all functional tests which aren't marked
WindowsOnly
or otherwise excluded on macOS also pass on Linux when using these initial platform classes. However, that points to some possible gaps in the test coverage, as case-insensitive path comparisons appear to not be causing test failures.)