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

🏗 Switch from VMs to Container-based images on Travis (don't use sudo) (Redux) #15071

Closed
wants to merge 3 commits into from
Closed

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented May 3, 2018

This was explored last year in #9651, but we had to revert because builds and tests took longer on Container-based images.

Now that we no longer install Chrome, but use the chrome addon on Travis, and now that our builds and tests have significantly changed since last year, let's try once again and see how things go this time.

@rsimha rsimha self-assigned this May 3, 2018
@rsimha rsimha requested a review from taymonbeal May 3, 2018 22:36
@rsimha
Copy link
Contributor Author

rsimha commented May 3, 2018

/to @taymonbeal

Copy link
Member

@taymonbeal taymonbeal left a comment

Choose a reason for hiding this comment

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

Was the slowdown last time we tried this attributed to the time it took to copy Chrome into userspace? That surprises me, since it should have been just copying some files from the build cache.

I suppose it's worth a try if we're not sure.

@rsimha
Copy link
Contributor Author

rsimha commented May 3, 2018

@taymonbeal We reverted because the build and test steps slowed down greatly on container-based images, not because Chrome took longer to install.

I remembered this because we now use Travis' pre-installed Chrome, and figured it was worth another try since our builds and tests have changed significantly since last year.

@taymonbeal
Copy link
Member

Ah, so you think it might be faster this time for reasons unrelated to Chrome? Sure, let's find out.

@rsimha
Copy link
Contributor Author

rsimha commented May 3, 2018

Seems like slow performance on Travis docker images is a common problem.

I wonder if one of those issues contains a solution. Let's see once we have results.

@rsimha
Copy link
Contributor Author

rsimha commented May 4, 2018

Turns out that headless chrome isn't starting on container based images:

https://travis-ci.org/ampproject/amphtml/jobs/374642940#L1237
https://travis-ci.org/ampproject/amphtml/jobs/374642941#L666

Trying the suggestions in https://docs.travis-ci.com/user/chrome

@rsimha
Copy link
Contributor Author

rsimha commented May 4, 2018

Unfortunately, this is still slowing down gulp build from 4-5 mins to 6-7 minutes. I'd imagine gulp dist will be worse.
Before: https://travis-ci.org/ampproject/amphtml/jobs/374647546#L665
After: https://travis-ci.org/ampproject/amphtml/jobs/374642941#L659

Unless someone knows how to speed things up on docker images, this is probably a dead end.
/cc @erwinmombay @jridgewell

@rsimha rsimha closed this May 4, 2018
@rsimha
Copy link
Contributor Author

rsimha commented May 4, 2018

Found a typo in the previous fix. Trying again...

@rsimha rsimha reopened this May 4, 2018
@rsimha
Copy link
Contributor Author

rsimha commented May 4, 2018

Karma errors are fixed, but chrome is still crashing when run under Capybara / Ruby.

I've logged travis-ci/travis-ci#9568 to investigate.

@rsimha
Copy link
Contributor Author

rsimha commented May 4, 2018

/cc @timhaines in case you've encountered problems with Travis container images and know of a workaround to item 2 in travis-ci/travis-ci#9568

@aghassemi
Copy link
Contributor

ping @rsimha, please merge or close. Thanks.

@rsimha
Copy link
Contributor Author

rsimha commented May 30, 2018

Can't do either until the blocking issue is resolved.

@rsimha
Copy link
Contributor Author

rsimha commented Jun 29, 2018

This now works, but builds are slower, so it's not worth it. Closing PR.

@rsimha rsimha closed this Jun 29, 2018
@rsimha rsimha deleted the 2018-05-03-NoSudo branch June 29, 2018 05:46
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.

None yet

4 participants