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

TypeError for src/cli/gcMonitors @ Publish stage of deploy #37

Open
DieselJS opened this issue May 6, 2021 · 8 comments
Open

TypeError for src/cli/gcMonitors @ Publish stage of deploy #37

DieselJS opened this issue May 6, 2021 · 8 comments

Comments

@DieselJS
Copy link

DieselJS commented May 6, 2021

$ node ./src/cli/gcMonitors.js
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at /github/workspace/src/cli/gcMonitors.js:67:12
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

image

Line 67:
image

Doesn't actually upload to workers, left with the default template from Cloudflare.

@DieselJS
Copy link
Author

DieselJS commented May 6, 2021

Well, actually it appears the webhooks are working? Yet going to the actual URL still returns the data from the template.
image

@eidam
Copy link
Owner

eidam commented May 6, 2021

Well, actually it appears the webhooks are working? Yet going to the actual URL still returns the data from the template.
image

What template do you mean? The new Workers one?

@eidam
Copy link
Owner

eidam commented May 6, 2021

The last step of deployment should not affect upload of the Workers code. Do you mind sharing the forked repository/failed GitHub actions link?

@DieselJS
Copy link
Author

DieselJS commented May 7, 2021

What template do you mean? The new Workers one?

Yes, the worker's Quick Edit shows the default file & going to the URL returns its data.

The last step of deployment should not affect upload of the Workers code. Do you mind sharing the forked repository/failed GitHub actions link?

OH, I didn't realise that it actually created a new worker under the name value in wrangler.toml (which was different by a single character - why I didn't spot it) and that it added -production to the URL as well. Everything seems to be working, thank you!

@eidam
Copy link
Owner

eidam commented May 7, 2021

Happy to hear it works! I will def take a look at the error, it's confusing at least. :)

@DieselJS
Copy link
Author

DieselJS commented May 7, 2021

Thanks!

The next thing is that I added another monitor - it was added to the status page, then I removed it from the config. However, it doesn't show up anymore, but its results are still counted in the KV and on the webpage. If that monitor goes offline, it will say that not all systems are online, yet the 3 other monitors all show green, there isn't a non-operational one. Any ideas?
Oh, and when I removed the monitor from the config, it was still present in the KV storage.

@DieselJS
Copy link
Author

DieselJS commented May 7, 2021

However, it doesn't show up anymore

Oh my god, forget this as well - it literally just appeared.

Forgive my stupidity :)

I'll leave this open for the time being.

@eidam
Copy link
Owner

eidam commented May 7, 2021

The gcMonitors script should take care of cleaning up the state, seems like this part is broken.

Oh, and when I removed the monitor from the config, it was still present in the KV storage.

That is because KV storage is eventually consistent, your changes are being re-pushed by the CRON trigger. Your changes take up to 1 minute to propagate, however, the CRON trigger reads/writes the state every minute from a different location, so it will most probably be just rewriting your state.

If you want to manually fix the state, pause your CRON trigger, update the state, wait a couple of minutes, and then reenable the CRON trigger. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants