GSoC’21 @ CHAOSS: Coding Period Week 4 & 5

Dhruv Sachdev
3 min readJul 12, 2021

Before getting into my progress for weeks 4 and 5, I would brief you about my first 3 weeks so that it gets you in the flow. I was working on extending the dependency worker to collect scorecard data. We had a bug in which it didn’t generate any logs and I figured it might be because the Deps worker not working at all. Well yes, we did resolve the bugs, and the Scorecard model is completely working now.

But how did we solve the buggy situation?

This bug led to another bug which led to another bug and so on. At first, we only had to figure out why the worker is not working, it was because of some database versioning issue, it couldn’t find the necessary table to populate dependencies which led to not getting switched. It was a simple resolve by just making a new instance of Augur and connecting it to a new database which generated the schema and worked perfectly. Now all I could see for the scorecard model was ERROR logs.

Before we used to take the relative_repo_path and modify it a little bit and give it to the generate_scorecard function. This was easy as it did not require much modification but not a great way as it generated problems. So I refactored the scorecard model to query the repo table and pass the URL to the repository. But still, it generated ERROR logs.

In the process to fix the bug, I used the most efficient method which was to add lots of logging everywhere with variables formatted to figure out what is happening inside:). It took some time to figure out that when our subprocess calls the scorecard function it returned an empty list. I was bewildered by looking at this as I never expected this could be an error. I started adding more logging almost after every step to see what’s happening with the data. After 2-3 days of trying everything from my side, I reached out to my mentor and planned a meeting. Just looking at a glance, he told me what could be going wrong. In augur, some repositories have ‘.git’ at the end of the URL which was not supported by the scorecard. Crazy right?

I could have never imagined this issue and I am so thankful to my mentor, he just figured it out in one glance. We did face more errors while inserting data into the database, So we changed the entire table and now the scorecard is working perfectly with Augur!

Something bad happened - Do you know about those small green blocks that you get on your Github profile when you make a commit? Since I was using a deprecated version of git on my local machine, all my commits did not generate any of those small green blocks on GitHub!

When I figured no green blocks!

Well for now I have updated my git version and started working on implementing Libyear to calculate dependency freshness. We are building a new Worker for this I feel it’s going to be `legen`

Legendary !!

--

--

Dhruv Sachdev

Open Source Enthusiast and a Computer Science Student