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

Document how to test a dev version of a 3party dependency #78962

Merged

Conversation

breskeby
Copy link
Contributor

  • Introduce a FAQ section to BUILDING.MD
  • Provide three solutions to test and use a custom third party dependency
    in our elasticsearch build

- Introduce a FAQ section to BUILDING.MD
- Provide three solutions to test and use a custom third party dependency
in our elasticsearch build
@breskeby breskeby self-assigned this Oct 12, 2021
@breskeby breskeby added :Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0 labels Oct 12, 2021
@breskeby breskeby marked this pull request as ready for review October 12, 2021 08:06
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

BUILDING.md Outdated Show resolved Hide resolved
BUILDING.md Outdated Show resolved Hide resolved
BUILDING.md Outdated
flat directory repositories cannot be used to override artifacts with real meta-data from other repositories declared in the build.
For example, if Gradle finds only `jmxri-1.2.1.jar` in a flat directory repository, but `jmxri-1.2.1.pom` in another repository
that supports meta-data, it will use the second repository to provide the module.
For the use case of overriding remote artifacts with local ones consider using an Ivy or Maven repository instead whose URL points to a local directory.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to give an example of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tweaked the recommendation to use a version that is not public available yet. Setting up a manual ivy or maven repository would likely involve handcraft a custom ivy.xml or pom.xml file which is not recommended and likely causes more trouble :)

breskeby and others added 3 commits October 12, 2021 11:53
Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
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.

One comment, otherwise LGTM.

BUILDING.md Outdated
}
```

3. Update the dependency declaration of the artifact in question to match the custom build version.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we clarify here what that means? When using a flatDir repo the dependency notation is simply the jar name isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added some more details about that

@breskeby breskeby added auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport-and-merge Automatically create backport pull requests and merge when ready labels Oct 13, 2021
@elasticsearchmachine elasticsearchmachine merged commit 00c172e into elastic:master Oct 13, 2021
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Oct 13, 2021
)

* Document how to test a dev version of a 3party dependency

- Introduce a FAQ section to BUILDING.MD
- Provide three solutions to test and use a custom third party dependency
in our elasticsearch build

* Fix jitpack repo declaration

* Tweak formatting

* Apply review feedback

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>

* Apply further review feedback

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>

* Tweak recommendations for replacing a dependency

Apply review feedback

* Elaborate on dependency declaration to resolves jars from flat dir repositories

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
7.x

elasticsearchmachine pushed a commit that referenced this pull request Oct 13, 2021
…79040)

* Document how to test a dev version of a 3party dependency

- Introduce a FAQ section to BUILDING.MD
- Provide three solutions to test and use a custom third party dependency
in our elasticsearch build

* Fix jitpack repo declaration

* Tweak formatting

* Apply review feedback

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>

* Apply further review feedback

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>

* Tweak recommendations for replacing a dependency

Apply review feedback

* Elaborate on dependency declaration to resolves jars from flat dir repositories

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants