nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.22k stars 1.46k forks source link

disable dnsclient because it is fragile #23728

Closed ringabout closed 1 week ago

ringabout commented 1 week ago
  Unhandled exception: /home/runner/work/Nim/Nim/pkgstemp/dnsclient/tests/test1.nim(28, 3) `rr.strings == @["dnsclient.nim"]`  [AssertionDefect]
  [FAILED] query TXT
  [OK] query MX
  [OK] query CNAME
  [OK] query SRV
  Error: execution of an external program failed: '/home/runner/work/Nim/Nim/pkgstemp/dnsclient/tests/test1'
         Tip: 2 messages have been suppressed, use --verbose to show them.
  tools.nim(36)            doCmd

      Error:  Execution failed with exit code 1
          ... Command: /home/runner/work/Nim/Nim/bin/nim c --noNimblePath -d:NimblePkgVersion=0.3.4 --hints:off -r --path:. /home/runner/work/Nim/Nim/pkgstemp/dnsclient/tests/test1 
ringabout commented 1 week ago

It sends queries to http://txt.example.huy.im/, which is quite suspious

test "query TXT":
  let resp = client.sendQuery("txt.example.huy.im", TXT)
  assert resp.answers[0].kind == TXT
  let rr = TXTRecord(resp.answers[0])
  assert rr.strings == @["dnsclient.nim"]
ringabout commented 1 week ago

cc @ba0f3

github-actions[bot] commented 1 week ago

Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from c58b6e8df895c2f7d3f56a2bb0ef9a778f7a4269

Hint: mm: orc; opt: speed; options: -d:release 178820 lines; 8.336s; 664.246MiB peakmem

ba0f3 commented 1 week ago

It sends queries to http://txt.example.huy.im/, which is quite suspious

test "query TXT":
  let resp = client.sendQuery("txt.example.huy.im", TXT)
  assert resp.answers[0].kind == TXT
  let rr = TXTRecord(resp.answers[0])
  assert rr.strings == @["dnsclient.nim"]

it does not send http request to http://txt.example.huy.im/, it asked for TXT record txt.example.huy.im via DNS protocol