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

Differentiate base paths in repository integration tests #47284

Merged
merged 7 commits into from
Sep 30, 2019

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Sep 30, 2019

This commit change the repositories base paths used in Azure integration tests so that they don't conflict with each other when tests run in parallel on real Azure storage service.

Closes #47202

@tlrx tlrx added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.5.0 v7.4.1 labels Sep 30, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@tlrx tlrx changed the title Azure it Differentiate base paths in Azure repository integration tests Sep 30, 2019
@@ -88,7 +88,7 @@ task thirdPartyTest(type: Test) {
systemProperty 'test.azure.key', azureKey ? azureKey : ""
systemProperty 'test.azure.sas_token', azureSasToken ? azureSasToken : ""
systemProperty 'test.azure.container', azureContainer ? azureContainer : ""
systemProperty 'test.azure.base', azureBasePath ? azureBasePath : ""
systemProperty 'test.azure.base', (azureBasePath ? azureBasePath : "") + "_third_party_tests_" + project.testSeed
Copy link
Member

Choose a reason for hiding this comment

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

@tlrx thanks for this one!

I think technically this is the perfect fix in terms of stability. One problem we're creating here though is that we are leaking a bunch of blobs for each test run now.
Should we add some logic to delete the leaked folders maybe? (otherwise we force infra to deal with this somehow which will be tricky for them I think)

Copy link
Member

Choose a reason for hiding this comment

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

To avoid this issue for now: Maybe we can simply add a constant path here and another constant in the other build so we don't get interference between the test runs? We don't have to worry about different builds interfering with each other, infra makes sure that doesn't happen so that should be fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I wrongly assumed that the container/buckets were recreated on demand by some Infra task before running the tests.

I think we can easily keep the base_path with test seed for the 3rd party tests, as we can easily clean up the files when tearing down the test (similarly to what the test set up is already doing doing)

For the repository integration test, I'll go with adding a constant.

Copy link
Member

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM (assuming CI is happy too) :) Its retriever the 3rd party tests right away after merging this to make sure we're good here.

Copy link
Member

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

Seems CI is unhappy, that teardown doesn't work with HDFS repo for some reason.

@tlrx
Copy link
Member Author

tlrx commented Sep 30, 2019

@elasticmachine update branch

@tlrx
Copy link
Member Author

tlrx commented Sep 30, 2019

@original-brownbear I've updated to code to fix the HDFS test issue. I've also added changes for S3/GCS (will update title+desc when merging) alongside. Can you please have another look?

Copy link
Member

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM (if CI loves it :D), thanks @tlrx !

@tlrx tlrx merged commit 4c90ec6 into elastic:master Sep 30, 2019
@tlrx tlrx deleted the azure-it branch September 30, 2019 14:50
@tlrx
Copy link
Member Author

tlrx commented Sep 30, 2019

Thanks Armin!

@tlrx tlrx changed the title Differentiate base paths in Azure repository integration tests Differentiate base paths in repository integration tests Sep 30, 2019
tlrx added a commit that referenced this pull request Oct 1, 2019
…7300)

This commit change the repositories base paths used in Azure/S3/GCS
integration tests so that they don't conflict with each other when tests
 run in parallel on real storage services.

Closes #47202
@romseygeek
Copy link
Contributor

This just failed on 6.8 as well, can it be backported there?

https://gradle-enterprise.elastic.co/s/pdvqg6hefhjd6/

@tlrx
Copy link
Member Author

tlrx commented Oct 21, 2019

Thanks @romseygeek - I opened #48286

tlrx added a commit that referenced this pull request Oct 21, 2019
Abstract third party tests do not exist on 6.8 but we can still differentiate 
base paths in repository integration tests like we did for other branches.

Relates #47284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >test Issues or PRs that are addressing/adding tests v7.4.1 v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] AzureStorageCleanupThirdPartyTests.testCreateSnapshot failuire
5 participants