autochrome-github

martinklepsch 2020-02-17T16:10:52.000900Z

if any of you feel like hacking on this let’s make it happen 😄

borkdude 2020-02-17T16:11:01.001400Z

👋

martinklepsch 2020-02-17T16:11:17.001800Z

@borkdude I was already thinking of you because obviously it would be amazing to make autochrome fast via graal

martinklepsch 2020-02-17T16:14:18.003200Z

one thing I’m not 100% clear on that might be a little annoying is whether you can view build artifacts in the browser easily or if they will always be downloaded

borkdude 2020-02-17T16:14:29.003700Z

@martinklepsch have you tried using it as a vanilla tool before integrating it into something else first?

martinklepsch 2020-02-17T16:14:44.004200Z

@borkdude i’ve used it before yeah

martinklepsch 2020-02-17T16:15:07.004800Z

visually it’s a little odd to me but it is pretty good at the diffing stuff

borkdude 2020-02-17T16:16:27.005700Z

This is an example of invoking clj-kondo on a codebase using Github actions: https://github.com/DeLaGuardo/clojure-lint-action Maybe without much change it can be tweaked into an autochrome plugin?

martinklepsch 2020-02-17T16:16:50.006600Z

the graal stuff isn’t super necessary for a V1 so don’t worry about it too much i guess

borkdude 2020-02-17T16:16:58.006900Z

The graalification can always happen later, I was just going to say that

martinklepsch 2020-02-17T16:17:05.007100Z

yeah

martinklepsch 2020-02-17T16:17:29.007400Z

that image might be useful indeed, thank you!

martinklepsch 2020-02-17T16:17:37.007600Z

*action

martinklepsch 2020-02-17T16:17:55.008Z

i’m above the pacific right now btw ✈️

martinklepsch 2020-02-17T16:18:10.008200Z

internet is slow 😄

borkdude 2020-02-17T16:18:26.008700Z

perfect thing to hack on during travel 😉

martinklepsch 2020-02-17T16:18:30.008800Z

err damn, it’s the atlantic lol

martinklepsch 2020-02-17T16:18:35.009100Z

i’m so dumb haha

martinklepsch 2020-02-17T16:46:54.009900Z

lets see what this airplane wifi thinks about me downloading docker images

robert-stuttaford 2020-02-17T16:55:23.010200Z

👋

martinklepsch 2020-02-17T17:08:56.011300Z

I’m pretty excited and I have a 5 hour flight left so I’ll try to work on this but I doubt that I’ll be able to do the Docker stuff just because of bad wifi. If anyone feels like hacking on this – go for it!

martinklepsch 2020-02-17T17:09:01.011600Z

I think it shouldn’t be too hard

martinklepsch 2020-02-17T17:10:44.013100Z

What we’ll need is basically a Docker thing that we can pass two SHAs and a directory, i.e. the args to autochrome itself: https://github.com/ladderlife/autochrome

borkdude 2020-02-17T17:12:00.013700Z

what happens if you just push the experiment to github - I guess it downloads the stuff over there and you can just watch it fail?

borkdude 2020-02-17T17:12:15.014Z

nextcloud could also be an option for flaky internets experimentation. I just tweeted how well suited that is for just normal CI builds

martinklepsch 2020-02-17T17:13:02.014400Z

yeah maybe that’d work

martinklepsch 2020-02-17T17:13:46.015100Z

I guess a part of be is trying to involve others

martinklepsch 2020-02-17T17:13:56.015600Z

or… ehhh… delegate? 😂

borkdude 2020-02-17T17:20:53.016200Z

@delaguardo is kind of a guru when it comes to Github actions

martinklepsch 2020-02-17T17:22:10.017500Z

yeah, but the part I’m trying to avoid right now doesn’t have much to do with gh actions, it’s more about packaging autochrome as a docker thing so that we get some diff.html that we can store as a workflow artifact

borkdude 2020-02-17T17:23:03.018100Z

why not just use the github actions clojure installer and run it with a jvm? no need to make a separate docker image for it I guess?

borkdude 2020-02-17T17:23:24.018400Z

unless I'm missing something

martinklepsch 2020-02-17T17:24:41.019500Z

could be that simple yeah, just getting it to actually might be a little tricky for me right now. not saying it’s hard in general 😄

martinklepsch 2020-02-17T17:25:43.020200Z

but damn, it seems like GH workflow artifacts are always uploaded as zip files

martinklepsch 2020-02-17T17:25:48.020400Z

that’s annoying

martinklepsch 2020-02-17T17:27:25.021200Z

I guess it means there’d need to be something else that makes the file available via a single click

borkdude 2020-02-17T17:27:34.021500Z

I'm also spitting out diffs to detect clj-kondo regressions: https://github.com/borkdude/clj-kondo/runs/450839500 I'm not saving those as artifacts though. I'm just going to that step to view the output..

borkdude 2020-02-17T17:27:55.021800Z

so what you're researching right now, might come in handy for that too

borkdude 2020-02-17T17:29:12.022200Z

the clojure-lint plugin seems to do all kinds of Github API requests using JS to get this done maybe?

martinklepsch 2020-02-17T17:29:45.022600Z

the artifact stuff is super easy

martinklepsch 2020-02-17T17:29:58.023Z

iff it’s ok to only access it via a zip file

martinklepsch 2020-02-17T17:37:15.023800Z

is it possible to unzip that file in JS and then render that? :thinking_face:

martinklepsch 2020-02-17T17:55:00.024600Z

Probably they won’t serve the HTML as HTML anyways 😞

borkdude 2020-02-17T18:52:43.025Z

maybe it can work as comments? like this thing? https://github.com/David-Byrne/jekyll-diff-action

martinklepsch 2020-02-17T18:54:02.026300Z

I’m now writing a complementary service that hosts your autochrome diff files. For OSS projects that should be fine but not sure how to solve this for private repos but I guess that’s someone else’s problem then

borkdude 2020-02-17T18:55:00.027700Z

http://cljdiff.org? 🙂

😂 1
martinklepsch 2020-02-17T18:55:10.027900Z

Some options I could think of: • security through obscurity (random paths) • encrypt diff at storage, provide key with get req

borkdude 2020-02-17T18:56:13.028700Z

s3 can serve html files right? if it's just an open source project and the diffs are public anyways, I guess these html files could also be public, non-obscured

borkdude 2020-02-17T19:01:26.030400Z

for private projects, maybe someone can configure his/her own server where it will be uploaded. or they can pay you 😉

martinklepsch 2020-02-17T19:02:02.030800Z

yeah, might whip something up with firebase

martinklepsch 2020-02-17T19:02:11.031100Z

should be pretty straightforward

martinklepsch 2020-02-17T19:08:43.031400Z

I partly want this for myself at work btw 😄