Testing rake tasks with rspec

This blog post is a continuation of this thread. On trying to write a spec for one of the rake tasks, when trying to invoke the same rake tasks within the same @rspec contexts, for different flows, weirdly the tests failed if I ran the whole suite, but would pass if I ran them separately. — Tasdik Rahman (@tasdikrahman) August 12, 2020 So for example # ./lib/tasks/foo_task.rake desc 'Foo task' namespace :task do task :my_task, [:foo, :bar] => [:baz] do |task, args| ... # does my_task ... end end Now if we try writing a spec a for it ...

October 20, 2020 · 3 min · Tasdik Rahman

A few things about database migrations

This blog post is a continuation of these two threads. A few things about database schema changes. (1/n) — Tasdik Rahman (@tasdikrahman) October 17, 2020 This is where @rails active record migrations really shine. I find it's UX super clean. (1/n)https://t.co/vA6Jb345yc — Tasdik Rahman (@tasdikrahman) October 18, 2020 The schema of your relational database, will change over time for your application. Trying to introduce these changes from dev setup -> integration/UAT -> production env, in a clear, consistent and repeatable manner, would definitely add value in trying to maintain repeatability across different environments. ...

October 18, 2020 · 6 min · Tasdik Rahman

The making of bhola - your cert expiration overseer - Part 1

You might have already seen me writing a bit about bhola already on twitter, I wrote a little bit about why I have been building bhola. This post is more of a continuation to this tweet and what I envision it to be moving forward. Do you sometimes wake up, with a call by someone from your team, telling you some SSL cert has expired? Do you keep track of SSL cert expirations on your to do notes or excel sheets? Would you like to be on top of such x509 cert renewals? https://t.co/MVFRZCUlZN is for you (1/n) pic.twitter.com/pj8JHJEkje ...

October 8, 2020 · 7 min · Tasdik Rahman

Why I chose to do TDD for my new side project

This post is more of a continuation to this tweet One thing which I tried doing differently this time with one of my side projects is to do TDD from the start. Someone may ask why? It's just a side project no? (1/n) — Tasdik Rahman (@tasdikrahman) October 4, 2020 I have been building bhola in my free time, and one thing which I tried doing differently this time with it, was to practice TDD from the start. ...

October 7, 2020 · 7 min · Tasdik Rahman

Backpacking trip to Alleppey and Kochi

I did this trip last year, in August 2019. Finishing this was long overdue. Trying to follow up with the manager of Khawa karpo as Sushant and Rajat also finished their sharing of dinner which we were grabbing to call it a day. We all rushed as I grabbed my takeaway, to get a rick to catch my bus which was due to leave in about 15mins or so. Didn’t try bargaining too much and just went ahead with the exorbitant charge for the meagre ~1km which was to be traversed. ...

August 31, 2020 · 27 min · Tasdik Rahman

A few notes on GKE kubernetes upgrades

This post was originally published in Gojeks engineering blog, here, this post is a cross post of the same This post is more of a continuation to this tweet A few notes on @kubernetes cluster upgrades on GKE (1/n) — Tasdik Rahman (@tasdikrahman) July 21, 2020 If you are running kubernetes on GKE, chances are that you are already doing some form of upgrades for your kubernetes clusters, given that their release cycle is quarterly, which means you will have a minor version bump every quarter in the upstream. That is really a high velocity for version releases, but that’s not the focus of this post, the focus is on how you can attempt to keep up with this release cycle. ...

July 22, 2020 · 15 min · Tasdik Rahman

Structured logging in Rails

This post was originally published in Gojeks engineering blog, here, this post is a cross post of the same If you are on rails, you would have noticed that the rails logs which you get by default are quite verbose and spread across multiple lines, even if the context is of processing just one simple controller action. What I will discuss in this post is how can one sanitize the logs, without losing out on information along with how you can add additional information for your log lines to make full use of the querying features of your logging platform. ...

July 7, 2020 · 6 min · Tasdik Rahman

Our learnings from Istio’s networking APIs while running it in production

This was originally published under Gojek’s engineering blog by me, this post is a repost. We at Gojek have been running Istio 1.4 with a multi-cluster setup for some time now, on top of which, we have been piloting a few reasonably high throughput services in production, serving customer-facing traffic. One of these services hits ~195k requests/minute. In this blog, we’ll deep dive into what we have learnt and observed by using Istio’s networking APIs. ...

June 17, 2020 · 10 min · Tasdik Rahman

AddTrust Root expiration fix

With the root cert expiring for sectigo, the older linux distributions are not properly ignoring the cert. I have seen this affect boxes which ran ubuntu 16.04, but there would be others too. Didn’t notice anything on Debian 10(buster) As people have pointed out around, this is an openssl 1.0.2 bug. So even a system upgrade wouldn’t help the situation wouldn’t help, as this would require an actual distro upgrade. Programs which don’t depend on openssl(like go binaries), won’t get affected by this. Services/client on Ruby/Jruby for example, on the other hand will have problems similar to curl. ...

May 31, 2020 · 3 min · Tasdik Rahman

Specifying scheduling rules for your pods on kubernetes

This is more of an extended version of the tweet here If you haven't had a look at pod-affinity and anti-affinity, it's a great way which one can use to distribute the pods of their service across zones. https://t.co/iqhbyhruD8 (1/n) — Tasdik Rahman (@tasdikrahman) February 23, 2020 PodAntiAffinity/PodAffinity were released in beta some time back in 2017, in the 1.16 release for k8s, along with node affinity/anti-affinity, taints and tolerations and custom scheduling. ...

May 6, 2020 · 5 min · Tasdik Rahman