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

Align all usages of Jackson to be 2.14.0 #91725

Closed
wants to merge 4 commits into from

Conversation

jakelandis
Copy link
Contributor

related: #90553


Note - I do not plan to back port this to 7.x since #90553 was not back ported and am not confident such a large upgrade across the board for 7.x is wise.

@jakelandis jakelandis added the WIP label Nov 18, 2022
@jakelandis jakelandis added >upgrade :Core/Infra/REST API REST infrastructure and utilities and removed WIP labels Nov 18, 2022
@elasticsearchmachine
Copy link
Collaborator

Hi @jakelandis, I've created a changelog YAML for you.

@jakelandis jakelandis marked this pull request as ready for review November 18, 2022 21:35
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Nov 18, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@jakelandis
Copy link
Contributor Author

jakelandis commented Nov 18, 2022

@ChrisHegarty can you take a quick look for anything I may have missed specific to 2.14.0 ?
@rjernst - IIRC there is some history around difficulty upgrading this dependency, can you take a quick look to see if I missed any gotcha's ?
@original-brownbear - can you help to verify the repository dependency upgrade ?

@jakelandis
Copy link
Contributor Author

@elasticsearchmachine run elasticsearch-ci/part-1

@jakelandis
Copy link
Contributor Author

I don't get what is going on with CI ... the first run was success, the second run had a few failures due dependency verification issues ( due to no longer listing multiple elder versions hashes), the third run had a single failure. None of the failures will reproduce locally.

@elasticsearchmachine run elasticsearch-ci/part-1

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.

In general I think we should be moving away from this global version declaration style. It makes upgrading very difficult, mostly because of third party libs that often have complicated reasons they can't be upgraded. We should upgrade simple uses aggressively (eg x-content, where it matters most for security), and 3rd party libs as necessary/possible.

@@ -10,15 +10,13 @@ apply plugin: 'elasticsearch.java'

archivesBaseName = "x-content-impl"

String jacksonVersion = "2.14.0"
Copy link
Member

Choose a reason for hiding this comment

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

We had decoupled this specifically so that we don't need to upgrade all version Jackson in parallel. Often is is easier to upgrade x-content here (since it is direct use), but for difficult to upgrade 3rd party libs that depend on it (eg azure). I think we should keep this as specified separately from the "global" version (and I'm not sure we should have the global version anymore, we should just be pulling in the version 3rd party libs depend on unless there is a reason to force it higher).

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed - my preference is to retain this x-content specific version. The ability to upgrade the version of Jackson independent of other parts of the system is a feature here (not a bug).

@@ -27,8 +27,6 @@ versions << [
'azureCommon': '12.15.1',
'azureCore': '1.27.0',
'azureCoreHttpNetty': '1.11.9',
'azureJackson': '2.13.2',
'azureJacksonDatabind': '2.13.2.2',
Copy link
Member

Choose a reason for hiding this comment

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

There was a reason this had to be separate...but I don't remember what it was. Does 2.14.0 match what azure depends on, for databind as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

these artifacts depend oncom.fasterxml.jackson.dataformat » jackson-dataformat-xml 2.13.4
https://mvnrepository.com/artifact/com.azure/azure-storage-blob/12.20.1
https://mvnrepository.com/artifact/com.azure/azure-storage-common/12.19.1
however azure-core depends on
com.fasterxml.jackson.core » jackson-databind 2.13.4.2
com.fasterxml.jackson.dataformat » jackson-dataformat-xml 2.13.4
com.fasterxml.jackson.datatype » jackson-datatype-jsr310 2.13.4

@pgomulka
Copy link
Contributor

pgomulka commented Feb 1, 2023

@elasticmachine update branch

@elasticmachine
Copy link
Collaborator

merge conflict between base and head

@pgomulka
Copy link
Contributor

pgomulka commented Feb 2, 2023

I will close this PR and replace it with an upgrade to 2.14.2
#93438
the suggestions regarding x-content's jackson version and repository-azure plugin jackson version are applied

@pgomulka pgomulka closed this Feb 2, 2023
pgomulka added a commit that referenced this pull request Feb 7, 2023
upgrading jackson to be 2.14.2 everywhere except for the azure plugin which depends on

jackson-databind  in version 2.13.4.2
and

jackson-core 2.13.4
jackson-dataformat-xml 2.13.4
jackson-datatype-jsr310 2.13.4 
jackson-dataformat-xml 2.13.4
related: #90553
a replace PR for #91725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/REST API REST infrastructure and utilities Team:Core/Infra Meta label for core/infra team >upgrade v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants