Release 0.4: The End

Hello friends,

As I told you guys before I was tasked with Release 0.4 for my Open Source Development class. Like the previous Release 0.3, I was tasked with having an internal and external pull request. Again, like Release 0.3 I did what I said I would do for my internal pull request, but my external pr’s are much different than I originally thought.

Internal Pull Request

For the internal issue, I said I would add more test coverage for our email service that we used for Telescope. I wanted to add more test, since I was the one who originally made the test code and it didn’t have much coverage, which can be seen below.

The test code was at a pretty low 14% overall test coverage. When I wrote this code I wasn’t as familiar with using jest to test code or even the functionality behind the code I was testing. So, this time around I was little more comfortable with the tools I was using and the code base in general.

That’s where my PR comes in. I decided to restructure and break the logic of the email service into smaller more testable chunks. This way it allowed to test those small chunks easier and use jest more efficiently. With the restructured and segmented functions I wrote tests to ensure that the functionality still worked.

The only thing is that I believe some of the transporter code isn’t working properly because when I was testing the code, it would give back undefined values sometimes, when it was expected to give something back. That is why I skipped some tests and just put a // TODO for people to go in and update it at a later time.

External Pull Requests

So, this time around my external pull requests are kind of weird. Like I said in my last blog, I was asked to help fix another easy issue in the meshery repo, but I really consider that to be a part of Release 0.3. I also found two other issues in a different repo, which was a Flask JWT Router library for python. It that had similar issues, where they wanted me to go in change the the name of a method call and change everything that called that method to use the new name. They actually had two issue for two different methods, which can be seen here and here. Simple enough, I decided I would tackle both since they were pretty similar in scope. I opened them in trusty VSCode and used it’s search and replace functionality. Any time I found the original method call I switched it to the desired rename. I was careful though, ensuring and checking if the replace was correct and being used correctly. The two pull requests can be found here and here.

I did those PR’s, but I also wanted to try something a little more harder and something that I’m not as familiar with. Which exactly what I found in this new issue, that wanted me to create a reusable React panel for their HospitalRun‘s repo. It’s a organization that creates “open source, modern software for charitable hospitals in the developing world.” Basically, the issue required me to make a reusable Panel component, but also have it working to be on their hosted app that shows off all the Panels using storybook.

I originally tried to follow suit with many of the other components by using the react-bootstrap library to create their components and have that be the base for the reusable component. The only problem is that they were using react-bootstrap v4, which doesn’t have a panel component, but their previous version did. One thing I tried to do was try and rollback the version of bootstrap, but that caused a bunch of other errors in other components and I knew that was a definite no go. I didn’t want to have to fix all those other issues to work with the old version of bootstrap and I felt it wasn’t a good thing to try and rollback their dependencies.

So, what I decided to do was try and use a different library to try and create a base for my reusable component. Enter rsuite. I believed this was the solution to all my problems. If I could import their panel component and use to create my component I would be all good. Although, when I did it I found some issues. It wasn’t working like the examples they had on their website, when I tried to make a reusable component out of it. This can be seen with image below that a border should be around the panel, but nothing shows up. I tried many ways and even asked some of my peers that are more knowledgeable about React than I am, but to no avail. So, as you’ll see later I asked the maintainer what to do.

image

Also, when I tried to commit, since they were using husky, the linter would be called locally and try to fix my code. Although, linter would make really weird changes to my code and then complain about those errors like deleting ‘*/’ or even letters in a variable name. Super weird. So, I decided to ask the maintainer what I should do.

image
image

He gave me the idea to try and use react-bootstrap cards to try and create and simulate a panel and gave me work around for the commit so I can push up and we could debug and figure out issues together. Currently, my PR is up, but I’m waiting on what the maintainer says if we should try to make rsuite work or try a different solution. My PR can be seen here.

In The End

So, this release I felt like I did more work across the board on both my internal and external PRs, although with the exception of the HospitalRun PR, I felt like I tackled them a lot better and more efficiently. Especially, my handling of git. Last release I had a lot of issues with my commits, but this time around I was easily able to squash, fixup, and rebase all my commits to nice small little ones. I believe it was a fruitful and fun release.

Published by Neil

I am currently a third year student at Seneca College studying Software Development.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at WordPress.com
Get started
%d bloggers like this: