IntersectMBO / cardano-addresses

Addresses and mnemonic manipulation & derivations
Apache License 2.0
145 stars 46 forks source link

Use with utf8 and take care of hpack problems #234

Closed paweljakubas closed 11 months ago

jonathanknowles commented 1 year ago

LGTM!

paweljakubas commented 1 year ago

hi @dermetfan @angerman I have TypeScript NMP Package fail on CI. And it says

 error: writing to file: No space left on device

Any idea by chance how to fix that? I see it runs

  nix-shell --run "npm run typedoc"
  shell: /usr/bin/bash -e {0}
  env:
    NODE_OPTIONS: --max-old-space-size=5120

Do you know how to change this parameter?

angerman commented 1 year ago

@paweljakubas i'll have a look tomorrow.

tgunnoe commented 1 year ago

Do you know how to change this parameter?

https://github.com/IntersectMBO/cardano-addresses/blob/master/.github/workflows/typescript.yml#L16

Try doubling it to see if that works.

tgunnoe commented 1 year ago

ok, maybe the size of /tmp on the machine is running out of space. it would be good to evaluate if so and why that's happening.

paweljakubas commented 1 year ago

@tgunnoe do you know HOW and WHERE to check /tmp? Changing limit 3x seems not to work ... I will try to remove env in workflow

tgunnoe commented 1 year ago

in the step https://github.com/IntersectMBO/cardano-addresses/pull/234/files#diff-49782368fc4afbd0b5be05e65cc0a4677d70c2078d3206dbe6b347b19d41630cR33 I would change it before the typedoc task is ran:

-      run: 'nix-shell --run "npm run typedoc"'
+      run: |
+        df -h /tmp
+        nix-shell --run "npm run typedoc"
paweljakubas commented 1 year ago

So we have this situation:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        84G   83G  555M 100% /

wow

paweljakubas commented 1 year ago

current directory inspection:

1M  ./bin
1M  ./demo
1M  ./exe
1M  ./glue
1M  ./lib
1M  ./src
1M  ./test
101M    ./dist
341M    ./node_modules
442M    .
442M    total

All disc space:

1M  /data
1M  /dev
1M  /lost+found
1M  /media
1M  /root
1M  /srv
1M  /tmp
61M /boot
174M    /run
704M    /etc
705M    /snap
840M    /var
2757M   /imagegeneration
3679M   /home
4097M   /mnt
14282M  /opt
16645M  /nix
38610M  /usr
82550M  /
82550M  total

Decomposition of three biggest contributors:

1M  /opt/containerd
1M  /opt/mssql-tools
1M  /opt/pipx_bin
1M  /opt/post-generation
1M  /opt/vsts
116M    /opt/runner
325M    /opt/google
547M    /opt/pipx
679M    /opt/az
695M    /opt/microsoft
11921M  /opt/hostedtoolcache
14282M  /opt
14282M  total

14M /nix/var
16633M  /nix/store
16646M  /nix
16646M  total

1M  /usr/games
1M  /usr/lib64
1M  /usr/libx32
15M /usr/lib32
91M /usr/sbin
135M    /usr/libexec
149M    /usr/src
167M    /usr/include
784M    /usr/bin
5967M   /usr/share
6233M   /usr/lib
25073M  /usr/local
38610M  /usr
38610M  total
tgunnoe commented 1 year ago

Ah! I think i know the issue now. its trying to compile haskell.nix's stuff from source, which is waaay over 80gb. I think we need to update the nixpkgs version that haskell.nix follows. let me get back to you.

paweljakubas commented 1 year ago

hi @tgunnoe @angerman any progress here? This seems to be blocking issue to do anything within this repo. We have security alert for example and the same issue -> https://github.com/IntersectMBO/cardano-addresses/pull/235 Thanks!

tgunnoe commented 1 year ago

@paweljakubas Hey, sorry for the delay. I tried it out on my own fork which doesnt use the nix shell provided by jsapi, because I thought it was only needing simple node scripts to be ran. It doesn't. I needs the api output of the stack to run the tests https://github.com/tgunnoe/cardano-addresses/actions/runs/6669489321/job/18127376171#step:6:70 So I've asked @angerman if @hamishmack could help out with why on this PR after removing hpack you're needing to build the whole stack and not get cache hits.

paweljakubas commented 11 months ago

hi @tgunnoe Can you kindly say how to do it? Thanks

paweljakubas commented 11 months ago

thanks @angerman