babashka-sci-dev

lispyclouds 2022-05-07T16:40:59.340779Z

@borkdude do you remember why are we doing https://github.com/babashka/pod-babashka-fswatcher/issues/12#issuecomment-1119306799 ? call WriteInvokeResponse and not WriteErrorResponse? Its been a while for me and I'm failing to recollect 😛 Also since its not reproducible, should i look into it?

borkdude 2022-05-07T16:43:25.828439Z

@rahul080327 The way I would fix this is based on tests. Write a test that reproduces the error, fix it, while ensuring the other tests also works. The exact details: dunno :)

lispyclouds 2022-05-07T16:44:08.576689Z

yeah the person who reported this cant seem to come up with it anymore after a machine restart it seems

lispyclouds 2022-05-07T16:44:20.459889Z

I'll ask for a repro then think about it

borkdude 2022-05-07T16:44:53.993029Z

yes, let's not fix anything without a repro

lispyclouds 2022-05-07T18:53:15.525779Z

Are Actions on sci upto date?

borkdude 2022-05-07T18:53:27.358489Z

Probably not

lispyclouds 2022-05-07T18:53:36.212149Z

okay looking into it now

lispyclouds 2022-05-07T19:01:43.798449Z

whats the node version needed for node tests?

borkdude 2022-05-07T19:02:18.755629Z

I would say 14 LTS or so

👍🏼 1
borkdude 2022-05-07T19:09:44.446559Z

@rahul080327 It seems to be the macOS build that wasn't running. I'm not sure if it's just that

lispyclouds 2022-05-07T19:10:10.535729Z

yeah adding in the matrix to the native one now

borkdude 2022-05-07T19:11:15.378009Z

The thing that we need CircleCI specifically is: • more memory (8gb. only important for babashka) • aarch64 builds (important for babashka, pods and clj-kondo) macOS builds we can do on Github Actions too (although it would be way slower) Windows we've always done on Appveyor (which in hindsight is good to spread the risk)

lispyclouds 2022-05-07T19:11:45.563509Z

yeah afaik action runners are 8G too, not sure about aarch64

borkdude 2022-05-07T19:11:59.073589Z

actions runners are 6.5gb last time I looked

borkdude 2022-05-07T19:12:03.475469Z

aarch64 isn't supported

borkdude 2022-05-07T19:12:41.379639Z

ah 7gb I see now

lispyclouds 2022-05-07T19:12:44.959199Z

this is the current one

Hardware specification for Windows and Linux virtual machines:

    2-core CPU
    7 GB of RAM memory
    14 GB of SSD disk space

Hardware specification for macOS virtual machines:

    3-core CPU
    14 GB of RAM memory
    14 GB of SSD disk space

borkdude 2022-05-07T19:12:46.090559Z

should be enough for bb I think

lispyclouds 2022-05-07T19:13:11.176079Z

is aarch64 blocked on circle too?

borkdude 2022-05-07T19:13:36.022409Z

no, at least not yet... I'm not sure if macos was just blocked because of macos or because it was the last job to run

lispyclouds 2022-05-07T19:14:33.501199Z

yeah I'll just catch the actions yamls up, be prepped

borkdude 2022-05-07T19:14:34.328379Z

clojure-lsp produces aarch64 via qemu, which is hell slow, the job takes more than an hour, which isn't something I would want

borkdude 2022-05-07T19:15:08.778899Z

could also build manually on m1 macos inside docker, but also something I want to avoid

borkdude 2022-05-07T19:15:50.550449Z

could also run self-hosted Github actions builds inside my PC maybe, but then I'd have my PC on all day ;)

lispyclouds 2022-05-07T19:16:09.757929Z

yeah the qemu path could be really slow

borkdude 2022-05-07T19:16:14.937769Z

or we could run it on AWS ourselves maybe

borkdude 2022-05-07T19:16:34.309889Z

anyway, I still hope circleci will fix this :)

lispyclouds 2022-05-07T19:17:18.573439Z

yeah this is just my paranoid-infra-goes-to-shit mind kicking in

borkdude 2022-05-07T19:17:33.116799Z

it's good to have redundancy :)

lispyclouds 2022-05-07T19:18:15.506789Z

test-self-hosted in actions = plank in circle?

borkdude 2022-05-07T19:18:25.873599Z

yes

borkdude 2022-05-07T19:18:42.145139Z

is there an actions thing for self-hosted?

borkdude 2022-05-07T19:18:50.001259Z

already I mean

lispyclouds 2022-05-07T19:19:00.569059Z

yeah im seeing a test-self-hosted job there

borkdude 2022-05-07T19:19:04.092029Z

I don't remember ever updating an actions yaml for SCI

