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

🚑 Hotfix: Use chokidar to watch only for conf.yml changes #1496

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

Lissy93
Copy link
Owner

@Lissy93 Lissy93 commented Mar 4, 2024

🛠️ Build Changes 🛠️ Build Changes Medium Lissy93 /FIX/rebuild-loop → Lissy93/dashy Commits: 4 | Files Changed: 2 | Additions: 79 Unchecked Tasks Powered by Pull Request Badge

Category: Hotfix

Overview
Uses chokidar to watch only for when conf.yml changes.

Uses a custom script (here) to watch for changes (only in conf.yml), and trigger a rebuild. Includes comparing hash of previous file with current one to prevent successive changes, as well as a debounce limit of 5000ms, and some logging.

Issue Number #1494

New Vars N/A

Screenshot N/A

Code Quality Checklist (Please complete)

  • All changes are backwards compatible
  • All lint checks and tests are passing
  • There are no (new) build warnings or errors
  • (If a new config option is added) Attribute is outlined in the schema and documented
  • (If a new dependency is added) Package is essential, and has been checked out for security or performance
  • Bumps version, if new feature added

Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashy ❌ Failed (Inspect) Mar 4, 2024 9:30pm

@liss-bot
Copy link
Collaborator

liss-bot commented Mar 4, 2024

yarn.lock changes

Click to toggle table visibility
Name Status Previous Current
chokidar-cli ADDED - 3.0.0
lodash.throttle ADDED - 4.1.1

@Lissy93 Lissy93 added 🛠️ Build Changes [PR] Includes modifications to build, CI or actions 🚑 Hot Fix [ISSUE] Fixes critical issue, deploy asap labels Mar 4, 2024
Copy link

netlify bot commented Mar 4, 2024

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit 1470162
🔍 Latest deploy log https://app.netlify.com/sites/dashy-dev/deploys/65e63d5a7a3ceb00097383d3
😎 Deploy Preview https://deploy-preview-1496--dashy-dev.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 configuration.

@Lissy93 Lissy93 requested a review from CrazyWolf13 March 4, 2024 19:37
Copy link
Collaborator

@CrazyWolf13 CrazyWolf13 left a comment

Choose a reason for hiding this comment

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

Seems good to me for a hotfix, however with this all the problems like favicon, pages and so more, that should have been fixed with this release probably wouldn't be fixed anymore? Or only on a CT reboot.

@Lissy93
Copy link
Owner Author

Lissy93 commented Mar 4, 2024

Seems good to me for a hotfix, however with this all the problems like favicon, pages and so more, that should have been fixed with this release probably wouldn't be fixed anymore? Or only on a CT reboot.

They'll still be fixed. This just updates how the app is re-built when changes happen.

Previously it was rebuilding whenever there was any change. I guess that was the issue causing the loop. I tried using chokidar to watch only the conf.yml for changes. That seemed to work, but I don't like adding extra dependencies.

I've just written a script that watches config for changes, and triggers a re-build. Testing it now. But hopefully that removes the need for an extra dependency, while also fixing all the issues which needed a rebuild.

Testing atm.....

@CrazyWolf13
Copy link
Collaborator

CrazyWolf13 commented Mar 4, 2024

Seems good to me for a hotfix, however with this all the problems like favicon, pages and so more, that should have been fixed with this release probably wouldn't be fixed anymore? Or only on a CT reboot.

They'll still be fixed. This just updates how the app is re-built when changes happen.

Previously it was rebuilding whenever there was any change. I guess that was the issue causing the loop. I tried using chokidar to watch only the conf.yml for changes. That seemed to work, but I don't like adding extra dependencies.

Love that idea!

I've just written a script that watches config for changes, and triggers a re-build. Testing it now. But hopefully that removes the need for an extra dependency, while also fixing all the issues which needed a rebuild.

Quickly looked over it, looks very good!

Testing atm.....

👍

@Lissy93 Lissy93 merged commit 3c5531d into master Mar 4, 2024
10 checks passed
@Lissy93 Lissy93 deleted the FIX/rebuild-loop branch March 4, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ Build Changes [PR] Includes modifications to build, CI or actions 🚑 Hot Fix [ISSUE] Fixes critical issue, deploy asap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants