openresty / openresty/lua-nginx-module

test: CI test with DNS resolved feature is flaky

Open
#2,493 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

Nevertheless the PR only be modified the README.md doc, the CI is failed which completely unrelated to the changes.
https://github.com/openresty/lua-nginx-module/pull/2492

https://github.com/openresty/lua-nginx-module/actions/runs/23824388575/job/69443965578?pr=2492

#   Failed test 't/058-tcp-socket.t TEST 50: cosocket resolving aborted by coroutine yielding failures (require) - pattern "resolve name done" should match a line in error.log (req 0)'

058-tcp-socket.t is used an external DNS server which cause occasionally a communication failure
https://github.com/openresty/lua-nginx-module/blob/c81c9517034aa7868fc333df5d53af9c860056eb/t/058-tcp-socket.t#L13

Indeed it would be highly successful to be extended wait time but it cannot be solved fundamentally.
https://github.com/openresty/lua-nginx-module/blob/c81c9517034aa7868fc333df5d53af9c860056eb/t/058-tcp-socket.t#L3087

How can we solved it?

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

Start with t/058-tcp-socket.t, especially the external DNS setup near line 13 and the wait-time logic near line 3087. Reproduce the CI failure from the linked run and trace test 50's expectation for "resolve name done" in error.log; done means the test no longer fails intermittently when DNS communication is delayed or unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx
Domain
ci-cd, networking, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.