HotCI - A Github CI/CD tool to test hot code upgrades/downgrades in Erlang OTP (and more)

Hello everyone,

Today, I would like to share the project I have been working on as part of my master thesis in collaboration with https://stritzinger.com/ and gather some feedback from the community about it.

This project is called HotCI and is inspired by GitHub - ferd/dandelion: A weed is a plant considered undesirable in a particular situation, "a plant in the wrong place". Taxonomically, the term "weed" has no botanical significance, because a plant that is a weed in one context is not a weed when growing in a situation where it is wanted. .

HotCI is a Github template that includes three Github actions workflows. GitHub - Ahzed11/HotCI: Run unit tests, hot code upgrade tests and build releases thanks to Github actions. For usage see:

The first one performs analysis with xref and dialyzer and launches the applications’ unit tests.

The second workflow builds both the previous and the current release and launches the upgrade_downgrade_SUITE, a test suite designed to test upgrades and downgrades. This test suite leverages the peer module to start a Docker container containing both releases. The peer module also allows interactions with the container such as modifiying its state via functions calls and applying upgrades or downgrades.

The third workflows, when triggered, builds the project’s release and publishes it as a Github Release.

My biggest contribution lies in the second workflow. Finding a way to make the upgrade_downgrade_SUITE work was not trivial as an Erlang beginner. The first version used bash scripts interacting with the executable generated by rebar3, the second version used Robot Framework and the third and final one uses Common Test.

If you want to see this template in action, I have created an example usage repository that showcases the use of this template and explains the operations that have been applied in the repository in a written, step-by-step, manner. GitHub - Ahzed11/HotCI-usage-example: Demonstrates how to use HotCI

I am looking for people who would be interested in participating in the evaluation of this tool. The evaluation includes trying the template yourself in a new or old repository, giving feedback on the available documentation, reporting bugs, etc…

Of course, if you decide to take part in the evaluation, you are not requested to do all these actions. For instance, simply giving a look at the usage example repository and giving your opinion about the workflow is already greatly appreciated !

Because I will post this message on different platforms, I have created a form to centralize the feedback. Microsoft Forms

However, feel free to contact me via other means such as replies in a thread, private messages, Github issues, etc…

Thank you in advance for your time and interest,
Have a nice weekend and week !

16 Likes

@Ahzed11 Excellent work.
Can this be used without GitHub CI/CD?

Unfortunately, no, not out of the box :frowning_face:

The template uses Github workflows extensively.
However, if you know how to translate these workflows to your favorite CI/CD tool, you would be able to use it because the verification done in erlang-ci and relup-ci are done through Erlang native tools and scripts.
Although, with the exception of the Github actions used to report the test results and the publish-tarball workflow because they use Github’s functionalities.

Note that Github was only chosen for its popularity, their generous offer to students and because the Erlang/OTP repository is hosted on it (it allowed me to take some inspiration regarding test reports in pull-requests). I really wish there was some standard to easily share CI/CD pipelines on different platforms.

1 Like

@Ahzed11 I see. I will have a look to those scripts. Many thanks

Hey everyone,

If you’ve had the occasion to try out HotCI, I’d really appreciate it if you could take a few minutes to fill out this evaluation form: Microsoft Forms

Your feedback is crucial for my master’s thesis, as it is an evaluation criterion, and so far, I haven’t received any responses.

Thanks in advance for your help, and have a great day!