Jul. 24th, 2023

dybr

Jul. 24th, 2023 09:20 pm
juan_gandhi: (Default)

Ok, I'm on pager duty, but nothing is happening, so I decided to do two things. One is to write a proper fix to that shit with content-type, getting rid of acting on the version number in that content-type; the other is to gradually shut down the old import job.

The latter, I looked through the whole codebase and could not find any place where a flag is set for it to run (but it does). Asked Karen, she does not know either.

The former, I spent the whole day trying to make shit run, not return a null from the service. It does return null when I remove that dependency.

4 hours later (or 6) I got it. It's "mock". Mock accepts a different parameter value, and returns a null. In the method that can't return a null, you just look at it. You can check the return value for null. But it's mock, and mock does not even call that method.

So you see how I hate mocks. They brake the contract. Silently.

Ok, anyway. Sent the PR. Karen wants me to add a test case that checks that stuff works if you don't specify limit. Of course there's a bunch of such test cases there, I'll just add a comment in the test suite. 

Boring, but I agree with Karen. I like this kind of people.

And of course I did not have time for anything else.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

December 2025

S M T W T F S
  123456
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 3rd, 2025 03:04 am
Powered by Dreamwidth Studios