-
Notifications
You must be signed in to change notification settings - Fork 54
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
Binary update #250
Binary update #250
Conversation
Mac Os update
src/main/resources/com/mathworks/ci/RunMatlabBuildBuilder/config.jelly
Outdated
Show resolved
Hide resolved
<f:entry field="startupOptions" title="Startup Options: "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Startup Options" or "MATLAB Startup Options"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question for anywhere else in this submission. I can see both "MATLAB Startup Options" and "Startup Options".
@@ -0,0 +1,3 @@ | |||
<div> | |||
A space-separated list of MATLAB Startup Options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Startup Options -> startup options
@@ -0,0 +1,3 @@ | |||
<div> | |||
A space-separated list of MATLAB Startup Options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s o
@@ -0,0 +1,3 @@ | |||
<div> | |||
A space-separated list of MATLAB Startup Options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s o
@@ -0,0 +1,3 @@ | |||
<div> | |||
A space-separated list of MATLAB Startup Options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s o
<f:entry field="startupOptions" title="Startup Options: "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we use a colon in only a subset of titles. I can see both title="Startup Options: " and title="Startup Options".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I think that this was a mistake on my part. All of the builders use "Startup Options," and I tried to stick with the precedent in each of the files. For the *Steps, I thought I was going off of the precedent of "RunMatlabTestsStep" but I think I misrembered and changed "startupOptions: " into "Startup Options:". I'll get that fixed.
src/main/resources/com/mathworks/ci/RunMatlabTestsBuilder/config.jelly
Outdated
Show resolved
Hide resolved
Thank you Sam for including screenshots:
|
I don't know why but I can't respond direclty to your comment Houman. Those changes seem reasonable to me though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what exactly the startup options affect the workflow and should we include it. since we have included it it also then requires Doc update with examples. @mw-hrastega do you agree?
// Copy runner.bat for Windows platform in workspace. | ||
copyFileInWorkspace(MatlabBuilderConstants.BAT_RUNNER_SCRIPT, runnerScriptName, | ||
copyFileInWorkspace("win64\\run-matlab-command.exe", runnerName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally prefer static strings to be part of either properties or Constants just in cas they are changed in future, Its more manageable that way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think that this is a good suggestion. The part that makes me hesitate here is that we're already having to hardcode in the program name on lines 54, 57, and 69. I don't really like keeping that information in two separate places, since it means if the program name were to change it would be easy for a user to just change the constant name and miss the fact that there are also hardcoded instances.
I don't have a strong preference either way, it just feels a little bit odd to me to have a property in another file define one instance and a hardcoded string define another. There's also a slight readability sacrifice when future contributors have to cross reference between the file they're working on and the constants file but that's not a real issue in the long run.
Also I realize I left a line of code commented out, I'll update the pull request to remove that (and also probably condense lines 54 and 57 to be one line after the if block).
What are your thoughts @davidbuzinski?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion unless it's being used all over the code. I think it's basically just in 1 or 2 places right? I'm fine either way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, iirc that's the only place that specific property is used
src/main/resources/com/mathworks/ci/StartupOptions/help-startupOptions.html
Show resolved
Hide resolved
Just to double check that I understand what you mean, you would have a preference for only updating the Jenkins plugin to use |
…ns to reduce redundancy
Hi @sameagen-MW coud you just confirm if we consider all CR as resolved ? I got confused seeing few unresolved comments |
Yeah totally, I've gone and resolved all of the conversations that I think are totally finished. |
|
||
String binaryName; | ||
String runnerName = uniqueName + "/run-matlab-command"; | ||
if (kernelStream.toString("UTF-8").contains("Linux")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably fine, but I'm more used to special casing to mac and defaulting to Linux rather than visa versa. Not a huge deal though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it!
Updated plugin to use the
run-matlab-command
binary and added support for passing startup options through to MATLAB to maintain parity with cloud CI/CD platforms.I ended up adding
startupOptions
as an additional argument ongetProcessToRunMatlabCommand
because I preferred the mental model of handling them separately, but I also think that the options could be baked into the command as well if others prefer that implementation.Besides the small tweaks to support startup options, the primary change here is the artifacts that the pom downloads, and then some of the logic within
MatlabBuild
. Since there's now three option instead of two, I used a call touname
to differentiate between MacOS and Linux.