lispyclouds 2022-05-07T19:19:27.600169Z

its seen more updates than bb at least, going by commits 😛

borkdude 2022-05-07T19:19:50.133099Z

o wait, I did

borkdude 2022-05-07T19:20:04.793449Z

I did this while CircleCI had an outage, while I was waiting at the doctors :)

borkdude 2022-05-07T19:20:13.191229Z

lol

lispyclouds 2022-05-07T19:20:14.706109Z

heh, nice

borkdude 2022-05-07T19:20:45.006999Z

Oh, bb tasks are really paying off here, since it's the same thing no matter where you run it

borkdude 2022-05-07T19:21:21.086169Z

so I guess for SCI it's already fixed then right?

lispyclouds 2022-05-07T19:21:23.769099Z

yeah its pretty nice

lispyclouds 2022-05-07T19:22:08.984389Z

yeah im just adding the jdk 11, clj cli, node tooling etc

lispyclouds 2022-05-07T19:22:27.415449Z

and the native matrix

borkdude 2022-05-07T19:22:49.797729Z

why add stuff if it already works?

borkdude 2022-05-07T19:22:54.243169Z

we don't need the clj cli

lispyclouds 2022-05-07T19:23:24.767249Z

so im planning to use the:

- name: Install clojure tools
        uses: DeLaGuardo/setup-clojure@5.0
        with:
          cli: 1.10.1.763
          lein: 2.9.3
          bb: 0.8.2

lispyclouds 2022-05-07T19:23:33.979059Z

reduce some extra installs

lispyclouds 2022-05-07T19:24:06.542619Z

and:

- name: Prepare java
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt-hotspot'
          java-version: '11'

lispyclouds 2022-05-07T19:24:46.291539Z

can leave it out if you want, just do the native matrix on mac and ubuntu?

lispyclouds 2022-05-07T19:25:43.706469Z

was installing the clojure cli as circle had it too

borkdude 2022-05-07T19:25:48.191729Z

yeah, it's fine, just proceed with what you were doing

lispyclouds 2022-05-07T19:26:16.796969Z

would be more than happy to drop stuff 😄

borkdude 2022-05-07T19:26:19.294349Z

we also have a yaml for babashka, but that one is probably grossly out of date

lispyclouds 2022-05-07T19:26:31.544469Z

yeah will get there

borkdude 2022-05-07T19:26:37.971949Z

thanks :)

lispyclouds 2022-05-07T19:26:50.462689Z

so clojure cli not needed?

borkdude 2022-05-07T19:27:34.893879Z

I thought it wasn't needed because bb tasks + (clojure ...) but I see it's still calling script/test/jvm which calls the clojure CLI. Let's changre as little as possible to all of this and just focus on getting it to work

borkdude 2022-05-07T19:27:57.764349Z

and since it already works, maybe focus on bb first

lispyclouds 2022-05-07T19:28:16.197279Z

almost done here, raise the PR and will go there

borkdude 2022-05-07T19:28:23.666259Z

🚀

lispyclouds 2022-05-07T19:29:36.977019Z

ah the the deploy step wont work

borkdude 2022-05-07T19:30:00.496519Z

we don't need that yet

borkdude 2022-05-07T19:30:17.405489Z

I'd rather not have 2 CIs deploying

lispyclouds 2022-05-07T19:30:39.361389Z

yeah, will leave a TODO

lispyclouds 2022-05-07T19:44:13.252609Z

actions bits look good on https://github.com/babashka/sci/pull/722

borkdude 2022-05-07T19:51:39.075969Z

Merged!

borkdude 2022-05-07T19:53:56.409869Z

Talking to https://twitter.com/IAmJerdog in DM now, he's looking into it!

lispyclouds 2022-05-07T19:54:29.706229Z

🤞🏼

borkdude 2022-05-07T19:55:57.513109Z

Btw, the "quit job if only .md file has changed" has been on my list for ages now too

borkdude 2022-05-07T19:56:04.060909Z

that would save credits too

borkdude 2022-05-07T19:56:18.057149Z

as demanding people to write "skip ci" isn't working

borkdude 2022-05-07T19:56:30.904549Z

or I could disable PR builds but that's not optimal either

lispyclouds 2022-05-07T20:00:36.294049Z

ive used something like https://github.com/tj-actions/changed-files for actions

lispyclouds 2022-05-07T20:00:43.768409Z

big monorepos at work

lispyclouds 2022-05-07T20:01:02.101399Z

this with the if: ... directive

lispyclouds 2022-05-07T20:01:29.935119Z

can have a bb script for that? 😄

borkdude 2022-05-07T20:01:50.054799Z

of course :)

lispyclouds 2022-05-07T20:02:13.368659Z

yeah more bootstrapping test for the bb repo

borkdude 2022-05-07T20:08:08.531489Z

Maybe we could just run that code using clojure itself when bb hasn't bootstrapped yet

lispyclouds 2022-05-07T20:11:14.867069Z

yeah i think all these and maybe the compile could be in tools.build somehow?

borkdude 2022-05-07T20:11:34.523839Z

Eventually, but we don't need to make that change now

lispyclouds 2022-05-07T20:12:03.197909Z

yep

lispyclouds 2022-05-07T20:12:13.438999Z

22.1.0 is the correct graal version for bb right?

borkdude 2022-05-07T20:12:28.191479Z

correct, newest

👍🏼 1
borkdude 2022-05-07T20:14:54.773749Z

ah right, appveyor had 6gb. bb barely builds there, it spends a lot of time in GC ;). the only difference with github is that github has 1gb extra. On Circle we have 8gb + 4 CPU instead of 2 on Github

lispyclouds 2022-05-07T20:16:28.211019Z

yeah its not the best but more as a backup

lispyclouds 2022-05-07T20:16:55.654189Z

maybe we can get some credits on Exoscale and I can have a build cluster running there 😛

lispyclouds 2022-05-07T20:17:03.031049Z

BobCD maybe

lispyclouds 2022-05-07T20:17:08.780829Z

clojure all the way

borkdude 2022-05-07T20:17:33.008699Z

I do have credits for exoscale btw

lispyclouds 2022-05-07T20:18:22.081619Z

we can have a think if that can be used

borkdude 2022-05-07T20:18:54.940089Z

I think I'll have to re-request credits every time though

borkdude 2022-05-07T20:19:32.962989Z

I might be porting my personal VPS to them, but it's only 100 EUR a year or so at my current provider, so I wasn't really in a hurry to do so

borkdude 2022-05-07T20:20:27.296649Z

I could also just start paying for CircleCI, I think it's somewhere between 300-400 dollars a month

borkdude 2022-05-07T20:20:50.537309Z

as long as I got enough sponsors ... and if not, I should charge money for the binaries or so

lispyclouds 2022-05-07T20:22:01.630129Z

yeah theres ways around it, maybe similar to clojars, we can get some hosted infra for things

borkdude 2022-05-07T20:22:36.454219Z

right, could move all the lower resource stuff to github actions and only run the critical things on circle

borkdude 2022-05-07T20:22:55.607549Z

e.g. SCI is low resource

borkdude 2022-05-07T20:23:05.719319Z

nbb too

borkdude 2022-05-07T20:23:18.580529Z

clj-kondo probably too and we don't ship aarch64 binaries for that

lispyclouds 2022-05-07T20:23:21.803659Z

yeah once actions is at parity, i can think of dividing up the the things

borkdude 2022-05-07T20:23:28.247799Z

so it's really only bb + pods

lispyclouds 2022-05-07T20:23:47.716849Z

or graal finally lands cross compiling 😛

borkdude 2022-05-07T20:23:52.703079Z

won't happen

lispyclouds 2022-05-07T20:24:25.396709Z

yeah, also building in M1 docker isnt too bad, could be used as a fallback

borkdude 2022-05-07T20:24:32.716379Z

right

lispyclouds 2022-05-07T20:25:33.752479Z

but yeah same story on actions, no M1

borkdude 2022-05-07T20:25:49.256219Z

we don't have m1 builds now anyway

borkdude 2022-05-07T20:29:08.938429Z

oh I get what you said now, yes, we could use m1 for linux aarch64 in docker

lispyclouds 2022-05-07T20:29:22.154799Z

yeah

borkdude 2022-05-07T20:29:57.822929Z

maybe the aws pod could be deprecated in favor of awyeah

borkdude 2022-05-07T20:30:21.983259Z

eventually

lispyclouds 2022-05-07T20:34:11.134329Z

is .circleci/script/release safe to run on actions too?

borkdude 2022-05-07T20:34:40.031139Z

I think so yes. I put it there so users didn't execute it

lispyclouds 2022-05-07T20:35:04.796369Z

cool

lispyclouds 2022-05-07T20:51:27.448259Z

turning actions back on

lispyclouds 2022-05-07T20:55:11.813239Z

tried pulling some tricks with the matrix since the code was so out of date, lets see if it all works. should be a big reduction in yaml if it does

lispyclouds 2022-05-07T20:58:20.322749Z

actions doesnt seem to be triggered

lispyclouds 2022-05-07T20:58:41.623009Z

ah push only on master

lispyclouds 2022-05-07T21:00:29.968899Z

its been a while 😄

borkdude 2022-05-07T21:02:04.330419Z

will look tomorrow

