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 project dependency instead of substitutions for distributions #37730

Merged
merged 6 commits into from
Jan 24, 2019

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Jan 22, 2019

Currently integration tests which use either bwc snapshot versions or
the current version of elasticsearch depend on project substitutions to
link to the build of those artifacts. Likewise, vagrant tests use
dependency substitutions to get to bwc snapshots of rpm and debs.
This commit changes those to depend on the relevant project/configuration
and removes the dependency substitutions for distributions we do not
publish.

Currently integration tests which use either bwc snapshot versions or
the current version of elasticsearch depend on project substitutions to
link to the build of those artifacts. Likewise, vagrant tests use
dependency substitutions to get to bwc snapshots of rpm and debs.
This commit changes those to depend on the relevant project/configuration
and removes the dependency substitutions for distributions we do not
publish.
@rjernst rjernst added :Delivery/Build Build or test infrastructure v7.0.0 >refactoring labels Jan 22, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst rjernst requested a review from alpar-t January 22, 2019 22:34
Copy link
Contributor

@alpar-t alpar-t left a comment

Choose a reason for hiding this comment

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

This looks good to me, the only think I don't like about it is that we don't have a test to assure us we don't break it again for external plugin authors.

I'm wondering if given the complexity it adds is it worth downloading trough the download service, or would it be better to continue using our own maven repos.
If my understanding is correct that would not defeat your goals with this set of PRs.

This would help us keep the simplifying assumption that anything meant for external consumption is published as a maven artifact. That would mean we can fully utilize the simulated local repo in our tests to check that we correctly expose all artifacts meant for consumption and would allow us to avoid duplicating the logic to re-map the distributions to what was built locally - we could continue to use the substitutions as before.
Granted, tests would not download dependencies in the same way as users would, but we can cover that part as a check in the release process or a release test if we must that would only check that the artifacts are there in the download service and they match the ones in the maven repo.

@rjernst
Copy link
Member Author

rjernst commented Jan 23, 2019

would it be better to continue using our own maven repos

I don't like this because it means adding artifacts back to maven which don't really belong in maven. That is about jars, but these are our distributions.

@rjernst
Copy link
Member Author

rjernst commented Jan 23, 2019

we could continue to use the substitutions as before.

This won't work when we add classifiers. I found those simply do not work with project substitutions.

@rjernst
Copy link
Member Author

rjernst commented Jan 23, 2019

we don't have a test to assure us we don't break it again for external plugin authors

We do have a test, it is the example plugins tests you added! Those failing is what made me realize it was broken for plugin authors.

@alpar-t
Copy link
Contributor

alpar-t commented Jan 23, 2019

we don't have a test to assure us we don't break it again for external plugin authors

We do have a test, it is the example plugins tests you added! Those failing is what made me realize it was broken for plugin authors.

Maybe I'm missing something, but it seems the way we pass in the distributions to those tests circumvented part of the test, and it didn't catch the failure we observed in es-hadoop.
Maybe we could have something similar to maven publications to mark artifacts for uploads to the download service to have a similar mechanism as with the maven repos and jars. We would eventually use that to configure the release manager as well ( something still on my plate to do for jars, namely configure the release manager based on what jars are configured for publication in the build and making sure we only have publication for the ones we actually publish)

Copy link
Contributor

@alpar-t alpar-t left a comment

Choose a reason for hiding this comment

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

We had a discussion about the change and direction and I'm fine to merge this as is

@rjernst
Copy link
Member Author

rjernst commented Jan 24, 2019

@elasticmachine run elasticsearch-ci/2

@rjernst rjernst merged commit d9d13f3 into elastic:master Jan 24, 2019
@rjernst rjernst deleted the bundle_jdk6 branch January 24, 2019 07:41
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 24, 2019
* elastic/master:
  Optimize warning header de-duplication (elastic#37725)
  Bubble exceptions up in ClusterApplierService (elastic#37729)
  SQL: Improve handling of invalid args for PERCENTILE/PERCENTILE_RANK (elastic#37803)
  Remove unused ThreadBarrier class (elastic#37666)
  Add built-in user and role for code plugin (elastic#37030)
  Consolidate testclusters tests into a single project (elastic#37362)
  Fix docs for MappingUpdatedAction
  SQL: Introduce SQL DATE data type (elastic#37693)
  disabling bwc test while backporting elastic#37639
  Mute ClusterDisruptionIT testAckedIndexing
  Set acking timeout to 0 on dynamic mapping update (elastic#31140)
  Remove index audit output type (elastic#37707)
  Mute FollowerFailOverIT testReadRequestsReturnsLatestMappingVersion
  [ML] Increase close job timeout and lower the max number (elastic#37770)
  Remove Custom Listeners from SnapshotsService (elastic#37629)
  Use m_m_nodes from Zen1 master for Zen2 bootstrap (elastic#37701)
  Fix index filtering in follow info api. (elastic#37752)
  Use project dependency instead of substitutions for distributions (elastic#37730)
  Update authenticate to allow unknown fields (elastic#37713)
  Deprecate HLRC EmptyResponse used by security (elastic#37540)
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >refactoring Team:Delivery Meta label for Delivery team v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants