superset icon indicating copy to clipboard operation
superset copied to clipboard

feat: add a script to check environment software versions

Open mistercrunch opened this issue 1 year ago • 3 comments

quick utility to check environment requirements. Written with GPT's help, versions pretty open-ended for now but could become more specific as we go.

$ ./scripts/check-env.py
Status Software                  Version Found             Ideal Range               Supported Range
==============================================================================================================
✅ python                    3.10.13                   3.10.0 - 3.10.999         3.9.0 - 3.11.999
✅ npm                       10.5.2                    10.0.0 - 999.999.999      10.0.0 - 999.999.999
✅ node                      v18.20.0                  18.0.0 - 18.999.999       18.0.0 - 18.999.999
✅ docker                    26.1.4                    20.10.0 - 999.999.999     19.0.0 - 999.999.999
✅ docker-compose            2.28.1                    2.28.0 - 999.999.999      1.29.0 - 999.999.999
✅ git                       2.44.0                    2.30.0 - 999.999.999      2.20.0 - 999.999.999
✅ Memory: 16.00 GB

Seems it'd be useful for maintainers to point to the script and tell people to make some assertion on their environment. There's a whole class of confusing errors that can be weeded with something like this.

mistercrunch avatar Jul 16 '24 23:07 mistercrunch

Maybe this is the right time to add a check for sufficient system and Docker memory allocation?

rusackas avatar Jul 17 '24 17:07 rusackas

Yes that sounds reasonable though might require a bit more thinking as to how we structure/section things. Seems we need both a:

  • "host requirements for docker-compose environment" where we check whether the version of docker, docker-compose and resource allocation look dandy
  • "requirements for a local dev env" where we just look at the current env and whether its fine

I guess ultimately its more or less the same script and its about whether we run in on the host or in-docker

mistercrunch avatar Jul 17 '24 18:07 mistercrunch

@rusackas I bumped node to 20

Screenshot 2024-08-22 at 4 48 03 PM

but generally should help support PRs like this one, it's really just a single/simple utility script that should prove useful

mistercrunch avatar Aug 22 '24 23:08 mistercrunch

Can this be triggered in docker-bootstrap.sh or docker-init.sh or something like that?

rusackas avatar Aug 27 '24 23:08 rusackas

@rusackas I bumped node to 20

Awesome... the repo has already been bumped everywhere else I can find... I'll reference this change in that PR for the next go-round. [Captain Obvious here — you approved that PR 🤦 ]

rusackas avatar Aug 28 '24 00:08 rusackas

I think it belongs in docker/docker-init.sh, but we need to add it to the depends_on so all other processes depend on it. Also need to either COPY scripts inside docker or mount it. I started a branch but ran into all sort of other docker/npm/node/disk-space, more roadblocks-than-a-road-can-fit issues

mistercrunch avatar Sep 04 '24 03:09 mistercrunch

Right for os-level deps, seems the right approach would be to do in-python, with dummy/minimal function that would raise if os-level-dep is missing.

def test_ zstd():
    import  zstd
    zstd.do_something_that_will_raise_os_dep_isnt_installed()

mistercrunch avatar Nov 08 '24 21:11 mistercrunch