DEV Community

Tue
Tue

Posted on

Final progress on 2.6 release

Fixing showstopper bug:

A few days ago, I tried to start docker containers to debug this feed 304 issue, which we eventually closed because we couldn't reproduce the bug, but there were errors regarding mdx

./src/markdown-pages/about.md
Attempted import error: 'mdx' is not exported from '@mdx-js/react' (imported as 'mdx').
Enter fullscreen mode Exit fullscreen mode

It was working just fine a few hours before, we were all taken by surprise by it. It came from front-end part of the code, since mdx is a dependency from the front-end. After changing versions of next and mdx, nothing seemed to work, we decided to take a look at their GitHub, turned out they had released a new version also a few hours before. We tried a few options based on the answer from this issue but only installing mdx-js/react worked for us. We got together on Teams to discuss and fix this, the fix was small but it was fun

Making parser service run locally:

I'm in charge of making parser service run and adding tests. Since, backend has changed a lot for the last few months, making parser service run requires some effort. I need to make this happen in 2.7 or else people are gonna add things to backend and I have to update it 😂.

I was trying to run parser by using normal node index.js but encountered 2 errors. Sometimes, Redis complained about connection being in subscriber mode so it couldn't do any CRUD operations

[ 2022-01-30 18:51:41.815 ] ERROR (20140 on DESKTOP-P67GFS3): Error queuing feeds
    err: {
      "type": "Error",
      "message": "Connection in subscriber mode, only subscriber commands may be used",
      "stack":
          Error: Connection in subscriber mode, only subscriber commands may be used
              at Redis.sendCommand (D:\Repos\telescope\src\api\parser\node_modules\ioredis\built\redis\index.js:633:24)
              at Redis.hgetall (D:\Repos\telescope\src\api\parser\node_modules\ioredis\built\commander.js:122:25)
              at getFeed (D:\Repos\telescope\src\api\parser\src\utils\storage.js:105:26)
              at byId (D:\Repos\telescope\src\api\parser\src\data\feed.js:157:24)
              at Array.map (<anonymous>)
              at Function.all (D:\Repos\telescope\src\api\parser\src\data\feed.js:182:28)
              at processTicksAndRejections (node:internal/process/task_queues:96:5)
              at async Promise.all (index 0)
              at async processAllFeeds (D:\Repos\telescope\src\api\parser\src\index.js:75:25)
    }
Enter fullscreen mode Exit fullscreen mode

Or sometimes, it was just a plain unhandled error.

With the help of Josue, we found the cause to be in redis.js, the Redis connection. We were exporting an instance of Redis for queue.js to use and it didn't like that because client and subscriber have the same instance I think.

// queue.js
const Bull = require('bull');
const redis = require('./redis');
const { logger } = require('../utils/logger');

const client = redis;
const subscriber = redis;
Enter fullscreen mode Exit fullscreen mode
// redis.js
const { Redis } = require('@senecacdot/satellite');
const redis = Redis();
module.exports = Redis;
Enter fullscreen mode Exit fullscreen mode

It worked after the change below

// redis.js
const { Redis } = require('@senecacdot/satellite');
module.exports = Redis;
Enter fullscreen mode Exit fullscreen mode

So for 2.6, I've managed to put these PRs 2716 2781 in.

Other than those major work I mentioned, I've been mostly talking to people and reading up stuff. I had 2 interviews this week which went really well, it occupied a piece of my mind so my progress has been quite slow.

Top comments (0)