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

V3 - add warning when customers registers HttpClient using DI #7674

Merged
merged 6 commits into from
Oct 1, 2021

Conversation

madelinegordon
Copy link
Contributor

@madelinegordon madelinegordon commented Sep 16, 2021

Issue describing the changes in this PR

resolves part of #7585. Still need to implement v4 breaking change.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Non-breaking change for V3.

liliankasem
liliankasem previously approved these changes Sep 28, 2021
Copy link
Member

@brettsam brettsam left a comment

Choose a reason for hiding this comment

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

Just one tiny comment!

webJobsBuilder.Services.TryAddSingleton<HttpClient>(f =>
{
var loggerFactory = f.GetService<ILoggerFactory>();
loggerFactory.CreateLogger("Host.Startup").LogWarning("Using HttpClient as an injected dependency will not be supported in future versions of Azure Functions. Use IHttpClientFactory instead. See http://aka.ms/functions-httpclient-di for more information.");
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you use LogCategories.Startup constant instead?

- Updated Java Worker Version to [1.9.0](https://github.com/Azure/azure-functions-java-worker/releases/tag/1.9.0)


Copy link
Member

Choose a reason for hiding this comment

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

super nit: accidental extra line?

@madelinegordon madelinegordon merged commit 82b77a3 into dev Oct 1, 2021
@madelinegordon madelinegordon deleted the magordon/v3httpclientrefactor branch October 1, 2021 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants