You can tell when I’ve had a rough week as I backslide into a weekly update. Here’s a stream of consciousness.
New Pixel 9 Pro XL Phone
-
I’ve had a Google Pixel 9 Pro XL about a week now. It’s an excellent phone! But there again, my previous Pixel 7 Pro was too.
In particular I’m loving:
- The fantastic battery life.
- The new fingerprint sensor which seems to finally work without having to concentrate on it.
- The extreme brightness of the screen.
The only thing I don’t like:
- The over-rounded corners make this fractionally bigger screen actually look a touch smaller.
- The irrelevant AI - maybe. Or I might just down on AI this week? AI’s produced nothing of any value and hasn’t added a single feature of any value to any product I’ve ever seen or even heard of. I’m sooo sick and bloody tired of hearing about it from every bandwagon jumping wanker under the sun! Sorry… Rant over…
What I wish:
- Is that Quad Lock would produce phone cases in something other than boring black.
Up at the Dentist
-
Got a root canal, which, was surprisingly quick and painless. Apparently, a dentist of the past probably killed the tooth when I got a filling, so this one had to be drilled out. Whatever the process was, the thing now feels solid and I can’t even see any difference looking at it. Win!
-
On a side note, this dentist was a referral from my normal private dentist, so I had to drive for an hour to get there. It was a nice bit of alone time! Love my missus dearly but she’s a teaching assistant so we’ve been at home together ALL SUMMER!
Work Hell!
Warning. Deeply technical complaining coming up!
I, just need to vent a bit more here. I wrote this bit at least twice last week but it’s so stupidly technical and irritating that I bored myself out of writing the post.
So, I have been tasked, via a Jira ticket, to do a “small” piece of work. Small being - 3 working days. I think I’m up to 8 days as of today. Basically, at night, we automate some non-production environments to stop their databases and applications to save money. All well and good. However, “night” can be any time of the day as we have clients in many time zones.
However, to still be able to release software, the ticket asks, to devise a way to “detect” which databases need to be started from our Terraform plan, and then start them up - all from within our CI/CD pipelines in Github Actions.
(If you’re not a techie, I hope your still following - or have skipped forward by now!)
I picked this ticket, because, in principal, it sounds easy. We run a full plan before an apply. Because we use Terragrunt to run Terraform, it jumps to many different folders - and so - we have lots of saved tfplan.output files that can be queried.
This works in two parts - both of which I prototyped and tested on my MacBook:
-
Find all tfplan.output files - but filter that by ones in an “rds” folder.
- Go to the folder that has the relevant file.
- Use
terraform show -json
to output the plan in json format. - Use a complex
jq
query to find that RDS Instance Name only when Terraform was creating or updating the instance. - Build up a list of all such instance names.
-
For each list RDS instance on that list, tell it to start, and make sure that it does.
- A Python script using the boto3 module takes that list.
- Queries the entire list against RDS.
- For each one that exists, tells it to start regardless of it’s current status.
- Waits for them all to be “Running”
Everything went fine until I started putting it together. Apparently, this hellscape of a jq command is too complex - or has too much quote and double-quote weirdness for Github Actions to understand:
RDS_INSTANCES="$RDS_INSTANCES $(terraform show -no-color -json output.tfplan | jq -Mr '.resource_changes[]|select(IN(.change.actions[]; "create", "update", "delete"))|.change.before.identifier ' | grep -v null)"
That took AGES to figure out. The solution ended up being to move it and the scripting around it to it’s own file, and just call that file instead from the Action.
But that’s not what screwed me over the longest! That would be me just being
code-blind. This is my while
loop:
for x in $(find . -type f -name "output.tfplan" | grep rds/output.tfplan)
do
cd $(dirname $x)
... do stuff ...
done
Maybe you can guess why that wouldn’t work - aside from the very first file it finds? For days on end it didn’t occur to me that the find command was returning relative paths. So of course you go to the right folder the first time, it would silently work, then try to go to the next folder from where you were - fail - and GitHub’s absolutely useless error handling would just kill the Action/Workflow/Job.
If I wasn’t already bald enough - that caused more hair to go.
And finally, to add insult and shame to the injury I already had - when I finally fixed that first part. I realised the 2nd part, starting the databases isn’t even remotely possible in our CI/CD as is.
There’s no AWS Profile setup!
In that beautiful list I’m generating - they could be from any random AWS account! I don’t even know where to go from here and my colleagues were stone silent when I asked. :-( I’m beginning to suspect I picked a poisoned chalice ticket that people were avoiding for this very reason.
But yeah, if you’ve made it this far - sorry about that. More venting done.
Personal Workflow Failures of the Week
- I’m working hard to build a life-hacking workflow around Obsidian and todoist some analogue pen-and-paper - but it’s not come together yet. Watch this space.
And Finally - Indieweb Adventures
Whist I write like people might be reading, I frankly haven’t seen any evidence of it! There are no comments comments yet, no email, and I don’t really have anything to track or even record visits from sheer traffic.
I’m OK with all that! It’s the writing I enjoy. Even so, I’ve been putting a LOT of energy in getting the Indieweb building blocks right just for the technical sport.
I’ve setup Indieauth to create an online identity and allow me to authenticate myself on the web via services, h-card and rel-me microformats. My posts (articles) are setup with all the important microformat classes to specify h-feeds and h-entrys.
And this last week or so, I’ve finally got the final part going in terms of POSSE syndication to Mastodon and all the Federation that entails. It’s been fun and interesting work!
This stuff is NOT user friendly in any way though. The part I’ve failed on is being able to produce “notes” on my blog. You know, Twitter-like short form posts without a title? Bending my Hugo theme to accomodate it is almost beyond my skills. I’ll keep trying a bit longer.