Open anshgoyalevil opened 6 months ago
hey @anshgoyalevil can I work on this?
@NightFury742 I am not sure if this bug still persists. Feel free to check if it exists and resolve :)
@anshgoyalevil I was looking at this issue and found out that this workflow is not running for quite some time now. It is giving the following error:
> @asyncapi/website@0.1.0 generate:dashboard
> node scripts/dashboard/build-dashboard.js
/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4
const *** Promise *** = require('node-fetch');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/website/website/node_modules/node-fetch/src/index.js from /home/runner/work/website/website/scripts/dashboard/build-dashboard.js not supported.
Instead change the require of index.js in /home/runner/work/website/website/scripts/dashboard/build-dashboard.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4:21) ***
code: 'ERR_REQUIRE_ESM'
(It is giving error for 4 months: ) I would like to work on this issue, however, should I create new issue for this error as I couldn't find a issue for above error?
Text labels: bounty/2024-Q4
, bounty/advanced
, bounty/coding
, bounty/upgraded
First assignment to regular contributors: 2024-09-20 00:00:00 UTC+12:00
End Of Life after: 2024-10-31 23:59:59 UTC-12:00
@asyncapi/bounty_team
Hi team,
I would like to take on this issue. I have good experience with GitHub Actions from my GSoC work, where I built the CI/CD pipeline for the JSON Schema website.
Thank you : )
My Plan :
Quick Fix: We can downgrade the node-fetch package it will work.
But I will try to find better solution and alternative to work with latest version.
Also we need to update github action workflows since we are using older version of node
I have tried fixing with degrading version it is working fine but we need to test it in github actions environment and find a good solutions. Also current github action packages are not up to date that need to fix.
Thank you : )
@aeworxet I would like to get assigned for this issue as I had already started working on it 4 days before and would be completed soon. Thanks.
@Wck-iipi
Please refrain from starting work until being assigned, trying to impose the fact that you must be assigned simply because you already did half the work you weren't assigned to in the first place.
On the other hand, you can describe in plain words what you have already done and what you are planning to do next without sharing the code. Probably this will increase your chances of being assigned to this Bounty Issue.
In any case, before sharing your approach, please specify your full name in your GitHub profile.
@aeworxet I think I'm already made a fix for the node-fetch problem in this PR https://github.com/asyncapi/website/pull/3038/files#diff-cfbf694e8e8ffe40a57d3b7d5357d38fde7c3a21b22f9d6c74e4cf583f4d3a84, but the issues is seems comeback.
For the rate limiting, I think we can reduce the frequence of the cron jobs, reduce retry etc.
I also like to work on this issues if this still exist under bouty program
Some of my past contribution: https://github.com/asyncapi/modelina/pull/2067 https://github.com/asyncapi/modelina/pull/2028 https://github.com/asyncapi/modelina/pull/2031
My Plan :
Quick Fix: We can downgrade the node-fetch package it will work.
But I will try to find better solution and alternative to work with latest version.
Also we need to update github action workflows since we are using older version of node
I have tried fixing with degrading version it is working fine but we need to test it in github actions environment and find a good solutions. Also current github action packages are not up to date that need to fix.
Thank you : )
For the issues you are mention, Im already made PR for that and this PR should fix the issues regarding of node-fetch https://github.com/asyncapi/website/pull/3099/files
I dont think reducing number of cron job will resolve github rate limiting. The problem is not because of github rate limiting but because of node fetch package.
We are still using v3 which have some esm import error.
Here is fix:
https://github.com/asyncapi/website/issues/2894#issuecomment-2353706914
I would love to work of this issue : )
My Plan : Quick Fix: We can downgrade the node-fetch package it will work. But I will try to find better solution and alternative to work with latest version. Also we need to update github action workflows since we are using older version of node I have tried fixing with degrading version it is working fine but we need to test it in github actions environment and find a good solutions. Also current github action packages are not up to date that need to fix. Thank you : )
For the issues you are mention, Im already made PR for that and this PR should fix the issues regarding of node-fetch https://github.com/asyncapi/website/pull/3099/files
Yes, This PR might fix the issue : )
I think the issue has changed a bit since the time it was introduced.
https://github.com/asyncapi/website/actions/runs/10913294253/job/30289538132
/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4
const *** Promise *** = require('node-fetch');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/website/website/node_modules/node-fetch/src/index.js from /home/runner/work/website/website/scripts/dashboard/build-dashboard.js not supported.
Instead change the require of index.js in /home/runner/work/website/website/scripts/dashboard/build-dashboard.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4:21) ***
code: 'ERR_REQUIRE_ESM'
***
and will require a little more than simple juggling with cron jobs and retries.
I think the issue has changed a bit since the time it was introduced.
https://github.com/asyncapi/website/actions/runs/10913294253/job/30289538132
/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4 const *** Promise *** = require('node-fetch'); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/website/website/node_modules/node-fetch/src/index.js from /home/runner/work/website/website/scripts/dashboard/build-dashboard.js not supported. Instead change the require of index.js in /home/runner/work/website/website/scripts/dashboard/build-dashboard.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4:21) *** code: 'ERR_REQUIRE_ESM' ***
and will require a little more than simple juggling with cron jobs and retries.
Yes, exactly. The problem is with node-fetch package.
I think the issue has changed a bit since the time it was introduced.
https://github.com/asyncapi/website/actions/runs/10913294253/job/30289538132
/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4 const *** Promise *** = require('node-fetch'); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/website/website/node_modules/node-fetch/src/index.js from /home/runner/work/website/website/scripts/dashboard/build-dashboard.js not supported. Instead change the require of index.js in /home/runner/work/website/website/scripts/dashboard/build-dashboard.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4:21) *** code: 'ERR_REQUIRE_ESM' ***
and will require a little more than simple juggling with cron jobs and retries.
To give some context I made PR to fix this issues which happened first on the root of build-newsroom-videos.js but wasn't aware there other node fetch inside build-dashboard.js and made follow up PR but doesn't got merge since several month
I think the issue has changed a bit since the time it was introduced. https://github.com/asyncapi/website/actions/runs/10913294253/job/30289538132
/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4 const *** Promise *** = require('node-fetch'); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/website/website/node_modules/node-fetch/src/index.js from /home/runner/work/website/website/scripts/dashboard/build-dashboard.js not supported. Instead change the require of index.js in /home/runner/work/website/website/scripts/dashboard/build-dashboard.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (/home/runner/work/website/website/scripts/dashboard/build-dashboard.js:4:21) *** code: 'ERR_REQUIRE_ESM' ***
and will require a little more than simple juggling with cron jobs and retries.
Yes, exactly. The problem is with node-fetch package.
Here is fix. https://github.com/asyncapi/website/issues/2894#issuecomment-2353706914
I tested it in my local it is working fine but need to check in github actions environment.
Hey @aeworxet , I want to work on this issue as part of the Bounty program Q4. Do assign it to me.
@akshatnema is an AsyncAPI Maintainer specified in https://raw.githubusercontent.com/asyncapi/community/master/MAINTAINERS.yaml, so they fall under the first category in the prioritization list.
Complexity Level | Assignment Date (by GitHub) | Start Date (by BP Rules) | End Date (by BP Rules) | Draft PR Submission | Final PR Merge Start | Final PR Merge End |
---|---|---|---|---|---|---|
Medium | 2024-09-19 | 2024-10-07 | 2024-11-17 | 2024-10-20 | 2024-11-03 | 2024-11-17 |
@aeworxet There are two more GitHub issues that are subtly related to this one and still need to be done:
https://github.com/asyncapi/website/issues/3132 https://github.com/asyncapi/website/issues/3008
I would like to append them to this Bounty Issue and reclassify it to Advanced
.
Upon request of the AsyncAPI Maintainer, who is also the Bounty Program Participant (@akshatnema), the Complexity Level of this Bounty Issue was reclassified to Advanced
(upgraded) and its Timeline changed.
Complexity Level | Assignment Date (by GitHub) | Start Date (by BP Rules) | End Date (by BP Rules) | Draft PR Submission | Final PR Merge Start | Final PR Merge End |
---|---|---|---|---|---|---|
Advanced | 2024-09-19 | 2024-10-07 | 2024-12-01 | 2024-10-27 | 2024-11-17 | 2024-12-01 |
Changed this Bounty Issue into an Aggregated Bounty Issue https://github.com/asyncapi/website/issues/3247 that accumulates
in it, for the sake of accounting simplification.
Describe the bug.
We have a
build-dashboard.js
script in place that runs every midnight via the GitHub Actions Cron Job defined at https://github.com/asyncapi/website/actions/runs/8730442751/workflow#L7 along with 2 other scriptsbuild-meetings.js
andbuild-newsroom-videos.js
.The AsyncAPI bot then creates the PR with the resulting file changes.
There's some error in the script due to which we are reaching GitHub API limits too soon. The reported error is: https://github.com/asyncapi/website/actions/runs/8501984640/job/23285563590#step:6:54
Expected behavior
There must not be any such error. Either try to find an alternate method for replacing the failing code in
build-dashboard.js
or fix the existing approach.Screenshots
How to Reproduce
Check out the workflow runs here: https://github.com/asyncapi/website/actions/workflows/regenerate-meetings-and-videos.yml
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None