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

Make Blackbird & Afterburner be dynamically added to the ObjectMapper #39689

Merged

Conversation

daphillips-ms
Copy link
Contributor

@daphillips-ms daphillips-ms commented Apr 12, 2024

...depending on Java version and existence in classpath

Description

We are using the Dropwizard framework which creates it's own ObjectMappers with this logic:
"If AfterburnerModule" is in the class path, then register it"
... however, Cosmos requires Afterburner to be in the classpath, as it depends on it. This leads to a bit of a conundrum for us.

This changes things such that Afterburner is only registered when it's in the classpath and < Java16, and secondly, Blackbird is loaded instead if > Java11, as it's the preferred way now.

Instead of the CosmosDB having a dependency on Afterburner and Blackbird, it now has an optional, runtime dependency.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Apr 12, 2024
Copy link

Thank you for your contribution @daphillips-ms! We will review the pull request and get back to you soon.

@daphillips-ms daphillips-ms changed the title Make Blackbird & Afterburner dynamically added to the ObjectMapper Make Blackbird & Afterburner be dynamically added to the ObjectMapper Apr 12, 2024
@daphillips-ms daphillips-ms force-pushed the daphillips/makeAfterburnerOptional branch 2 times, most recently from 2c2a044 to ae6d7de Compare April 12, 2024 22:06
@daphillips-ms daphillips-ms force-pushed the daphillips/makeAfterburnerOptional branch 5 times, most recently from 255f06e to 7be1d33 Compare April 13, 2024 05:06
@FabianMeiswinkel
Copy link
Member

/azp run java - cosmos - tests

…pending on Java version and existence in classpath
@daphillips-ms daphillips-ms force-pushed the daphillips/makeAfterburnerOptional branch from c2693d3 to ecc04e1 Compare April 18, 2024 18:47
@daphillips-ms
Copy link
Contributor Author

Rebased on the latest main. Added description line under 4.58.0 in CHANGELOG.md

@xinlian12
Copy link
Member

/azp run java - cosmos - spark

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member

Manually triggered test pipeline: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3712868&view=results

@xinlian12 xinlian12 merged commit 0d24969 into Azure:main Apr 19, 2024
38 checks passed
@daphillips-ms daphillips-ms deleted the daphillips/makeAfterburnerOptional branch April 22, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants