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

Use 3rd party task to run integration tests on external service #56587

Merged
merged 8 commits into from
Jun 2, 2020

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented May 12, 2020

Today the Gradle check task is executed on CI by third party tests jobs in order to test the repository plugins using real external storage services.

When the snapshot clean up tool was released in 7.0, the new s3ThirdPartyTests and gcsThidPartyTests tasks were created so that CI can run both the repository plugins integration tests and the snapshot tool integration tests on external services. It seems that these tasks never really made it to CI though.

Today we'd like to also run the searchable snapshot integration tests on external storage services. A previous change on CI jobs that runs the check tasks of repository plugins and searchable snapshot module was introduced but it broke CI builds on branches older than 7.8 (see #56165) and @mark-vieira suggested to use a specific tasks for these tests.

This pull request:

  • adds a new azureThirdPartyTests task to the :plugins:repository-azure so that it runs the plugin's integration tests on Azure external service
  • changes the searchable snapshot Gradle project so that it executes its appropriate integration tests using the s3ThirdPartyTests, gcsThirdPartyTests and azureThirdPartyTests tasks.

The third party tests CI jobs will be modified to execute the appropriate *ThirdPartyTests.

This pull request will also be backported on the following branches:

Closes #56165

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label May 12, 2020
Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@rjernst
Copy link
Member

rjernst commented May 12, 2020

Thanks for working on fixing this @tlrx. I have a couple questions/suggestions:

  • Is the reason we can't just use thirdPartyTest naming because we have separate jobs in CI for each external service? eg we don't want a massive job that has creds for both azure and s3?
  • If the above is correct, why do we need to keep thirdPartyTest at all? Could we just rename it in each project appropriately instead of adding another task?
  • nit on naming: if we keep a separate task, I think it should be singular, as the rest of our test tasks are named

@mark-vieira
Copy link
Contributor

Is the reason we can't just use thirdPartyTest naming because we have separate jobs in CI for each external service? eg we don't want a massive job that has creds for both azure and s3?

Correct.

If the above is correct, why do we need to keep thirdPartyTest at all? Could we just rename it in each project appropriately instead of adding another task?

I think we can remove it. We don't have any CI jobs which run all third party tests and I'm not sure if folks ever do locally.

@tlrx
Copy link
Member Author

tlrx commented May 26, 2020

Thanks @rjernst and @mark-vieira. I updated this pull request to follow your suggestions: thirdPartyTest tasks have been removed in favor of s3ThirdPartyTest, azureThirdPartyTest and gcsThirdPartyTest tasks which execute repository plugins YAML REST tests along with *ThirdPartyTests single node integration tests.

I had to move things around and fold some QA projects back into the repository plugins to make the 3rd party tests run on fixtures and external services correctly. Other projects like searchable snapshots (and snapshot tool in 7.x branches) can declare their own s3ThirdPartyTest, azureThirdPartyTest and gcsThirdPartyTest tasks.

I'll wait for this pull request to be validated before updating the CI jobs and other backport PRs.

@tlrx tlrx requested a review from original-brownbear May 26, 2020 08:55
@tlrx tlrx requested review from rjernst and mark-vieira May 26, 2020 08:55
Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

👍

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 from the snapshot side :)

@tlrx
Copy link
Member Author

tlrx commented May 28, 2020

@rjernst Are you OK with the latest changes?

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@tlrx tlrx merged commit d7b31a8 into elastic:master Jun 2, 2020
@tlrx
Copy link
Member Author

tlrx commented Jun 2, 2020

Thanks everybody!

@tlrx tlrx deleted the thirdpartytests branch June 2, 2020 07:40
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Jun 2, 2020
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Jun 2, 2020
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Jun 2, 2020
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Jun 2, 2020
tlrx added a commit that referenced this pull request Jun 2, 2020
tlrx added a commit that referenced this pull request Jun 2, 2020
tlrx added a commit that referenced this pull request Jun 2, 2020
tlrx added a commit that referenced this pull request Jun 2, 2020
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 Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v6.8.11 v7.6.3 v7.7.2 v7.8.1 v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Third part test builds failing due to missing task
9 participants