restatedev / restatedev/sdk-java

HTTP services on macOS warn generate a warning about missing Netty MacOSDnsServerAddressStreamProvider

Open
#176 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
60
Forks
17
PR merge metrics
No merged PRs in 30d

Description

We currently do not include a runtime dependency on Netty's macOS-specific DNS resolver package, which causes the following warning on startup:

2023-12-11 11:54:31 WARN   io.netty.resolver.dns.DnsServerAddressStreamProviders - Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'

This doesn't seem to be causing examples to break in an obvious way but there are probably cases where it is desirable to use the native resolver config.

We may address this by including something like the following in our examples' project Gradle config:

plugins {
  // ...
  id("com.google.osdetector") version "1.7.0"
}

dependencies {
  // ...

  if (osdetector.os == "osx") {
    runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.72.Final:osx-${osdetector.arch}")
  }
}  

Since ARM-architecture macOS is likely going to be a common development platform, we may wish to fix this purely to suppress the WARN noise even if it doesn't break anything.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the examples' project Gradle configuration and reproduce the Netty DNS resolver warning on macOS, including ARM-based systems. Compare the available macOS runtime dependency options and verify that the appropriate native resolver is present without affecting other platforms; done means startup no longer emits the warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.