-
Notifications
You must be signed in to change notification settings - Fork 119
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
Bot failing to start: TypeError: glob.sync is not a function
#376
Comments
glob@9 no longer exports `sync()`. Fixes: #376 Refs: isaacs/node-glob#493
PR (untested): #377 |
glob@9 no longer exports `sync()`. Fixes: #376 Refs: isaacs/node-glob#493 Refs: #372
bot still fails to start. Now getting: Mar 7 17:15:12 infra-rackspace-debian8-x64-1 systemd[1]: Starting github-bot...
Mar 7 17:15:12 infra-rackspace-debian8-x64-1 systemd[1]: Started github-bot.
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: {"name":"bot","hostname":"infra-rackspace-debian8-x64-1","pid":1969,"level":30,"msg":"Loading: scripts/ping.js","time":"2023-03-07T17:15:13.365Z","v":0}
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: internal/modules/cjs/loader.js:883
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: throw err;
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: ^
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: Error: Cannot find module 'scripts/ping.js'
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: Require stack:
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: - /home/iojs/github-bot/server.js
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Function.Module._load (internal/modules/cjs/loader.js:725:27)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Module.require (internal/modules/cjs/loader.js:952:19)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at require (internal/modules/cjs/helpers.js:88:18)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at /home/iojs/github-bot/server.js:15:3
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Array.forEach (<anonymous>)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Object.<anonymous> (/home/iojs/github-bot/server.js:13:25)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Module._compile (internal/modules/cjs/loader.js:1063:30)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: at Module.load (internal/modules/cjs/loader.js:928:32) {
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: code: 'MODULE_NOT_FOUND',
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: requireStack: [ '/home/iojs/github-bot/server.js' ]
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 node[1969]: }
Mar 7 17:15:13 infra-rackspace-debian8-x64-1 systemd[1]: github-bot.service: main process exited, code=exited, status=1/FAILURE |
I'm guessing we're somehow being affected by
(https://github.com/isaacs/node-glob/blob/main/changelog.md#performance-and-algorithm-changes) Lines 9 to 16 in 7f2b20b
|
This comment was marked as outdated.
This comment was marked as outdated.
(A test that just ran |
I'm speculating that we're no longer getting paths prefixed with |
Indeed, this fixes it: diff --git a/server.js b/server.js
index b3aa5b6..db7a7a9 100644
--- a/server.js
+++ b/server.js
@@ -12,7 +12,7 @@ const { app, events } = require('./app')
// load all the files in the scripts folder
globSync(scriptsToLoad).forEach((file) => {
logger.info('Loading:', file)
- require(file)(app, events)
+ require(`./${file}`)(app, events)
})
app.listen(port, () => { |
Ah, there's a new |
Bot has started with #378 |
@tniessen reports that Jenkins status is still not being posted to pull requests.
Looking at https://ci.nodejs.org/job/post-build-status-update runs, e.g. https://ci.nodejs.org/job/post-build-status-update/1837783/flowGraphTable/, I can see that although the jobs are green, the HTTP request to the bot has failed:
https://ci.nodejs.org/job/post-build-status-update/1837783/execution/node/17/
hudson.AbortException: Fail: Status code 408 is not in the accepted range: 100:399
If I log into the server for the github-bot, I can see that the service isn't running:
and from the syslog:
The text was updated successfully, but these errors were encountered: