quirrel-dev / quirrel

The Task Queueing Solution for Serverless.
https://quirrel.dev
MIT License
896 stars 66 forks source link

CronJobs detection fail silently in 1.12.0 #1089

Closed mr47 closed 2 years ago

mr47 commented 2 years ago

Bug Report

Current Behavior On the latest version cronjobs appear to not work.

Input Code

export default CronJob(
    "api/test",
    "*/1 * * * *",
    async () => {
       console.log("Test");
    }
);

Expected behavior/code In UI and in the logs cron jobs are visible.

Environment

Possible Solution

Skn0tt commented 2 years ago

hmm, I wonder if this is related to https://github.com/quirrel-dev/quirrel/pull/1058 🤔

Skn0tt commented 2 years ago

I'm having trouble reproducing this locally. @mr47 could you give step-by-step directions on how I can reproduce this - or even better, a reproduction repository? That'd make it a lot easier for me to fix this.

mr47 commented 2 years ago

@Skn0tt Hey sure, I'll share repo and all details that I have.

Some Info:

Next 13, Quirrel 1.12.0

Screenshot 2022-11-04 at 22 13 31 Screenshot 2022-11-04 at 22 14 53
{
  "name": "quirrel-bug",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "concurrently 'next dev' 'quirrel'",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@next/font": "^13.0.2",
    "concurrently": "^7.5.0",
    "next": "13.0.2",
    "quirrel": "^1.12.0",
    "react": "18.2.0",
    "react-dom": "18.2.0"
  },
  "devDependencies": {
    "eslint": "8.26.0",
    "eslint-config-next": "13.0.2"
  }
}

There is nothing in quirrel UI in all 3 tabs.

mr47 commented 2 years ago

@Skn0tt bare bone repo that shows no cronjobs https://github.com/mr47/quirrel-bug

Screenshot 2022-11-04 at 22 20 58
Skn0tt commented 2 years ago

that's super helpful, thanks. looks like that's a regression that was introduced by a breaking change in commander.js (see https://github.com/quirrel-dev/quirrel/pull/999). Working on a fix.

Skn0tt commented 2 years ago

@all-contributors please add @mr47 for bug

allcontributors[bot] commented 2 years ago

@Skn0tt

I've put up a pull request to add @mr47! :tada: