-
Notifications
You must be signed in to change notification settings - Fork 20
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
Escape -- with double quotes (powershell compatibility) #88
Conversation
Hi @doublep, it appears that the user ids do not match in the doctor's file-owners test on MS-Windows Do you know what part of the ci run first creates the
I've added some extra logging in the corresonding doc test, and it does show the ids are different, 500 below is
update: it appears the .cache dir has been created by the BUILTIN/Administrators user (rather than
|
In general, is it impossible to make Eldev on Windows process
Yeah, it was an experimental addition that turned out to work just fine on Linux and macOS. I have no idea why it is different on Windows, but of course would be grateful if someone could investigate this.
No, sorry. I'd presume that one of integration or Docker tests. Also, just some hints about debugging failures in GitHub CI (though I guess you already do something similar). When I face such issues and need to investigate them, I create a dummy branch, delete all (or all except one, leaving that for comparison) irrelevant entries from testing matrix and also delete all irrelevant steps and limit tests to one or a few that are needed to reproduce the issue. This makes CI runs much faster and somewhat bearable.
Sorry, zero idea what happens GitHub + Windows. Can you try and reproduce this locally somehow? |
There are two "shell"s available in MS-Windows, one is the legacy GH defaults to the PowerShell on windows, thus we are getting this issue. We can switch the shell to
This issue is not reproducible locally, but it always manifests itself on GH CI. I believe this is because GH CI runs with the It seems to me the issue is that the Emacs Looking at how and in particular in the if (xstrcasecmp ("administrator", uname) == 0)
{
dflt_passwd.pw_uid = 500; /* well-known Administrator uid */
dflt_passwd.pw_gid = 513; /* well-known None gid */
}
else
{ It might be difficult to investigate this on GitHub, because it will require building/debugging Emacs on GH CI. The other option is to setup an administrator account locally, but I'm not fond of this at all because it might mess up with my local PC in ways I can't envisage. |
Thanks for the detailed answer. In this case your patch is fine, just please add a comment why we need the quotes. No-one except maybe you will remember in a year.
Yeah, might be a problem in Emacs then, |
I looked into this a little bit deeper. It appears the built in administrator user id is indeed 500, and it is the owner of the group with id 544, as per the highlighted parts below taken by running Perhaps the directlory/files created by the Some more information just for reference about these two sids taken from https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers
I'll see to disabling this particular doctor test on GH CI for MS-Windows, not sure how much time we'd like to spent on trying to fix this otherwise. Thanks |
Maybe if that's the case, Eldev's doctest is just unnecessarily strict. It is basically targetted at earlier Eldev bugs (though maybe they are still present) where Eldev executed in a Docker container would erroneously create
The easiest would be to just add |
I can hack it around to disable the test on windows only by using - name: Doctor the project
run: |
# on MS-Windows, disable the eldev-file-onwers doctor test on GH CI, see
# discussion in https://github.com/doublep/eldev/pull/88.
./bin/eldev emacs --batch --eval "(when (eq system-type 'windows-nt) (write-region (prin1-to-string '(push 'eldev-file-owners eldev-doctor-disabled-tests)) nil (prin1-to-string 'Eldev) 'append))"
# Run `doctor' on the project itself. Git hooks are not going
# to be installed in this checkout. Also, don't insist on
# recent stable releases here.
./bin/eldev -p -dtTC doctor "--" -githooks -recent-stable-releases
env:
ELDEV_LOCAL: "." I've tested this to work across all system. What do you think? (please note there is a slight bug with the current doctor reporting logic that even though a test has been disabled, the results show 6 tests as being run, as highlighted, instead of 5) |
Uh, this looks ugly and, if I understand correctly, modifies file
It's better to avoid "permanent" (even for one CI run) effects when they are not really needed.
Indeed, I will look into this. |
Indeed a much better option, I wasn't aware of |
Thank you! |
It appears double dashes are special in PowerShell and need quoting, see https://stackoverflow.com/questions/15780174/powershell-command-line-parameters-and.
Patch fixes recent MS-windows CI run of
eldev doctor
break with ab5c7a9