Skip to content

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Oct 1, 2014

There are no way to check style of scripts.

@SparkQA
Copy link

SparkQA commented Oct 1, 2014

QA tests have started for PR 2612 at commit 1fe76a1.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 1, 2014

QA tests have finished for PR 2612 at commit 1fe76a1.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21102/

@pwendell
Copy link
Contributor

pwendell commented Oct 1, 2014

Does this actually cause an issue in practice? We run tests on windows for each release. I'm worried since most of us develop on mac/linux that this will end up in a weird state where there are mixed EOL characters.

@sarutak
Copy link
Member Author

sarutak commented Oct 1, 2014

I've not seen issues related to EOL characters in Spark yet but I saw issues in other projects. One of the cases is in Jenkins. https://issues.jenkins-ci.org/browse/JENKINS-7478

In Spark, we may not have issues like JENKINS-7478 but I'm afraid that we have unexpected problems caused by LF-only EOL. We cannot know what's happen when we use wrong EOL.

Do you mean you want to avoid both LF and CRLF are contained in one file right?
If so, how about introducing check script running at test?

@sarutak
Copy link
Member Author

sarutak commented Oct 2, 2014

@pwendell Actually, CRLF is already contained in compute-classpath.cmd so I think, we should unify CRLF or LF in *.cmd.

@tsudukim
Copy link
Contributor

tsudukim commented Oct 2, 2014

Generally, using LF as EOL character of *.cmd files may cause some troubles.
For example, when the *.cmd file includes LF and multibyte character, some characters of head of line might be removed internally for some reason. The problem @sarutak mentioned seems to be same as this.
In another case, "goto" may go to wrong place. This problem occured once in ruby-lang project. Their build script for Windows happened to be LF, and they faced "strange behaviour of cmd.exe".
https://bugs.ruby-lang.org/issues/10145

I know *.cmd with LF runs seemingly well in many cases, but sometimes cause inexplicable trouble because LF is defenetely not the proper EOL character of Windows *.cmd files.
So if possible, I think we should use CRLF as EOL to avoid such trouble.

@SparkQA
Copy link

SparkQA commented Oct 3, 2014

QA tests have started for PR 2612 at commit 91fb0fd.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 3, 2014

QA tests have finished for PR 2612 at commit 91fb0fd.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case e: Exception => logError("Source class " + classPath + " cannot be instantiated", e)

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21276/Test PASSed.

@nchammas
Copy link
Contributor

nchammas commented Oct 4, 2014

I'm worried since most of us develop on mac/linux that this will end up in a weird state where there are mixed EOL characters.

I'd worry about this, too. If one of us edits one of these files on a Mac, we might unknowingly recreate the issue this PR is trying to fix.

Does it make sense to add some kind of style check to dev/run-tests that validates that all .cmd files use Windows-style newlines? Perhaps a dev/lint-windows-cmd script that gets called from dev/run-tests?

@sarutak
Copy link
Member Author

sarutak commented Oct 5, 2014

Thanks @nchammas .
I added a basic script to check all of lines in *.cmd end with CRLF.

@SparkQA
Copy link

SparkQA commented Oct 5, 2014

QA tests have started for PR 2612 at commit c7f32d7.

  • This patch merges cleanly.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21307/Test FAILed.

@SparkQA
Copy link

SparkQA commented Oct 5, 2014

QA tests have started for PR 2612 at commit c2b5de1.

  • This patch merges cleanly.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21308/Test PASSed.

@SparkQA
Copy link

SparkQA commented Oct 5, 2014

QA tests have started for PR 2612 at commit 7ced891.

  • This patch merges cleanly.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21309/Test PASSed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21325/Test FAILed.

@sarutak
Copy link
Member Author

sarutak commented Oct 6, 2014

retest this please.

@SparkQA
Copy link

SparkQA commented Oct 6, 2014

QA tests have started for PR 2612 at commit 33376b1.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 6, 2014

QA tests have finished for PR 2612 at commit 33376b1.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21329/Test PASSed.

@SparkQA
Copy link

SparkQA commented Oct 8, 2014

QA tests have started for PR 2612 at commit d825d6b.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 8, 2014

QA tests have finished for PR 2612 at commit d825d6b.

  • This patch fails Script style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21479/Test FAILed.

@sarutak
Copy link
Member Author

sarutak commented Oct 8, 2014

I noticed .gitattributes should be merged before this PR otherwise the rules defined in .gitattributes doesn't applied.

@sarutak
Copy link
Member Author

sarutak commented Oct 8, 2014

@pwendell Because of the reason I mentioned above, I intend to split this PR (for .gitattributes and for style-checking).
How do you think?

@sarutak
Copy link
Member Author

sarutak commented Oct 9, 2014

@pwendell I've splitted the issue into this PR and #2726 .
#2726 is about EOL enforcement.
This PR is for script style checking.

@sarutak sarutak changed the title [SPARK-3758] [Windows] Wrong EOL character in *.cmd [SPARK-3758] Script style checking Oct 9, 2014
@SparkQA
Copy link

SparkQA commented Oct 9, 2014

QA tests have started for PR 2612 at commit 5f5fbdf.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 9, 2014

QA tests have finished for PR 2612 at commit 5f5fbdf.

  • This patch fails Script style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21513/Test FAILed.

@SparkQA
Copy link

SparkQA commented Oct 9, 2014

QA tests have started for PR 2612 at commit 41da277.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 9, 2014

QA tests have finished for PR 2612 at commit 41da277.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21517/Test PASSed.

@SparkQA
Copy link

SparkQA commented Oct 11, 2014

QA tests have started for PR 2612 at commit 894daf8.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 11, 2014

QA tests have finished for PR 2612 at commit 894daf8.

  • This patch fails Script style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21620/Test FAILed.

@SparkQA
Copy link

SparkQA commented Oct 11, 2014

QA tests have started for PR 2612 at commit 96a5a52.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 11, 2014

QA tests have finished for PR 2612 at commit 96a5a52.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21622/Test PASSed.

@pwendell
Copy link
Contributor

Given that no one seems super interested in this refactoring, I'll close this issue as a wontfix. If someone wants to come and revive it later, please feel free.

@sarutak
Copy link
Member Author

sarutak commented Jan 19, 2015

O.K, I'll close this PR for now.

@sarutak sarutak closed this Jan 19, 2015
@sarutak sarutak deleted the SPARK-3758 branch April 11, 2015 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants