Skip to content
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

scala / sbt 1.x support #9816

Closed
aryairani opened this issue Jun 28, 2018 · 13 comments
Closed

scala / sbt 1.x support #9816

aryairani opened this issue Jun 28, 2018 · 13 comments

Comments

@aryairani
Copy link

aryairani commented Jun 28, 2018

Travis CI uses paulp/sbt-extras as its sbt launcher.

sbt-extras versions before May 9, 2016 don't support sbt 1.x (they don't know the right URL to download updates from), and the version on Travis (dist: trusty) is from Aug 19, 2015.

Can you update the version on Travis CI?

@aryairani
Copy link
Author

aryairani commented Jun 29, 2018

I opened PRs at travis-ci/travis-build#1423 and travis-ci/travis-cookbooks#987; hoping this is the right procedure to see an updated version from within Travis CI.

@eed3si9n
Copy link

sbt 1 was working fine on Travis CI until recently. How did this regression happen?

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jul 24, 2018
This is a workaround for Travis CI is using an old cut of sbt-extras, which prevents the use of sbt 1 published on Maven Central.

Ref travis-ci/travis-ci#9816
@aryairani
Copy link
Author

sbt has a couple different places that it looks for jars depending on the sbt version requested. It's conceivable that sbt 1 jars were hosted at an old location as well as a new location but then were removed from the old location? And then maybe the regression happened because the old version of sbt-extras in the travis installation didn't know about the new location, and thus couldn't find anything. Just a guess.

@dwijnand
Copy link

No URLs have changed. Where has the regression happened? What was the trigger for this issue, at this time?

@aryairani
Copy link
Author

aryairani commented Jul 24, 2018

The version of sbt-extras I find in Travis CI's /usr/local/bin/sbt, which at the time of this writing is this version, tries to download unknown versions of sbt from:
http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/
which redirects to:
http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/
but sbt 1.x jars can't be found there.

More recent versions try to download unknown versions of sbt from:
http://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt-launch/
which redirects to:
http://dl.bintray.com/sbt/maven-releases/org/scala-sbt/sbt-launch/
and sbt 1.x jars can be found there.

I submitted this PR in the hopes of fixing it, but it hasn't been merged: https://github.com/travis-ci/travis-cookbooks/pull/987/files

I'm surprised to hear that it worked until recently, because if https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_sbt_extras/attributes/default.rb#L5 is indeed the source of the installed version of sbt-extras, it's been in place since 2015. My only other guess was that maybe the contents of dl.bintray.com had changed recently to trigger the regression.

@dwijnand
Copy link

Something doesn't add up in what you state.

Here's a counter-example from a small, semi-recent project. In February it quite happily downloaded the sbt 1.1.1 launcher jar:

Detected sbt version 1.1.1
Downloading sbt launcher for 1.1.1:
  From  http://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt-launch/1.1.1/sbt-launch.jar
    To  /home/travis/.sbt/launchers/1.1.1/sbt-launch.jar

https://travis-ci.org/dwijnand/sbt-reloadquick/builds/339788631

@aryairani
Copy link
Author

I don't know. In June, on our project, it wasn't happy.

Downloading sbt launcher for 1.1.2:
  From  http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/1.1.2/sbt-launch.jar
    To  /home/travis/.sbt/launchers/1.1.2/sbt-launch.jar
Download failed. Obtain the jar manually and place it at /home/travis/.sbt/launchers/1.1.2/sbt-launch.jar

https://travis-ci.org/unisonweb/unison/jobs/397374219#L2264-L2267

and it's no better today, please feel free to scrutinize this travis-ci debug session:

$ ssh mumUtJ5AWYhhTANhJzl2lcazN@ny2.tmate.io


Run individual commands; or execute configured build phases
with `travis_run_*` functions (e.g., `travis_run_before_install`).

For more information, consult https://docs.travis-ci.com/user/running-build-in-debug-mode/, or email support@travis-ci.com.

travis@...:~/build/unisonweb/unison$ which sbt
/usr/local/bin/sbt
travis@...:~/build/unisonweb/unison$ sha1sum /usr/local/bin/sbt
b121a92e463eb7f831ac3e90635915f85b02c9e8  /usr/local/bin/sbt
travis@...:~/build/unisonweb/unison$ grep org.scala-sbt /usr/local/bin/sbt                                                                                   
            *) echo "$sbt_launch_repo/org.scala-sbt/sbt-launch/$version/sbt-launch.jar" ;;
travis@...:~/build/unisonweb/unison$ cd /tmp
travis@...:/tmp$ mkdir project
travis@...:/tmp$ echo sbt.version=1.1.1 > project/build.properties
travis@...:/tmp$ sbt
Downloading sbt launcher for 1.1.1:
  From  http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/1.1.1/sbt-launch.jar
    To  /home/travis/.sbt/launchers/1.1.1/sbt-launch.jar
Download failed. Obtain the jar manually and place it at /home/travis/.sbt/launchers/1.1.1/sbt-launch.jar
travis@...:/tmp$ 

https://travis-ci.org/unisonweb/unison/jobs/407825021/config

If I download the latest manually, it works as expected:

travis@...:/tmp$ mkdir -p ~/.local/bin
travis@...:/tmp$ curl -Ls https://git.io/sbt > ~/.local/bin/sbt && chmod 0755 ~/.local/bin/sbt
travis@...:/tmp$ sha1sum ~/.local/bin/sbt
44026b6680f48f7cdc3a5c1c7aebda761ab54d51  /home/travis/.local/bin/sbt
travis@...:/tmp$ ~/.local/bin/sbt
Downloading sbt launcher for 1.1.1:
  From  http://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt-launch/1.1.1/sbt-launch.jar
    To  /home/travis/.sbt/launchers/1.1.1/sbt-launch.jar
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
Getting org.scala-sbt sbt 1.1.1  (this may take some time)...

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jul 25, 2018
This is a workaround for Travis CI is using an old cut of sbt-extras, which prevents the use of sbt 1 published on Maven Central.

Ref travis-ci/travis-ci#9816
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jul 25, 2018
This is a workaround for Travis CI is using an old cut of sbt-extras, which prevents the use of sbt 1 published on Maven Central.

Ref travis-ci/travis-ci#9816
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jul 25, 2018
This is a workaround for Travis CI is using an old cut of sbt-extras, which prevents the use of sbt 1 published on Maven Central.

Ref travis-ci/travis-ci#9816
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Jul 25, 2018
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Jul 25, 2018
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Jul 25, 2018
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jul 25, 2018
This is a workaround for Travis CI is using an old cut of sbt-extras, which prevents the use of sbt 1 published on Maven Central.

Ref travis-ci/travis-ci#9816
@stale
Copy link

stale bot commented Oct 23, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 7 days. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please respond before the issue is closed, or open a new one after. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Oct 23, 2018
@BanzaiMan
Copy link
Contributor

FYI: We fetch https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt at deployment time, and this file will be served by travis-build.

@stale stale bot removed the stale label Oct 23, 2018
@DrTorte
Copy link
Contributor

DrTorte commented Dec 5, 2018

Hello,

We're moving our community communications to the Travis CI Community Forum and will no longer be supporting GitHub issues. If this hasn't been solved, please go ahead and create a new thread on the Forum and we'll be better able to help you there. We're looking forward to seeing you there.

If you need support, you can reach our support team here: support@travis-ci.com.

Thanks and happy building!

@DrTorte DrTorte closed this as completed Dec 5, 2018
@eed3si9n
Copy link

eed3si9n commented Dec 6, 2018

I've started a thread Recurrent Scala build environment regression around sbt-extras (Download failed. Obtain the jar manually) on the forum.

eed3si9n added a commit to eed3si9n/jawn that referenced this issue Dec 6, 2018
eed3si9n added a commit to eed3si9n/jawn that referenced this issue Dec 6, 2018
eed3si9n added a commit to eed3si9n/jawn that referenced this issue Dec 6, 2018
eed3si9n added a commit to eed3si9n/jawn that referenced this issue Dec 6, 2018
eed3si9n added a commit to eed3si9n/jawn that referenced this issue Dec 16, 2018
@eed3si9n
Copy link

In case someone stumbles here because they can't resolve sbt 1.x, check your language, and make sure it says:

language: scala

I was missing language: scala, and my build fell back to language: ruby, which then included sbt-extras from dwijnand/sbt-extras@6ae480f from Sep 4, 2015 via travis-cookbooks.

@dwijnand
Copy link

If anyone knows how to remove or update the sbt-extras script in the base/ruby image, I'd be happy to do the work.

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

No branches or pull requests

5 participants