lispyclouds 2022-05-07T21:02:21.583249Z

yeah probably some more fixing needed

borkdude 2022-05-07T21:03:05.480759Z

yes, last time I enabled github actions on babashka was actually during ClojureD 2020

borkdude 2022-05-07T21:03:23.074079Z

it was relatively new back then so I wanted to try it out

borkdude 2022-05-07T21:05:12.614679Z

@rahul080327 the buildx stuff, would that also work on github actions?

lispyclouds 2022-05-07T21:05:25.082799Z

yeah theres a setup for that too 😄

lispyclouds 2022-05-07T21:05:50.485029Z

the actions yaml is like half the circle one, although no aarch64

borkdude 2022-05-07T21:05:55.344559Z

maybe you can temporarily disable circleci in your actions PR

borkdude 2022-05-07T21:06:05.122259Z

as it's wasting credits

borkdude 2022-05-07T21:06:51.135369Z

also I think it's better if github actions didn't wait for the JVM step to finish

lispyclouds 2022-05-07T21:07:10.355589Z

best place would be the workflows at the end to disable circle right?

borkdude 2022-05-07T21:07:16.836719Z

yeah, just comment out the jobs

lispyclouds 2022-05-07T21:07:27.559729Z

right, cancelling the job now too

lispyclouds 2022-05-07T21:08:18.763809Z

yeah didnt change any of the workflows in actions, will have a better think

borkdude 2022-05-07T21:09:13.044279Z

yeah, I remember now, the initial version was contributed by someone who already knew github actions and I think he wanted to save the uberjar for other jobs or so. similar discussion that we had for circleci recently

borkdude 2022-05-07T21:10:17.080609Z

I think on CircleCI only the macos jobs are affected now though

borkdude 2022-05-07T21:10:21.764209Z

but this is a good exercise :)

lispyclouds 2022-05-07T21:11:07.109509Z

yep

borkdude 2022-05-07T21:17:47.689129Z

I found a conversation with Marc in which he enabled macOS builds for 2 years on 2020 May 7th... so this explains it

lispyclouds 2022-05-07T21:24:01.488099Z

right

borkdude 2022-05-07T21:27:27.712449Z

actually the macos build are the best candidates to move to github actions since github actions has 14gb of memory there

borkdude 2022-05-07T21:27:47.690549Z

so if only those were affected, we would still be good

lispyclouds 2022-05-07T21:38:40.282539Z

yeah sounds like a good plan, im thinking lets get it to parity and disable parts of it

lispyclouds 2022-05-07T21:49:27.869529Z

not too bad on linux

52.3s (17.5% of total time) in 108 GCs | Peak RSS: 5.84GB | CPU load: 1.92
Finished generating 'bb' in 4m 57s.

borkdude 2022-05-07T21:50:25.182419Z

about 2x as slow as circle

borkdude 2022-05-07T21:50:32.349769Z

but doable

borkdude 2022-05-07T21:52:51.478539Z

The xmx is very close to the max here: BABASHKA_XMX: -J-Xmx6500m Could be close to an OOM error if it was bumped even higher

borkdude 2022-05-07T21:53:30.205909Z

on appveyor it's 5g (of 6g in total)

borkdude 2022-05-07T21:53:48.179299Z

but as long as it works

lispyclouds 2022-05-07T21:57:01.267189Z

yeah lets see if it OOMs

borkdude 2022-05-07T22:05:04.422199Z

This looks like double work in the static linux one right?

lispyclouds 2022-05-07T22:07:25.963719Z

yeah i messed up the condition, will push after this

lispyclouds 2022-05-07T22:07:39.067619Z

shouldve been the not of the other but i was oversmart

borkdude 2022-05-07T22:10:28.376679Z

@rahul080327 we could use the official graalvm github action which has musl support

lispyclouds 2022-05-07T22:10:33.972159Z

no idea what

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/./libstdc++.a(cp-demangle.o): in function `d_print_comp_inner':
(.text+0x5a04): undefined reference to `__sprintf_chk'
/usr/bin/ld: (.text+0x6219): undefined reference to `__sprintf_chk'
/usr/bin/ld: (.text+0x6764): undefined reference to `__sprintf_chk'
/usr/bin/ld: (.text+0x6bea): undefined reference to `__sprintf_chk'
/usr/bin/ld: (.text+0x6de2): undefined reference to `__sprintf_chk'
is

lispyclouds 2022-05-07T22:10:54.045479Z

ah yes

lispyclouds 2022-05-07T22:14:20.076269Z

pushed

lispyclouds 2022-05-07T22:34:39.897679Z

interesting error: https://github.com/babashka/babashka/runs/6337178092?check_suite_focus=true will continue tomorrow