Skip to content

Travis: Improve on #74 - #66

Closed
jtimon wants to merge 1 commit into
cdecker:masterfrom
jtimon:travis-docker
Closed

Travis: Improve on #74 #66
jtimon wants to merge 1 commit into
cdecker:masterfrom
jtimon:travis-docker

Conversation

@jtimon

@jtimon jtimon commented Jul 27, 2019

Copy link
Copy Markdown
Contributor

Try to improve on top of #74

Comment thread .travis.yml
@@ -0,0 +1,5 @@
language: bash
services: docker

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Doesn't this require sudo as well? Otherwise you won't be able to talk to docker iirc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The problem doesn't seem to be related to that, but rather the build log being too long. It seems the log is too long. I tried separating the build and the run, but the run alone seeems to be too long.
I'm trying things on jtimon#11
See https://api.travis-ci.com/v3/job/220260237/log.txt for a failing log.

@jtimon

jtimon commented Jul 28, 2019

Copy link
Copy Markdown
Contributor Author

After some more "research" (ie after finding this link: https://blog.humphd.org/building-large-code-on-travis/ ), I launched my last try with jtimon#12 .
Hopefully this will surpass the 4 MB log limit like in the blog simply by throwing it into files.

But running the thing on my own laptop (an expensive one with 6 cores or 12 hyperthreads) I get:

============ 96 failed, 72 passed, 2 warnings in 7166.64 seconds ==============
python cli.py postprocess

Unfortunately 7166.64 seconds / 60 = 119.444 minutes and it has another limit of 50 minutes according to the article, which I'm about to confirm myself, I guess (waiting for https://travis-ci.com/jtimon/lightning-integration/builds/120987322 ).

I don't know if we can pay travis to lift that 50 min limit, but perhaps we can just include the travis file and leave it failing under the time goes under 50 mins, which is a good goal independently of travis, I think.

Selfishly I would like it to leverage multi-core functionality more as a priority, since I have even more cores in my desktop pc, but I don't know how much that can help with travis.

@jtimon

jtimon commented Jul 28, 2019

Copy link
Copy Markdown
Contributor Author

As expected, I got the error:

The job exceeded the maximum time limit for jobs, and has been terminated.

...which means we exceeded the above mentioned 50 min limit.
This is still the best I got, so I did squash and push it here.

Alternatives welcomed, but I think having travis failing after 50 mins or earlier if there's some earlier error is better than not having travis at all. We can always "optimization: fix travis for the first time" at a later PR, I think.

Or we can just leave this PR opened until some commit after it passes travis.

Thoughts?

@jtimon jtimon changed the title Tests: Add travis file testing the Dockerfile Tests: Add travis file testing the Dockerfile (fails after 50 min) Jul 28, 2019
@jtimon jtimon changed the title Tests: Add travis file testing the Dockerfile (fails after 50 min) Travis: Improve on #74 Jul 31, 2019
@jtimon

jtimon commented Jul 31, 2019

Copy link
Copy Markdown
Contributor Author

Rebased on top of #74 and added a couple of commits which will hopefully help clarify what I explained before. There are a few arbitrarily chosen values newly introduced that are arbitrarily changed in jtimon#2

Bikeshedding for arbitrary values welcomed, don't let me decide on that, please.
Removing arbitrary values by simplifying things is also fine.

@jtimon
jtimon force-pushed the travis-docker branch 2 times, most recently from 014f28d to 5cc034a Compare July 31, 2019 03:59
@jtimon jtimon closed this Aug 7, 2019
@jtimon
jtimon deleted the travis-docker branch August 7, 2019 08:01
@jtimon
jtimon restored the travis-docker branch August 7, 2019 08:03
@jtimon jtimon reopened this Aug 7, 2019
@jtimon

jtimon commented Aug 7, 2019

Copy link
Copy Markdown
Contributor Author

Rebased, but it doesn't seem to be triggering travis. I think you need to activate it for this repo.

@NicolasDorier

Copy link
Copy Markdown

I don't understand.
Normally docker run should not return until the command execute, and it should give you the exit code of the command if it fails. Why looping through logs like that?

@jtimon

jtimon commented Aug 9, 2019

Copy link
Copy Markdown
Contributor Author

The reason is travis times out after 50 minutes running. I should probably close it because it won't pass, but my initial approach is in #75

So this one isn't great, but, well if it doesn't pass running for, say, 10, 30 or 40 minutes, then it won't pass a full run either. so I consider this a strict improvement, even if it is possible that travis passes and you have still broke the build.

I'm honestly not sure what we should do, that's why I have both opened for now.
Any suggestions welcomed.

@NicolasDorier

Copy link
Copy Markdown

Why don't you just use timeout command to start docker run?

@jtimon

jtimon commented Aug 11, 2019 via email

Copy link
Copy Markdown
Contributor Author

@NicolasDorier

Copy link
Copy Markdown

if the command finish before the timeout no

@jtimon

jtimon commented Aug 12, 2019 via email

Copy link
Copy Markdown
Contributor Author

@NicolasDorier

Copy link
Copy Markdown

except exiting with 0 when it exits by timeout.

if it exit by timeout the return code is not 0.

@jtimon

jtimon commented Aug 12, 2019 via email

Copy link
Copy Markdown
Contributor Author

@cdecker

cdecker commented Aug 12, 2019

Copy link
Copy Markdown
Owner

Are you planning to run all tests on travis? In that case I'd suggest using the pytest-test-groups plugin to split the single run into multiple ones (test matrix) and run them slightly in parallel (pytest-xdist plugin) to make better use of the time we have.

c-lightning has a couple of configurations but they are grouped in groups of 3 that have the same params but test a different set of tests.

@jtimon

jtimon commented Aug 12, 2019 via email

Copy link
Copy Markdown
Contributor Author

@cdecker

cdecker commented Aug 15, 2019

Copy link
Copy Markdown
Owner

Not necessarily, you can run arbitrary commands through the docker image without having to modify the Dockerfile. You could for example have something like the following:

docker run lnintegration bash -c "make update clients; pytest test.py --test-group-count=10 --test-group=x"

and then simply vary the test group in the test matrix given to Travis CI. Though Travis not even managing to build the clients sort of precludes any further steps into that direction.

@jtimon

jtimon commented Aug 29, 2019

Copy link
Copy Markdown
Contributor Author

Oh, cool, I didn't know about the test groups, but it makes total sense for this.

Though Travis not even managing to build the clients sort of precludes any further steps into that direction.

Well, I think I could try building the clients by pairs and pass the subset of clients that it must test as an argument to test.py, no?

@jtimon

jtimon commented Aug 29, 2019

Copy link
Copy Markdown
Contributor Author

Closing in favor of #77 which seems better as a next step.

@jtimon jtimon closed this Aug 29, 2019
@jtimon
jtimon deleted the travis-docker branch August 29, 2019 14:39
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