Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Jul 9, 2019

What changes were proposed in this pull request?

Looks devtools 2.1.0 is released and then our AppVeyor users the latest one.
The problem is, they added testthat 2.1.1+ as its dependency - https://github.com/r-lib/devtools/blob/master/DESCRIPTION#L35

Usually it should remove and reinstall it properly when we install other packages; however, seems it's being failed in AppVeyor due to the previous installation for an unknown reason.

[00:01:41] > devtools::install_version('testthat', version = '1.0.2', repos='https://cloud.r-project.org/')
[00:01:44] Downloading package from url: https://cloud.r-project.org//src/contrib/Archive/testthat/testthat_1.0.2.tar.gz
...
[00:02:25] WARNING: moving package to final location failed, copying instead
[00:02:25] Warning in file.copy(instdir, dirname(final_instdir), recursive = TRUE,  :
[00:02:25]   problem copying c:\RLibrary\00LOCK-testthat\00new\testthat\libs\i386\testthat.dll to c:\RLibrary\testthat\libs\i386\testthat.dll: Permission denied
[00:02:25] ** testing if installed package can be loaded from final location
[00:02:25] *** arch - i386
[00:02:26] Error: package or namespace load failed for 'testthat' in FUN(X[[i]], ...):
[00:02:26]  no such symbol find_label_ in package c:/RLibrary/testthat/libs/i386/testthat.dll
[00:02:26] Error: loading failed
[00:02:26] Execution halted
[00:02:26] *** arch - x64
[00:02:26] ERROR: loading failed for 'i386'
[00:02:26] * removing 'c:/RLibrary/testthat'
[00:02:26] * restoring previous 'c:/RLibrary/testthat'
[00:02:26] Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
[00:02:26]   problem copying c:\RLibrary\00LOCK-testthat\testthat\libs\i386\testthat.dll to c:\RLibrary\testthat\libs\i386\testthat.dll: Permission denied
[00:02:26] Warning message:
[00:02:26] In i.p(...) :
[00:02:26]   installation of package 'C:/Users/appveyor/AppData/Local/Temp/1/RtmpIx25hi/remotes5743d4a9b1/testthat' had non-zero exit status

See https://ci.appveyor.com/project/ApacheSoftwareFoundation/spark/builds/25818746

Our SparkR testbed requires testthat 1.0.2 at most for the current status and devtools was installed at SPARK-22817 to pin the testthat version to 1.0.2

Therefore, this PR works around the current issue by directly installing from the archive instead, and don't use devtools.

 R -e "install.packages('https://cloud.r-project.org/src/contrib/Archive/testthat/testthat_1.0.2.tar.gz', repos=NULL, type='source')"

How was this patch tested?

AppVeyor will test.

@dongjoon-hyun
Copy link
Member

Thank you so much for working on this, @HyukjinKwon !

@HyukjinKwon
Copy link
Member Author

@felixcheung .. I think it's time to update our SparkR tests to use higher versions of testthat soon..

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

@HyukjinKwon
Copy link
Member Author

I am merging this. appveyor.yml doesn't affect anything in the PR builder's test run.

@HyukjinKwon
Copy link
Member Author

Merged to master. Let me merge this one only to master for now. It's rather a temp fix.

Thanks, @dongjoon-hyun

@SparkQA
Copy link

SparkQA commented Jul 9, 2019

Test build #107380 has finished for PR 25081 at commit 5b14e67.

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

@felixcheung
Copy link
Member

thanks!

definitely, it's a bit dated. I recalled trying to update it but the "new" testthat had changes to a method that we called into and so it broke that and I couldn't get it to work...

@HyukjinKwon
Copy link
Member Author

Yea .. I couldn't get it to work too .. Maybe it might need a bigger change to adopt to newer testthat hm hm ..

@AceHack
Copy link

AceHack commented Aug 31, 2019

FYI, this readme no longer works either
http://spark.apache.org/docs/latest/building-spark.html

Running R Tests
To run the SparkR tests you will need to install the knitr, rmarkdown, testthat, e1071 and survival packages first:

R -e "install.packages(c('knitr', 'rmarkdown', 'devtools', 'e1071', 'survival'), repos='http://cran.us.r-project.org')"
R -e "devtools::install_version('testthat', version = '1.0.2', repos='http://cran.us.r-project.org')"

@HyukjinKwon
Copy link
Member Author

Can you file a JIRA with showing the console output?

@HyukjinKwon HyukjinKwon deleted the SPARK-28309 branch March 3, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants