Skip to main content

Mad Mirrajabi

Progressive Canary Releases with Argo Rollouts Analysis and Linkerd Metrics

# Introduction

Did this or a similar scenario ever happen to you?

  • Your team is about to deploy a breaking change to production.
  • You deploy to acceptance and everything looks great.
  • You deploy the change to production.
  • Some very important software who no one knew about but had a dependency on your software starts failing.
  • You panic and run around to find the fastest way to roll back
  • After an hour or so, you roll back
  • You tell yourself: “I will never let this happen again!”

Canary releases are a powerful deployment strategy that allows you to gradually roll out new versions of your application while minimizing risk. By combining Argo Rollouts, Linkerd, and Prometheus metrics, you can automate canary deployments that are not only incremental but also validated by real-time metrics analysis.

Let AI generate Pull Requests from your GitHub issues!

It’s time we all stop wasting time on those small and medium-sized tasks that make our day miserable. Create small issues and let AI deal with them.

My (probably) last gift of 2023 for you all is a GitHub action + workflow which generates Pull Requests from your GitHub issues!

Check them out:

Aider is a coding assistant that handles all the prompting and communication with OpenAI.

Sample Annotation Processor using gradle

Provided sample is an annotation processor which implements “Builder pattern” for your java classes.

Repo: https://github.com/mirrajabi/annotation-processor-sample

This is not a “Builder pattern” tutorial or something like that. It is about how we can make an annotation processor to avoid boilerplates and repeated codes.

public class TestClass {
    private long id;
    private String name;
    private int someField;
    private Activity activity;

    public long getId() {
        return id;
    }

    public TestClass setId(long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public TestClass setName(String name) {
        this.name = name;
        return this;
    }

    public int getSomeField() {
        return someField;
    }

    public TestClass setSomeField(int someField) {
        this.someField = someField;
        return this;
    }

    public Activity getActivity() {
        return activity;
    }

    public TestClass setActivity(Activity activity) {
        this.activity = activity;
        return this;
    }
}

And we instantiate this class like so:

RxContacts 2

This is an Android library to fetch contacts using RxJava2, based on the original RxContacts library.

Get it from my GitHub page: https://github.com/mirrajabi/rx-contacts2

## Usage Example

RxContacts.fetch(this)
          .filter(m -> m.getInVisibleGroup() == 1)
          .toSortedList(Contact::compareTo)
          .observeOn(Schedulers.io())
          .subscribeOn(AndroidSchedulers.mainThread())
          .subscribe(contacts -> {
              // Do something...
          });

Android Search Dialog

I made this library to make searching easier. I mean a lot easier!

Demo

In my last 3 projects, we needed a search dialog that could pop up, perform searches based on input, and show results. So I thought, why not make it once and for all?!

The documentation and usage guides are available in the GitHub repository.

Don’t forget to give it a star if you find it useful! 😊

Persian Calendar View for Android - افزونه تقویم فارسی اندروید

In our current project, we needed a solar/Persian calendar for the app. I searched a lot for it in existing libraries and found Ebrahim Byagowi’s open-source Persian calendar.

There were also some Hijri calendars, but I didn’t want them. So, I decided to create my own calendar view plugin library and publish it. To achieve this, I read the source of Byagowi’s project and realized it could be easily converted into a separate library. I detached the calendar part from the application, made some changes and customizations, and now it’s ready for use in your Android projects.

JSON Data Mocking for OkHttp

In every client project that is connected to a remote REST server, the process of preparing and testing requests/responses may take a lot of time.

This simple library helps you mock your data for use with OkHttp + Retrofit in JSON format in just a few moves. It routes the requests to local JSON files and returns the data stored in them.

You can find the library and all the instructions in my GitHub repository: OkhttpJsonMock.