A froghat.ca/2023/02/github-clicks/1d.png => froghat.ca/2023/02/github-clicks/1d.png +0 -0
A froghat.ca/2023/02/github-clicks/1l.png => froghat.ca/2023/02/github-clicks/1l.png +0 -0
A froghat.ca/2023/02/github-clicks/2d.png => froghat.ca/2023/02/github-clicks/2d.png +0 -0
A froghat.ca/2023/02/github-clicks/2l.png => froghat.ca/2023/02/github-clicks/2l.png +0 -0
A froghat.ca/2023/02/github-clicks/3d.png => froghat.ca/2023/02/github-clicks/3d.png +0 -0
A froghat.ca/2023/02/github-clicks/3l.png => froghat.ca/2023/02/github-clicks/3l.png +0 -0
A froghat.ca/2023/02/github-clicks/4d.png => froghat.ca/2023/02/github-clicks/4d.png +0 -0
A froghat.ca/2023/02/github-clicks/4l.png => froghat.ca/2023/02/github-clicks/4l.png +0 -0
A froghat.ca/2023/02/github-clicks/github-light-mode.png => froghat.ca/2023/02/github-clicks/github-light-mode.png +0 -0
A froghat.ca/2023/02/github-clicks/github-step-error.png => froghat.ca/2023/02/github-clicks/github-step-error.png +0 -0
A froghat.ca/2023/02/github-clicks/index.rst => froghat.ca/2023/02/github-clicks/index.rst +118 -0
@@ 0,0 1,118 @@
+Why is it four clicks to view GitHub workflow logs?
+===================================================
+
+:summary: :O blogger reacts to the number of clicks *exploding head emoji*
+:date: tue feb 21 2023
+
+For about three weeks I've been trying to write a blog post about caching for
+GitHub runners using :abbr:`LVM (Logical Volume Manager)` snapshots. Of the time
+spent so far, maybe 3% has been having fun and actually doing things
+with LVM. The rest has just been making angry faces at GitHub actions and GitHub
+runners.
+
+.. aside::
+
+ I don't like this kind of content. The kind I'm writing now in this post. It's
+ miserable. I'm trying to peel off the angry GitHub rant from the other
+ post I'm writing and *containerize* it here -- where nobody will find it and
+ where it can't hurt anyone -- and where it won't detract from the
+ spirit of the post that I want to write that tells a story about using
+ LVM and Linux to do a cool weird thing and how computers *can be fun sometimes*.
+
+ The downside is that this isn't a nice post with a happy side. Like my
+ `phone rant </2020/09/phone-rant>`_ with the predictive text or swapping in
+ a new pattern for underneath your phone case to show off to your friends
+ tomorrow at school.
+
+When a GitHub workflow runs, usually when you push commits with git, it runs
+some programs on a computer and it will either do the things or fail. Also,
+GitHub has logs about the things it tried to do.
+
+This is how to view those logs. Starting from the index of workflow runs (the actions tab in the project).
+
+.. picture:: 1l.png
+ :alt: First, click the workflow run.
+
+ .. source::
+ :srcset: 1d.png
+ :media: (prefers-color-scheme: dark)
+
+.. picture:: 2l.png
+ :alt: Second, click the job in the workflow.
+
+ .. source::
+ :srcset: 2d.png
+ :media: (prefers-color-scheme: dark)
+
+.. picture:: 3l.png
+ :alt: Third, click the cog in the corner to reveal a dropdown.
+
+ .. source::
+ :srcset: 3d.png
+ :media: (prefers-color-scheme: dark)
+
+.. picture:: 4l.png
+ :alt: Finally, click "View raw logs" in the dropdown.
+
+ .. source::
+ :srcset: 4d.png
+ :media: (prefers-color-scheme: dark)
+
+.. aside::
+
+ *Bonus Meme:* I was taking screenshots in light mode and it
+ looked like this panel was still in dark mode. I thought it was setting the
+ theme with JavaScript or something and was stateful so I tried refreshing a
+ bunch. But I think it's just like this. I think this is the light mode.
+
+ .. image:: github-light-mode.png
+ :target: github-light-mode.png
+
+It seems like there could be a shortcut for this. Nearly always, I'm wanting to
+view the logs for the last job that failed.
+
+On occasion, I want logs for the most recent workflow run even if it
+succeeded. These workflows have a single job so picking the job is easy when
+there's just one option. Even then, showing the logs for all the jobs wouldn't
+be terrible.
+
+The screenshots don't really do it justice, but if you aren't as familiar with
+GitHub actions is as someone who authors workflows (a fucking nerd), it's not
+impossible to get lost and click the ellipsis button in the top right at either
+step two or three. It's got the same general *top right of the whatever
+area* for your spatial memory to sort out.
+
+Maybe they'll figure out AI so I can just ask it to click the things
+to show me logs.
+
+----
+
+At some point I got baited into trying to fetch the logs
+with GitHub's REST API. You have to add an access token so that `curl`, or
+whatever program you're using to make requests, can authenticate. GitHub scolds
+you if you try to add a token with no expiry, so I figured "Okay, I'll stop
+trying to fight you, GitHub. I'll do what you say and try to keep an open mind.
+After all, I can't stop progress or whatever this shit is."
+
+I made the token set to expire in seven days and immediately got four emails
+telling me about the thing I just did. Two telling me that I had added the
+token and two that it was expiring in seven days. By the end of the week there
+were two more emails telling me again that it was going to expire and then
+two more once they had expired.
+
+It felt like one of those windows installers that tries to also install a
+browser toolbar or something. And it says "don't uncheck this to skip leaving
+this offer for a 14-day demo of Norton AntiVirus uninstalled from your
+computer". You might have agreed to it doing the thing that it does, but it's
+not what you wanted and it really feels like it tricked you into giving it
+permission to be annoying at you.
+
+----
+
+Also, this is what you see when you expand one of those steps in the workflow
+job summary thing. When I first saw it, I thought it meant the step failed and
+nothing was written to standard error. But they *all* say that all the time
+even if the whole thing succeeded. I don't know why. I guess it's just one of
+nature's secrets.
+
+.. image:: github-step-error.png