WEEK 8: ENTRY 1

 At my internship today, I was working on troubleshooting the 403 authorization error I had from my logs when I was testing my SSO Auth Token connection to the Elasticsearch API. Prior to today, I wrote a Golang code using the Golang Olivere search package to connect to the Elasticsearch API. Basically, I passed my http client and an elasticsearch method to check if an index exists on the cluster of the Elasticsearch API. Having confirmed whether the system user is authorized to make a call to the Elasticsearch API, I was left with very little hints on what I could be doing wrong. Then the question about, what’s next came? 


Well, as usual, there are always smarter people around me in the team, so I asked around to see if someone had worked with Elasticsearch before. To my surprise, one of the VP on our team had prior knowledge, so he decided to help me out with my code. We did pair programming and he was the driver for the most part. I must say that he is very versed with Golang and quick in his debugging. Instead of running the code to the K8s deployment Gitlab, he made it very simple by running the code locally on intelliJ. I learned that it is way easier to debug because with that method, we were able to add a debugger and checkout for errors. With the debugger, we could locate what part of our code was giving us an output and what part was failing. We used numerous print statements that helped us see the errors. It turned out that the API did not like the confirmation of whether a particular index exists or not. Therefore, we instead wrote an elasticsearch query, which gave us an output. 


Although I spent more time debugging this issue, it was very worth the time spent. During this process, I learned so much about how to use the intelliJ debugger tool. So too, I read more documentation on how to use the Olivere elasticsearch package. Thus, I intend to work more on my debugging skills because from the help I received, I learned that I did not exhaust all the possible approaches when I was debugging my code.


Comments

Popular posts from this blog

WEEK 4: ENTRY 3

WEEK 6: ENTRY 3

WEEK 7: ENTRY 1