go-orb / workspace

Our development workspace for go-orb, plugins and examples.
Other
1 stars 1 forks source link

Best way to try if not in linux ? #1

Closed gedw99 closed 2 months ago

gedw99 commented 2 months ago

Hey @jochumdev

go-orb sure has some amazing features.

thanks for this and the example.

I am a Mac user and hit the following when trying to give this a try.

I need my GITHUB_TOKEN I guess or use ssh style of git clone...

junk % git clone --recurse-submodules -j8 https://github.com/go-orb/workspace
Cloning into 'workspace'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 25 (delta 5), reused 24 (delta 4), pack-reused 0 (from 0)
Receiving objects: 100% (25/25), 125.21 KiB | 2.91 MiB/s, done.
Resolving deltas: 100% (5/5), done.
Submodule 'examples' (git@github.com:go-orb/examples.git) registered for path 'examples'
Submodule 'go-orb' (git@github.com:go-orb/go-orb.git) registered for path 'go-orb'
Submodule 'plugins' (git@github.com:go-orb/plugins.git) registered for path 'plugins'
Cloning into '/Users/apple/workspace/go/src/junk/workspace/examples'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:go-orb/examples.git' into submodule path '/Users/apple/workspace/go/src/junk/workspace/examples' failed
Failed to clone 'examples'. Retry scheduled
Cloning into '/Users/apple/workspace/go/src/junk/workspace/go-orb'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:go-orb/go-orb.git' into submodule path '/Users/apple/workspace/go/src/junk/workspace/go-orb' failed
Failed to clone 'go-orb'. Retry scheduled
Cloning into '/Users/apple/workspace/go/src/junk/workspace/go-orb'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:go-orb/go-orb.git' into submodule path '/Users/apple/workspace/go/src/junk/workspace/go-orb' failed
Failed to clone 'go-orb' a second time, aborting
Cloning into '/Users/apple/workspace/go/src/junk/workspace/plugins'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:go-orb/plugins.git' into submodule path '/Users/apple/workspace/go/src/junk/workspace/plugins' failed
Failed to clone 'plugins'. Retry scheduled
Cloning into '/Users/apple/workspace/go/src/junk/workspace/plugins'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:go-orb/plugins.git' into submodule path '/Users/apple/workspace/go/src/junk/workspace/plugins' failed
Failed to clone 'plugins' a second time, aborting
Cloning into '/Users/apple/workspace/go/src/junk/workspace/examples'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:go-orb/examples.git' into submodule path '/Users/apple/workspace/go/src/junk/workspace/examples' failed
Failed to clone 'examples' a second time, aborting

Task looks like its using a linux only tool also.

workspace % task check
"nproc": executable file not found in $PATH
task: Command "nproc" failed: exit status 127
gedw99 commented 2 months ago

direct and forked does work though.

Might want to add this to the README.md, that ssh git clone is needed, so there can play along and help..

not a fork:


git clone --recurse-submodules -j8 git@github.com-gedw99:go-orb/workspace.git

a fork:


git clone --recurse-submodules -j8 git@github.com-gedw99:gedw99/workspace.git
gedw99 commented 2 months ago

alias nproc for Mac:

sysctl -n hw.physicalcpu
12

I think task can switch based on OS ?

When I swap sh: nprocfor sh: sysctl -n hw.physicalcpu, things work:

version: '3'

env:
  PROCS:
    sh: sysctl -n hw.physicalcpu
  GOMAXPROCS: 1
#  GOSUMDB: off
#  GOPROXY: direct
jochumdev commented 2 months ago

Thanks for testing!

Do you have homebrew? Could you try to install coreutils?

brew install coreutils
gedw99 commented 2 months ago

Hey @jochumdev

No worries.

I installed coreutils, but nproc is still not found.

Maybe these work for you instead. They run many processes and shut down them too.

https://github.com/F1bonacc1/process-compose

https://github.com/cirello-io/runner

Both are cross platform. Windows also I believe.

process-compose is used a lot and very stable

runner is even better and allows me to run clusters, like nats clusters from a single config. Its has Erlang like Supervision trees. Fancy :). Its all golang ...

jochumdev commented 2 months ago

I moved the "nproc" env into the cmd of runall, this should fix the issue for now.

A nice thing would be to replace all Taskfile.yaml and ./plugins/scripts/test.sh usage with https://dagger.io/

Not sure when I get the time to do so.