Page MenuHomePhabricator

Fix metrics dashboard
Closed, ResolvedPublic2 Estimated Story Points

Description

Currently seeing the following error:

Warning in readLines(file, warn = FALSE) :
  invalid input found on input connection '/vagrant/shiny-server/metrics/server.R'
Error in source(file, ..., keep.source = TRUE, encoding = checkEncoding(file)) : 
  /vagrant/shiny-server/metrics/server.R:277:43: unexpected INCOMPLETE_STRING
276:              } %>% {
277:                c(paste(.[1:2], collapse = "

This doesn't happen when I run the dash locally. Nor does it happen to @Ironholds. I suspect something funky is going on the vagrant side.

@Deskana, @EBernhardson and I (but mostly Erik who knows infinitely more about the inner workings of the new vagrant-based system) are looking into it.

Event Timeline

mpopov assigned this task to EBernhardson.
mpopov raised the priority of this task from to Unbreak Now!.
mpopov updated the task description. (Show Details)

I looked at the source file and it became almost immediatly obvious, the string it is complaining about contains non-ascii characters. So i did a quick check to see if R source files are UTF-8 encoded. This lead me to stackoverflow[1]. The summary seems to be that locale's need to be defined somewhere. I havn't had a chance yet to look into it further.

[1] http://stackoverflow.com/questions/5031630/how-to-source-r-file-saved-using-utf-8-encoding

Oh gods THAT old problem. If you load up an R instance on the machine you'll see the locale simply isn't being set - I think it's a C- or perl-side thing. Bah.

Ironholds edited a custom field.

Good job figuring it out, Erik. Okay, going to push a patch to remove the non-ascii chars.

Sorry I broke the dashboard with my typographic flair, y'all.

Change 237115 had a related patch set uploaded (by Bearloga):
Updated dashes hashes.

https://gerrit.wikimedia.org/r/237115

Change 237144 had a related patch set uploaded (by EBernhardson):
Force language settings for shiny-server daemon

https://gerrit.wikimedia.org/r/237144

Change 237144 merged by OliverKeyes:
Force language settings for shiny-server daemon

https://gerrit.wikimedia.org/r/237144