Skip to content

The straw that broke the pipelines back

When you add "one more" module and boom shit hits the fan

ecessity is the mother of invention. Well shit...Awaaaaayyy we go!

I had a great weekend, coding my little heart out. I am on the final mile of the fileorbit.cloud beta. I added Stripe Checkout, and I am testing it. Looks great. One small snag. My emails won't send.

I added email templates to the Tranquil PDS that look sexy. I was wicked proud of it. I wasn't thinking much of it and added my subscription emails to be sent to the PDS since I am lazy and thought it sends emails, NBD. Welp that turned out to be dumb.

I learned this by adding tracing since my Stripe Checkout webhook was working wonderfully. My quota was being increased and decreased based on if I canceled or subscribed, yet I kept seeing lifecycle email failed (ledger change kept). A log I had designed. Lifecycle meaning the circle of life for a subscription: they add extra to move data quickly or have more space for a trip, then cancel a month later after they needed to tighten their budget.

As I said, necessity is the mother of invention! So I looked in the PDS logs but its busy in there. Firehose this, error that, but nothing that signaled email failed. So I turned to a trusty tool I've used at many jobs: tracing. After some hardcore coding this weekend I got my tracing working. Then I saw it:

PDS sendEmail failed: (404 Not Found): Account not found

...OMG WHY AM I SO DUMB. Maybe because I am on my last braincell and its 12am. The account I am using to test is this one, and its hosted with BlueSky not on FileOrbit.

I sighed and rolled up my sleeves. Time to add a new module. I made an email service, but I am cheap and don't have Netflix money so I made a module that is its own service. Instead of it running on its own box I would treat it like my billing service: a standalone web service that deploys with its own port and routing via Caddy, yet with a twist, a systemd service!!! I know right, crazy stuff. Back to the basics from when I was selfhosting a homelab. This gave me best of both worlds. Loosely coupled APIs that one day can be easily peeled out of the one server instance and horizontally scaled on its own. For a garage software project this is good enough.

Here comes the straw... Tangled.sh has a free pipeline they refer to as Spindles. It is simple but it does the job. There is one catch: it has a timeout of 15m unless you configure your own hosted runner. I love the cloud for this (someone else's server). I don't have to manage it. When it fails I post to Discord and poor Lewis sighs and fixes it while I am at my day job. So what do you know, I hit the limit with no turning back.

So now I am knee deep into a real process for releases where I have parallel Spindles building the gateway, file explorer, billing, and email dependencies and uploading them into a private artifact store via DO Spaces that I previously used for sccache to speed up the pipelines to avoid the timeout.

Well this sucks, but the silver lining is now I have a stateless pipeline. I am forced to create a release trigger via tagging which gets created on a new desktop app publish, and boom, now I have a performant and well documented process for updating the web application and desktop apps.

While I have this cooking I started a project I call Sleeping Beauty. It is a self hosted Spindle helper for installing bare metal Spindles so I can now, instead of making the desktop apps be the release tag trigger, work on the app and test it out, set a patch, minor, or major tag via the Nx release process, push it, and both my MacBook and Windows desktop will build and publish my desktop apps. Its still early but I am really excited to be forced to mature my process. This will allow me to release with consistency and with ease.

If you made it this far in my ramble I appreciate you!

Until next time, peace nerds and normies!

~ Triforce

Did you enjoy this article?

Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.

Across the AtmosphereDiscussions