You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several GitHub Action workflows to build artifacts from this repository. For unknown reasons, they only work with
runs-on: ubuntu-<version or 'latest'>
On both macOS and windows, an error occurs when running ant -f build_ngchmApp.xml in the target create_server_app_dir. The code appears to be reading in file custom.js as a string, and crashes when it gets to the part of the string:
Because this part contains the substrings "images/" and ".png", the function CompilerUtilities.copyLineAndImages() attempts to copy a file "cbioportal_logo.png", which of course doesn't exist in our repo. Here is that function for quick reference:
publicstaticvoidcopyLineAndImages (Stringline, StringinputDir, StringoutputDir)
throwsException
{
if (line.contains("images/")) {
// Copy any images on line to output directory.Stringtoks[] = line.split(" ");
for (Stringtok : toks) {
if (tok.contains("images/")) {
intstart = tok.indexOf("images/");
intstop = tok.indexOf(".png");
StringfileName;
if (start < 0 || stop < 0) {
System.out.println ("Bad image string: '" + tok + "' on line " + line);
}
stop = stop + 4; // Stop at end of .pngfileName = tok.substring(start,stop);
if (!imageFiles.contains(fileName)) {
System.out.println("Copying image file " + fileName);
CompilerUtilities.copyFile (inputDir + "/" + fileName, outputDir + "/" + fileName)
imageFiles.add (fileName);
imageCounts.add (0);
}
intidx = imageFiles.indexOf(fileName);
imageCounts.set (idx, imageCounts.get (idx) + 1);
}
}
}
}
A few mysteries:
Why is the code even trying to read 'custom.js'? That was not the intent of the original authors.
Why does the issue occur on macOS and windows, but not on linux (tested on ubuntu and RedHat)?
As a stab in the dark, we wondered if updating the closure compiler jar file would address the issue. I tried updating from closure-compiler-v20200204.jar -> closure-compiler-v20230502.jar, and compiling with the required java 11. However the issue remains.
The text was updated successfully, but these errors were encountered:
In addition to the issues mentioned above, perhaps the code shouldn't be including anything with an image with an absolute URL?
Maybe
if (tok.contains("images/")) {
should be
if (tok.contains("images/") && !tok.startsWith("http")) {
I looked around an noticed that different people were having issues a recently with code sometimes not being run on ubuntu systems after some changes on github's side regarding which builds are being used for the runners. actions/runner-images#7733
Is there anything in our action that we can use to verify that that code is actually being run when we use the runs-on: ubuntu-<version or 'latest'> setting. Perhaps the code should be failing consistently for all systems, but it just isn't actually being run on the ubuntu system at all so therefore we don't get an error from it?
We have several GitHub Action workflows to build artifacts from this repository. For unknown reasons, they only work with
On both macOS and windows, an error occurs when running
ant -f build_ngchmApp.xml
in the targetcreate_server_app_dir
. The code appears to be reading in file custom.js as a string, and crashes when it gets to the part of the string:Because this part contains the substrings "images/" and ".png", the function
CompilerUtilities.copyLineAndImages()
attempts to copy a file "cbioportal_logo.png", which of course doesn't exist in our repo. Here is that function for quick reference:A few mysteries:
As a stab in the dark, we wondered if updating the closure compiler jar file would address the issue. I tried updating from
closure-compiler-v20200204.jar
->closure-compiler-v20230502.jar
, and compiling with the required java 11. However the issue remains.The text was updated successfully, but these errors were encountered: