From 313b3c657664ef8ca1e3b6daa6575a0ad6a73d07 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Fri, 22 May 2015 13:24:46 +0200 Subject: [PATCH 1/2] Fix protocol change error when beta VFS server is broken --- plugins/c9.vfs.client/endpoint.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/c9.vfs.client/endpoint.js b/plugins/c9.vfs.client/endpoint.js index 6943c109..da3c445a 100644 --- a/plugins/c9.vfs.client/endpoint.js +++ b/plugins/c9.vfs.client/endpoint.js @@ -169,8 +169,11 @@ define(function(require, exports, module) { var servers = shuffleServers(version, vfsServers); // check for version - if (vfsServers.length && !servers.length) + if (vfsServers.length && !servers.length) { + if (region === "beta") + return callback(fatalError("Staging VFS server(s) not working", "reload")); return onProtocolChange(callback); + } var latestServer = 0; var foundServer = false; From 568b99a9ba38d288451d2720d921c5d12fbf9b51 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Fri, 22 May 2015 13:27:23 +0200 Subject: [PATCH 2/2] Add metric --- plugins/c9.vfs.client/endpoint.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/c9.vfs.client/endpoint.js b/plugins/c9.vfs.client/endpoint.js index da3c445a..9ff97c77 100644 --- a/plugins/c9.vfs.client/endpoint.js +++ b/plugins/c9.vfs.client/endpoint.js @@ -298,6 +298,7 @@ define(function(require, exports, module) { // I'm keeping this vague because we don't want users to blame // a "cloud9 update" for losing work deleteOldVfs(); + metrics.increment("vfs.failed.protocol_mismatch", 1, true); return callback(fatalError("Protocol change detected", "reload")); }