DEV Community

Roxanne Lee
Roxanne Lee

Posted on

2.6.0 Pre

This blog is unfortunately going to come out a bit later than midnight. Unforeseen merge conflicts happened that didn't go as smoothly as I had hoped for (more on that later).

So much has happened in week 3 for OSD700, and I had quite enjoyed it all.


Sheriff-lead meetings

Our two sheriffs ran both in-class meetings this week, and they were both really awesome. They worked well together, pushed out quite a few releases, and showed an extensive knowledge of the goings-on in Telescope and Satellite. I won't be able to do it to the level that they did, so I admire them a lot for that.

Extracting Elasticsearch from Satellite for Search

I had mentioned this issue last week that I had for release 2.6.0. Instead of just for Search it was targeted for all the microservices that used Elasticsearch.

At this time last week my brain was still thinking that this issue meant using Elasticsearch on Telescope without Satellite. Which had me really confused, because it "seemed" already implemented in Telescope. Luckily, I had a quick crash course with the Prof on how to mock Elasticsearch, and had this confusion diffused.

That didn't stop me from making things seem more difficult than they actually were. A lot of wasted time was spent thinking I needed to take Elasticsearch completely out of Telescope and diving into too much research on areas that wasn't even related to what the issue intended.

Elasticsearch is also one of the dependencies for the Parser service, but I couldn't find where it was being used since the service is still a work in progress. I reached out to Tue to get more insight on it. He also helped me out with removing dependencies in the services. Apparently, taking out the dependency in the relevant package.json then running pnpm install is the trick.

In the end I decided to just make a PR on just the Search service, and work from there. I think Tue must've worked out how they'd implement Elasticsearch for Parser with his mentors, because the issue was closed when the PR merged.

Getting ready for tests on Search

The issue on tests for search I had mentioned last week has been bumped to 2.6.0 as well. The tests are blocking implementations for advanced search, so we have to try to get things started at least.

I'm working with Jia-Hua on this issue, and we came to an agreement that I'd make sure using Elasticsearch from Satellite wouldn't break Search, while he creates a PR for the initial setup for tests. This PR quite amusingly led to a couple more PRs.

Fixing setup files for Posts tests

In the setup for Search tests, we used Posts tests as a template. Prof spotted that the config files for tests correctly. According to the docs this meant that MOCK_REDIS in the Posts test setup file shouldn't have been set to the value we wanted. I'm pretty sure there had to be better ways to debug, but console.log had always been a trusty friend, and I had used it to find out we've only been tricked to thinking the tests were set up correctly. I sent up a PR for setting it up correctly for Posts.

Removing cross-env dev dependency

While working on the PR for Posts I noticed some scripts for tests in the main package.json had defined MOCK_REDIS=1 in their lines. I removed them, and this led to another PR with the intention of removing cross-env, which is needed to define these config values.

This current PR is still open and is the main reason why I'm late in submitting this blog post.

Removing the dependencies also involves touching the pnpm-lock.yaml file. In our current master branch there are many long lines like
Image description which prettier doesn't like and auto-commits to change to below:
Image description. Trying to rebase got me a merge conflict, and sorting it out meant 8,000+ lines were changed. I had thought I had messed up until I figured out it was prettier all along.

This PR still needs tweaks, and maybe I did mess up on setting up prettier, but I'm sure Prof will tell me what to do to fix it.

Moving forwards with testing

I didn't have enough time to play around with mocking Elasticsearch just yet. Jia-hua has been kind enough to share some reading material. Doing this would be my main priority for 2.6.0.


Conclusion

All in all, a very eventful week. Things are moving quickly in Telescope, I'd like to try keep up with them.

If I'd have re-done things this week, I would've saved time in just getting the PRs out and stop trying to overthink things. It is incredible how fast Prof responds and how knowledgeable some of the students in the class are. So, I'm sure if my PR needs tweaking they'll let me know in the reviews.

Discussion (0)