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

[#2129] make evm and cask setup more reliable in travis #2139

Merged

Conversation

gonewest818
Copy link
Contributor

Resolves [#2129] with new scripts to setup evm and cask in Travis builds.

These scripts improve on the prior process by adding error detection with
retries, such that network errors during this setup stage are less likely to
abort the build with mysterious errors.

In addition to the retry logic, we also cache the installations of evm and cask
such that the contents of those directories are restored across successful
builds. This eliminates the requirement to install evm and cask from scratch. It
is possible to force-delete these caches if needed.

The net result of all this is, most incremental builds need only attempt to
update evm and cask (essentially a git pull) and update any needed elisp
packages via cask update.


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • [n/a] You've added tests (if possible) to cover your change(s)
  • All tests are passing (make test)
  • [n/a] The new code is not generating bytecode or M-x checkdoc warnings
  • [n/a] You've updated the changelog (if adding/changing user-visible functionality)
  • [n/a] You've updated the readme (if adding/changing user-visible functionality)
  • [n/a] You've updated the refcard (if you made changes to the commands listed there)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its
manual
extremely useful.

Resolves [clojure-emacs#2129] with new scripts to setup evm and cask in Travis builds.

These scripts improve on the prior process by adding error detection with
retries, such that network errors during this setup stage are less likely to
abort the build with mysterious errors.

In addition to the retry logic, we also cache the installations of evm and cask
such that the contents of those directories are restored across successful
builds. This eliminates the requirement to install evm and cask from scratch. It
is possible to force-delete these caches if needed.

The net result of all this is, most incremental builds need only attempt to
update evm and cask (essentially a git pull) and update any needed elisp
packages via cask update.
@gonewest818 gonewest818 force-pushed the 2129-bootstrap-evm-and-cask branch from 38126a6 to 34f1a6c Compare December 14, 2017 17:33
@gonewest818
Copy link
Contributor Author

by the way, you have probably been ignoring travis because it's been so broken, but I want to brag about the fact the build errors on this branch are now all completely legitimate issues to be dealt with.

@xiongtx
Copy link
Member

xiongtx commented Dec 14, 2017

Can you explain why we need this retry logic? I recall (a long time ago in a galaxy far far away) that CI used to work reliably without this. Is the problem w/ @travis-ci, EVM, or Cask?

@gonewest818
Copy link
Contributor Author

gonewest818 commented Dec 14, 2017 via email

@gonewest818
Copy link
Contributor Author

Here's a concrete example from the build https://travis-ci.org/clojure-emacs/cider/jobs/316281526

At the tail of the log it says:

Symbol's value as variable is void: -
Cask could not be bootstrapped. Try again later, or report an issue at https://github.com/cask/cask/issues
The command "curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh" failed and exited with 1 during .

And a little ways before that in the log it says:

Compiling /home/travis/.emacs.d/.cask/24.3/bootstrap/commander-20140120.1052/commander.el...

In toplevel form:
commander.el:512:1:Warning: reference to free variable `-'
commander.el:512:3:Warning: reference to free variable `Peer'
commander.el:512:8:Warning: reference to free variable `has'
commander.el:512:12:Warning: reference to free variable `closed'
commander.el:512:19:Warning: reference to free variable `the'
commander.el:512:23:Warning: reference to free variable `GnuTLS'
commander.el:512:30:Warning: reference to free variable `connection'
Wrote /home/travis/.emacs.d/.cask/24.3/bootstrap/commander-20140120.1052/commander.elc

Which is sort of amusing if it weren't so annoying.

Does Travis need to fix their infrastructure? Should the underlying emacs packaging system prevent this this sort of file corruption? Should cask be more resilient? Should every project need to patch over this in the way I did? Yes, yes, maybe and definitely no.

Should cask be thrown out because of this? Up to you, but this gives you reliable builds while you sort out your desired strategy for this.

@xiongtx
Copy link
Member

xiongtx commented Dec 15, 2017

commander.el:512:1:Warning: reference to free variable `-'
commander.el:512:3:Warning: reference to free variable `Peer'
commander.el:512:8:Warning: reference to free variable `has'
commander.el:512:12:Warning: reference to free variable `closed'
commander.el:512:19:Warning: reference to free variable `the'
commander.el:512:23:Warning: reference to free variable `GnuTLS'
commander.el:512:30:Warning: reference to free variable `connection'

It seems the problem is still w/ GnuTLS? Is the closed connection a problem w/ @travis-ci? Does it happen every time?

@gonewest818
Copy link
Contributor Author

gonewest818 commented Dec 15, 2017 via email

@bbatsov bbatsov merged commit 0bd67b7 into clojure-emacs:master Dec 15, 2017
@bbatsov
Copy link
Member

bbatsov commented Dec 15, 2017

Should cask be thrown out because of this? Up to you, but this gives you reliable builds while you sort out your desired strategy for this.

Likely yes. As I said - the project is mostly abandonware at this point and betting on it, doesn't seem particularly wise. Anyways, I appreciate every step in the direction of stable CI builds!

Thanks for working on this!

@gonewest818 gonewest818 deleted the 2129-bootstrap-evm-and-cask branch February 1, 2018 23:04
dickmao added a commit to dickmao/emacs-ipython-notebook-1 that referenced this pull request Sep 23, 2018
dickmao added a commit to dickmao/emacs-ipython-notebook that referenced this pull request Sep 27, 2018
dickmao added a commit to dickmao/emacs-ipython-notebook that referenced this pull request Sep 30, 2018
dickmao added a commit to dickmao/emacs-ipython-notebook that referenced this pull request Sep 30, 2018
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.

3 participants