chirag's Blog

Weekly Check-In #3

chirag
Published: 06/22/2023

I would like to begin this blog post by extending my sincere apologies for the delay in its submission. 

What did I do this week?

Last week I worked on Github Action flow and fixing various bugs related to tests compatibility between various borg and python versions. I found various difference in borg outputs depending on versions (especially the borg diff command). I wrote conditions to accomodate those differences.

Different versions of borg had different dependencies. I therefore also modified the CI configuration file to install them before running nox.

What's coming up next?

There are still minor bugs to iron out in this task. I've already starting working on my task related to docker and plan to fix these bugs alongside it. 

For the next task, I configured a VPS with Ubuntu 22.04 to keep the development environment seperate. I'm starting by understanding the Dockerfile in more depth.

Did I get stuck anywhere?

No. I did encounter several bugs but they were easy to fix.

View Blog Post

Weekly Check-In #2

chirag
Published: 06/13/2023

What did I do this week?

I completed writing my tests for ongoing "live Borg testing" task. I also completed the nox configuration file to test for all the Borg versions and their supported python versions.

What's coming up next?

I now need to configure the Github Action flow for Vorta repository to use these integration tests effectively. This includes setting up environment with all supported python versions active so nox can use them and also run both unit and integration tests.

Did I get stuck anywhere?

Yes, I found it somewhat tricky to understand the current Github Action file and how exactly it works. Testing each change also requires a new commit for which I am considering using Act to run them locally.

View Blog Post

Weekly Check-in #1

chirag
Published: 06/05/2023

What did I do this week?

This week I progressed further on my task to add live borg binary tests. I went through supported file types for Borg and Vorta and added them in tests. Additionally, I also wrote several new tests including initialization of new repository through Vorta.

Currently my goal is to complete all the tests by 10th June and I'm almost there. I'll then move this task to "improvement" status where I can get reviews from my mentor and complete them.

What's coming up next?

Most of my upcoming week will be spent on completing this task. After which I would try to improve the performance of integration tests and start working on my next task. I also have a task related to Docker image which I am excited to try. I'll try to setup a development environment for that in the meantime.

Did I get stuck anywhere?

I did not.

View Blog Post

Weekly Check-In #0 - The beginning

chirag
Published: 05/28/2023

Hi there!

Just wanted to introduce myself quickly before going into project details. I am Chirag Aggarwal, a second-year Bachelor's student of Computer Science & Engineering (AI & ML) at Manipal University Jaipur, India. In this blog series, I hope to share some insightful details about my upcoming participation in the development of projects under Borg Collective Sub Organization.

Community Bonding Period

Also called Week 0, this time period allows contributors to connect with their mentors, set up their environments and prepare to start working on their project. During this period, we reorganized the priority of my tasks and made several changes considering my interest and the tasks of other contributors under Borg Collective.

In the second-to-last week, I completed and closed three of my Pre-Acceptance PRs and prepared my environment for my first task. I am currently working on the task to add integration testing to Vorta, which is named "Test on live Borg binary." For my environment setup, I opted to use Kali Linux running as a VM on my desktop. Additionally, since Vorta supports macOS, I configured a Python virtual environment on a Mac to ensure compatibility for these new tests.

In the last week, I dedicated my time to thoroughly understanding the existing tests, writing the Nox configuration file, and converting the first test file.

Some technical Details

I discovered Nox through my mentor, and configuring it became my favorite part. It’s a simple yet powerful tool. Goal of this task is to enable testing various versions of BorgBackup for each test. This part was accomplished using Nox's Parameterization feature, which required only three lines of code.

@nox.parametrize("borgbackup", ["1.2.4"])
def run_tests(session, borgbackup):
    session.install(f"borgbackup=={borgbackup}")

I had concerns about potential conflicts between system installation of Borg and PIP installation. In some cases, global installation might be preferred, which could defeat the purpose of these tests. To address this, I added a version check.

cli_version = session.run("borg", "--version", silent=True).strip()
cli_version = re.search(r"borg (\S+)", cli_version).group(1)
python_version = session.run("python", "-c", "import borg; print(borg.__version__)", silent=True).strip()

session.log(f"CLI version: {cli_version}")
session.log(f"Python version: {python_version}")

assert cli_version == borgbackup
assert python_version == borgbackup

After configuring nox, I went through conftest.py file which defines various fixtures to set up Vorta and allow tests to utilize profiles and mock various borg outputs. I began by writing a function to setup Borg repository, source folder with various file types and create archives for different kind of changes.

Goals for Week 1

My goal is to convert the archive tests file by Week 1. Many of the tests are already completed but require refinement and the Borg repo initialization function needs improvement. Initially, this task seemed challenging when I first submitted my proposal, but now things are falling into place. I am excited for the week ahead!

View Blog Post