thesis / valkyrie

Valkyrie is our hubot. She guides your requirements to Valhalla, and shields the halls of Thesis.
https://valkyrie.thesis.co
Other
4 stars 5 forks source link

Changing zoom account setup can trigger Heimdall failures #100

Open Shadowfiend opened 5 years ago

Shadowfiend commented 5 years ago

Relevant flowdock discussion.

In this particular case, a user changed their login email from one address to another, and this started triggering 404s when hubot when to look up the old address's meeting info:

[Mon Aug 12 2019 17:30:55 GMT+0000 (Coordinated Universal Time)] ERROR Failed to fetch next available meeting: { Error: Request failed with status code 404 at createError (/hubot/node_modules/axios/lib/core/createError.js:16:15) at settle (/hubot/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/hubot/node_modules/axios/lib/adapters/http.js:237:11) at IncomingMessage.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1085:12) at process._tickCallback (internal/process/next_tick.js:63:19)

Further down, when looking at the actual 404 response:

User michael@foldapp.com not exist or not belong to this account.

Shadowfiend commented 5 years ago

I think our basic fix here is to update nextAvailableMeeting to use Promise.allSettled instead of Promise.all, and, if there are any failed users, refresh the users list and try again.

EDIT: On second thought, rather than refreshing and trying again, use the ones that worked, and also refresh the users list for future attempts?

kb0rg commented 4 years ago

There was another occurrence of this here -- in this case some old accounts were pruned but Heimdall didn't get the message.

Note we also realized, during that thread, that we're not making use of the UserType to filter pro accounts. May want to include that update in the fix for this issue. [EDIT: created issue #164 to address the UserType thing]