This message was deleted.
# rancher-desktop
a
This message was deleted.
q
I'm very happy w/ the items, because they coalesced hundreds of files into a handful of lines! w/ a bunch of different kinds of patterns.
(see
binary-file
,
large-file
,
minified-file
, and
noisy-file
in
Errors
)
f
Ah yes, that somehow totally slipped my radar; I did want to enable this on our repo
Did you create an issue for that (a long time ago)? I know you showed me some sample run against rancher-desktop, or was that on your own fork?
q
i can refresh it and see what it has to say πŸ™‚ -- it's getting smarter year-over-year πŸ™‚
f
Thanks!
q
f
We are all busy doing final testing for the 1.9.1 patch release right now
q
f
Thanks! Can you add DCO?
q
Oh, oops, y eah
Done
k
Thanks, but I was thinking of a cirrus-CI-like service that we use for our integration tests, so we wouldn't need to do all that setup ourselves. Maybe a YAML file with custom white- and black-lists of words and patterns. Maybe I'll build such a thing next hack week if it doesn't exist. Because we, Microsoft, and Power DNS wouldn't be the only entities around who could use such a service.
f
I'm confused; what is the problem that requires a separate service?
k
I might be wrong -- I haven't had a chance to look at how we include the spellcheck here. I just saw that the PR contains the exclusion/inclusion items, but also a 154-line YAML file to enable spelling and I wondered why so much is needed. But I haven't looked at the details yet
When you run a spellcheck in a word-processing doc you don't supply 150 lines to configure it. You just run it
q
you don't usually run a spell check on all the files on your disk, just the word processing document πŸ™‚
and a bunch of things are hidden from you, e.g. the fact that your word processor let you tell it you wanted to speak en-US and not en-CA or en-GB or fr-FR.
k
Sure. And Josh, you can relate: I incorporated the first moz spellcheck module into the Komodo IDE, to do spellchecking on contents of strings and comments only. Because of the Komodo editor, I already knew which parts of a program were strings and comments, without having to specify the actual language.
I'm finding adding this service to be very valuable. It's annoying finding and fixing typos in strings and comments, but that typo you found in a field name definitely wasn't the first.
If only the guy who added the
REFERER
field to HTTP had to go through a spellcheck before publishing it
q
That's what started me on this!!
I've considered trying to look into parsers that are aware of various document types, but i've mostly decided it wasn't worth doing yet. An evolving toolkit of suggested patterns seems to do a good enough job. Depending on the domain, the pattern can be different, so I don't want to hard-code an answer (and I haven't found a good enough way to predict which of a set of patterns is correct for a given repository): https://github.com/check-spelling/spell-check-this/blob/6de601bd374a453f80c9057f756cf62647833bda/.github/actions/spelling/candidate.patterns#L5[…]82 I have one hard coded rule in 0.0.21 which i deeply regret and intend to remove in 0.0.22 - handling of printf `\n`/`\r`/`\t`... It was sadly right only about half the time.
f
@quick-keyboard-83126 Is there a way to run the spellcheck locally before pushing to Github? E.g. as part of
npm run lint
q
act
Probably
act -j spelling
f
Ok, thanks!
Does it work on macOS?
Copy code
$ act -j spelling
ERRO[0000] failed to obtain container engine info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
q
I use it on docker
On macOS
f
Copy code
$ ls -l /var/run/docker.sock
lrwxr-xr-x  1 root  daemon  34 28 Jun 18:35 /var/run/docker.sock -> /Users/jan/.docker/run/docker.sock
docker info
runs fine...
q
And docker run busybox?
Copy code
jsoref@jsoref-mbp rancher-desktop % git branch
  bump-things
  electron-aarch64
  issue-1416
  issue-1416-local
  issue-1532
  main
* spell-check
jsoref@jsoref-mbp rancher-desktop % act -l
WARN  ⚠ You are using Apple M-series chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠
Stage  Job ID                    Job name                  Workflow name                         Workflow file            Events
0      bats                      bats                      BATS on macOS on latest CI build      bats.yaml                workflow_dispatch
0      check-for-token           check-for-token           Check for new releases of docker/cli  docker-cli-monitor.yaml  schedule,workflow_dispatch
0      linux-release             linux-release             Upload Linux release                  linux-release.yaml       workflow_dispatch,release
0      e2e-tests                 e2e-tests                 e2e tests on Mac M1                   macM1-e2e.yaml           schedule,workflow_dispatch
0      package                   package                   Package                               package.yaml             pull_request,push,workflow_dispatch
0      check-for-token           check-for-token           Update external dependencies          rddepman.yaml            schedule,workflow_dispatch
0      build                     build                     RDX Host APIs Testing image           rdx-host-api-tests.yaml  push,workflow_dispatch
0      update                    Update PR                 Check Spelling                        spelling.yml             push,pull_request_target,issue_comment
0      spelling                  Check Spelling            Check Spelling                        spelling.yml             push,pull_request_target,issue_comment
0      test                      test                      Test                                  test.yaml                push,pull_request
0      check-for-token           check-for-token           Check for unreleased changes          ucmonitor.yaml           workflow_dispatch,schedule
0      build                     build                     Generate Upgrade Test Data            upgrade-generate.yaml    workflow_dispatch
0      e2e-tests                 e2e-tests                 e2e tests on Windows                  windows-e2e.yaml         schedule,workflow_dispatch
1      check-docker-cli          check-docker-cli          Check for new releases of docker/cli  docker-cli-monitor.yaml  workflow_dispatch,schedule
1      sign                      Test Signing              Package                               package.yaml             pull_request,push,workflow_dispatch
1      check-update-versions     check-update-versions     Update external dependencies          rddepman.yaml            schedule,workflow_dispatch
1      check-unreleased-changes  check-unreleased-changes  Check for unreleased changes          ucmonitor.yaml           schedule,workflow_dispatch
1      release                   release                   Generate Upgrade Test Data            upgrade-generate.yaml    workflow_dispatch

Detected multiple jobs with the same job name, use `-W` to specify the path to the specific workflow.
jsoref@jsoref-mbp rancher-desktop %
Copy code
jsoref@jsoref-mbp rancher-desktop % act -j spelling
WARN  ⚠ You are using Apple M-series chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠
[Check Spelling/Check Spelling] πŸš€  Start image=catthehacker/ubuntu:act-latest
[Check Spelling/Check Spelling]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
...
f
Copy code
$ docker run busybox uname -a
Linux 189c37e1b973 6.1.32-0-virt #1-Alpine SMP PREEMPT_DYNAMIC Mon, 05 Jun 2023 09:39:09 +0000 x86_64 GNU/Linux

$ act -j spelling
ERRO[0000] failed to obtain container engine info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[Check Spelling/Check Spelling] πŸš€  Start image=catthehacker/ubuntu:act-latest
[Check Spelling/Check Spelling]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Check Spelling/Check Spelling] using DockerAuthConfig authentication for docker pull
Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
q
are you using ~/ for your docker sock?
do you have a stale sock in /var/run?
f
Copy code
$ ls -l /var/run/docker.sock
lrwxr-xr-x  1 root  daemon  34 28 Jun 18:35 /var/run/docker.sock -> /Users/jan/.docker/run/docker.sock
q
Copy code
jsoref@jsoref-mbp rancher-desktop % ls -l /var/run/docker.sock
lrwxr-xr-x  1 root  daemon  29 Jun 23 20:16 /var/run/docker.sock -> /Users/jsoref/.rd/docker.sock
jsoref@jsoref-mbp rancher-desktop % ls -l /Users/jsoref/.rd/docker.sock
srw-------  1 jsoref  staff  0 Jun 26 13:19 /Users/jsoref/.rd/docker.sock
f
Ah yes, that is a stale symlink; it should point to
.rd
and not to
.docker
q
yay!
maybe add a diagnostics? πŸ˜‰
sorry to give you work. anyway, gotta πŸš΄β€β™‚οΈ
f
πŸ‘‹
b
Is there a recommended way to map unix:///var/run/docker.sock on a mac to the userspace unix:///Users/nameduser/.rd/docker.sock location that is transparent to ... poorly written or applications that might otherwise be unaware that the socket could be somewhere other than unix:///var/run/docker.sock Seems like creating a symlink in /var/run to my user space is not a great idea but I'm not seeing anything else more optimal either.
q
That's the way. And I think/thought there's a UI code path that does it
There are environment variables and other things, but odds are dumb programs don't understand them. Ours didn't.
b
I'm going to poke around the app code an see if its using a library that might know about these variables. So far it looks like its understanding of docker is hardcoded. 😞 Thanks for confirming I didn't at least miss a better option.
f
When you run Rancher Desktop with administrative access (https://docs.rancherdesktop.io/ui/preferences/application/general#administrative-access) then it will create the socket in the default location (
/var/run/docker.sock
). It is only writeable by
root
, so it can't do this without
sudo
.
It will ask you for your password every time you start Rancher Desktop after a reboot because macOS deletes all contents of
/var/run
during boot, so the socket will need to be re-created.
BTW, why did you ask the question in a very old thread instead of creating a new message in the channel?
πŸ‘ 1