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

Run integration tests for PRs that change test/integration #9807

Merged
merged 3 commits into from Jun 9, 2017
Merged

Run integration tests for PRs that change test/integration #9807

merged 3 commits into from Jun 9, 2017

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented Jun 8, 2017

If you have to edit an integration test today, the workflow is to test your changes locally, run the PR through Travis (where integration tests are not run), and then merge it to master (where integration tests are run on all platforms), and then hope they pass.

This PR will run integration tests as part of the PR check for only those PRs that touch test/integration. While it may slightly slow down Travis runs for those PRs, it gives you test results before your changes hit master.

Looking at the history of test/integration, it appears that we only have a small handful of changes per week going into this directory, so I don't expect it to have a huge impact on the Travis queue.

A good compromise, methinks.

@rsimha rsimha self-assigned this Jun 8, 2017
@rsimha rsimha requested a review from erwinmombay June 8, 2017 21:44
@rsimha
Copy link
Contributor Author

rsimha commented Jun 8, 2017

/to @erwinmombay, who may know why we don't run integration tests for PRs today.

@jridgewell
Copy link
Contributor

They take forever, and it has (had?) the potential to leak our SauceLabs tokens.

@rsimha
Copy link
Contributor Author

rsimha commented Jun 8, 2017

The "forever" part is significantly better now than it used to be, with sharding, faster builds, etc. Here's an estimate on how much wall clock time this will add to a single PR round-trip:

From looking at the builds on https://travis-ci.org/ampproject/amphtml/pull_requests, a typical PR run that includes unit tests is split across two shards. The unit_tests shard takes about 15-20 mins, while the integration_tests shard returns almost immediately.

With this change, both shards will take about 15-20 minutes, so I expect a minimal effect on wall clock time. As for the concern about slowing down the whole Travis queue, I expect that only a small percentage of PRs actually touch test/integration, so the vast majority will still skip them.

I'll dig into the token secrecy to see if that's still an issue we should be concerned about.

@dreamofabear
Copy link

I think this relationship is unidirectional. Changes to almost anything in src/ should run integration tests. However, changes to test/integration should only run integration tests.

@rsimha
Copy link
Contributor Author

rsimha commented Jun 8, 2017

@choumx, I agree that that's what we should be doing. However, running them for all PRs will double the load on the Travis PR queue as things stand today. I figured this PR would alleviate the pain for those who are trying to fix master, without making a huge change to the Travis load.

@rsimha
Copy link
Contributor Author

rsimha commented Jun 8, 2017

@erwinmombay, this cannot be merged until the following things happen:

Will hold off until then.

@jridgewell
Copy link
Contributor

Those should be fixed now.

@jridgewell
Copy link
Contributor

Merging this so I can make master green. YOLO.

@jridgewell jridgewell merged commit 233c76e into ampproject:master Jun 9, 2017
alanorozco added a commit that referenced this pull request Jun 9, 2017
@rsimha
Copy link
Contributor Author

rsimha commented Jun 9, 2017

@jridgewell, this will block everyone else from merging PRs unrelated to the redness on master. Let me know if I can help with the master-greenification effort.

erwinmombay pushed a commit that referenced this pull request Jun 9, 2017
* Revert "Add a caches.json file that provides meta data about AMP Caches. (#9804)"

This reverts commit 55a3ac0.

* Revert "Fix flaky amp-animation test (#9817)"

This reverts commit 4a9cf91.

* Revert "Run integration tests for PRs that change `test/integration` (#9807)"

This reverts commit 233c76e.

* Revert "Finally, fix visState integration tests (#9806)"

This reverts commit 47f9191.

* Revert "add jwt plugin (#8672)"

This reverts commit a23cbd1.

* Revert "Add missing methods to AmpContext tests (#9682)"

This reverts commit 646f103.
@rsimha rsimha deleted the 2017-06-08-RunIntegrationTestsForSomePRs branch June 9, 2017 19:23
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

6 participants