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

Watcher crashes if there are no fragments or webhooks #138

Closed
alasdairtran opened this issue Aug 24, 2022 · 3 comments · Fixed by #140
Closed

Watcher crashes if there are no fragments or webhooks #138

alasdairtran opened this issue Aug 24, 2022 · 3 comments · Fixed by #140
Labels
bug Something isn't working

Comments

@alasdairtran
Copy link
Contributor

Bug description

A slightly annoying bug on newer wunderctl versions (I think starting from 0.98.0). If I don't have a .wundergraph/webhooks or .wundergraph/fragments directory, then the watcher crashes with error, e.g.:

error   Could not watch files   {"watcherName": "config-bundler", "error": "lstat /app/services/api/.wundergraph/webhooks: no such file or directory"}

and afterward, any change to .wundergraph will no longer trigger reload.

If I add a dummy fragment and webhook, then hot reload works again.

How to reproduce

  1. Open https://github.com/wundergraph/wundergraph-demo in Gitpod
  2. Update wunderctl to ^0.98.0
  3. Try changing a file in api/.wundergraph/operations
  4. Reload is no longer triggered.

Expected behavior

Hot reload should work in projects without any fragment or webhook.

WunderGraph information

Environment & setup

  • OS:
  • Go version:
  • Database:
  • Node.js version:

WunderCtl Version

Version: 0.99.1
Commit: cdeeda2095e9bf0f356b55a064e2a977db51b8bd
Date: 2022-08-18T19:44:12Z
BuiltBy: ci
@alasdairtran alasdairtran added the bug Something isn't working label Aug 24, 2022
@alasdairtran alasdairtran changed the title Watcher crashes if there's no fragments or webhooks Watcher crashes if there are no fragments or webhooks Aug 24, 2022
@jensneuse
Copy link
Member

Can you try 0.98.1?

@alasdairtran
Copy link
Contributor Author

It's the same error. I guess you might want to add a directory to the watch list only if it exists.

@StarpTech
Copy link
Collaborator

Hi @alasdairtran thanks for reporting. Will look into it and provide a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants