Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dashboard improvement #1108

Merged
merged 7 commits into from
Nov 17, 2022
Merged

Conversation

KhudaDad414
Copy link
Member

Description

  • fixes the issue where the script removes already downloaded information in case it has issues parsing it.
  • adds a button for the contribution guide at the top.

@netlify
Copy link

netlify bot commented Nov 14, 2022

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4c15e35
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/6375854cd72c8d0009a2958b
😎 Deploy Preview https://deploy-preview-1108--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Nov 14, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 51
🟠 Accessibility 88
🟠 Best practices 83
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://deploy-preview-1108--asyncapi-website.netlify.app/

@derberg
Copy link
Member

derberg commented Nov 14, 2022

@KhudaDad414 logs are not happy with your change:

11:00:32 AM: ./dashboard.json
11:00:32 AM: Module parse failed: Unexpected token "}" (0x7D) in JSON at position 4346 while parsing near "...     }\n      ],\n    },\n    {\n      \"id\":..."

@KhudaDad414
Copy link
Member Author

@derberg Oh my log, a sneaky comma 🤦

@derberg derberg changed the title fix: dashboard improvement. fix: dashboard improvement Nov 16, 2022
@@ -142,7 +142,7 @@ async function start() {
]);
writeToFile({ hotDiscussions, goodFirstIssues });
} catch (e) {
writeToFile({ hotDiscussions: [], goodFirstIssues: [] });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question, why is the script getting errors on every 2nd-3rd iteration and catch block is implemented?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes GitHub API returns internal server error and sometimes it says that you have reached your temporary limit (even if there is points remaining for that hour.)

I couldn't figure out what exactly the problem was.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, we are making quite some API calls to gather data 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be possible that you are making multiple GET requests in a single second using the script, so it will exceed the Github API per second limit. You can better make the script sleep for 1-2 seconds if needed, to decrease the API calls in script per second.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this can be improved with simple delay or retry mechanism. Octokit had plugins for retry but for REST client, maybe they already have it for GraphQL.

Anyway I suggest ☝🏼 is solved as a followup because current bug is not nice and dashboard is empty again

@KhudaDad414
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 1a7bed8 into asyncapi:master Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants