Skip to content

[Bugfix] Stabilize diffusion master_port precedence tests - #10

Closed
ShengDev wants to merge 575 commits into
mainfrom
cursor/stabilize-master-port-tests-1619
Closed

ShengDev wants to merge 575 commits into
mainfrom
cursor/stabilize-master-port-tests-1619

Conversation

@ShengDev

Copy link
Copy Markdown
Owner

Fixes vllm-project#9208.

Contributor intent (required human answers)

1. What outcome do you want to achieve?

Stop the READY CI flake in tests/diffusion/test_omni_diffusion_config_master_port.py::TestOmniDiffusionConfigMasterPort::test_master_port_env_takes_precedence_over_kwarg (AssertionError: assert 34510 == 34473 on Buildkite build 17710) and land that fix on upstream main.

2. What is the highest-leverage variable for that outcome?

Whether the equality assertion depends on a port from get_open_port() still being free when settle_port calls is_port_available. That window is a TOCTOU flake. The +37 step is the intended fallback, not a production bug.

3. How will this work move that variable?

Change only the unit test. Stub vllm_omni.diffusion.data.is_port_available so env precedence, an explicit port, the busy-port +37 step, and the default path are deterministic. Also stub test_default_master_port_is_available, which still re-bound a live port in the first version of vllm-project#9210. Leave OmniDiffusionConfig._resolve_master_port and settle_port unchanged.

4. Whose customer or user needs does this address, and what are those needs?

Contributors whose pull requests run the Simple · Engine&Entrypoints&Diffusion unit-test step. They need that step to fail only when master-port precedence is wrong, not when another process takes an unreserved ephemeral port.

Purpose

Before: the equality tests called get_open_port(), which binds a port and then releases it, and then required OmniDiffusionConfig.master_port to equal that value. settle_port checks availability again and, when the port is busy, adds 37. Buildkite build 17710 logged Port 34473 was unavailable, using port 34510 instead and failed assert 34510 == 34473 (34473 + 37 = 34510). test_default_master_port_is_available had the same window: it resolved a port and then bound it again.

After: those tests control vllm_omni.diffusion.data.is_port_available and assert the selected port. MASTER_PORT is not compared against a live bind, the kwarg is not consulted when the env var is set, a busy candidate steps by 37, and the default path accepts the first probed port. Production resolution is unchanged.

vllm-project#9210 used this stub and was closed without merge. This PR re-applies that approach and includes the default-path stub from the start. vllm-project#9215 is an open change to the same file and does not reference vllm-project#9208.

docs/design/module/diffusion/diffusion_runtime.md owns vllm_omni/diffusion/data.py and does not specify master-port selection. No user guide or example documents this path, so documentation is unchanged.

Test Plan

vLLM Version: 0.32.0 (CPU unit test; no GPU)

vLLM-Omni Commit: c9f15bc63 on cursor/stabilize-master-port-tests-1619 (base upstream 0278901f8)

Regression command:

pytest tests/diffusion/test_omni_diffusion_config_master_port.py -q

Test Result

Pending local pytest on this commit. GPU and the full Buildkite shard are out of scope: the diff is the unit test only.

AI assistance: Cursor Grok 4.7 drafted the test change from the closed vllm-project#9210 approach and this description. The production resolver was checked in vllm_omni/diffusion/data.py and left unchanged.

Open in Web Open in Cursor 

NumberWan and others added 30 commits October 9, 2026 05:41
… client (vllm-project#7997)

Signed-off-by: NumberWan <wantszkin2003@gmail.com>
Co-authored-by: NATURE <wzliu@connect.hku.hk>
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
…#8498)

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
…#8510)

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
Signed-off-by: Clodagh Walsh <clodaghwalsh17@gmail.com>
…oject#8670)

Signed-off-by: haic0 <149741444+haic0@users.noreply.github.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
vllm-project#8198)

Signed-off-by: MinhaoLi0318 <lminhao039@gmail.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: haic0 <149741444+haic0@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Co-authored-by: Tianyu Guo <guoty9@mail2.sysu.edu.cn>
…tions (vllm-project#8629)

Signed-off-by: MrlixiangWE <mrdanaer@gmail.com>
Co-authored-by: zijianc2 <157244773+zijianc2@users.noreply.github.com>
Co-authored-by: Yifan Tian <221685243+Sendoh-code@users.noreply.github.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Signed-off-by: Laceprndpm <laceprndpm.64@gmail.com>
Signed-off-by: Alessio Netti <26897207+AlessioNetti@users.noreply.github.com>
…llm-project#7599)

Signed-off-by: 武垚乐 <wuyaole@mininglamp.com>
Co-authored-by: 武垚乐 <wuyaole@mininglamp.com>
…roject#7632)

Signed-off-by: MrlixiangWE <mrdanaer@gmail.com>
Co-authored-by: zijianc2 <157244773+zijianc2@users.noreply.github.com>
Co-authored-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
…tation (vllm-project#8536)

Signed-off-by: BeatSeat <wendavid552@gmail.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
psv666 and others added 29 commits October 20, 2026 16:19
…project#9071)

Signed-off-by: psv666 <2693925048@qq.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
…llm-project#9045)

Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ench reproducibility switch (vllm-project#9077)

Signed-off-by: y-null <213026468+y-null@users.noreply.github.com>
Signed-off-by: y-null <y-null@users.noreply.github.com>
Co-authored-by: y-null <213026468+y-null@users.noreply.github.com>
Co-authored-by: y-null <y-null@users.noreply.github.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
…project#9079)

Signed-off-by: psv666 <150513104+psv666@users.noreply.github.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
…m-project#8957)

Signed-off-by: Alicia <115451386+congw729@users.noreply.github.com>
Co-authored-by: wangyu <53896905+yenuo26@users.noreply.github.com>
…session.update defaults (vllm-project#7996)

Signed-off-by: NumberWan <wantszkin2003@gmail.com>
Co-authored-by: NATURE <wzliu@connect.hku.hk>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Co-authored-by: wangyu <53896905+yenuo26@users.noreply.github.com>
Signed-off-by: wangyu <410167048@qq.com>
Signed-off-by: [Your Name] <your.email@example.com>
…sh speaking (vllm-project#8911)

Signed-off-by: Tianyao Wu <rayroy31@gmail.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Joshna-Medisetty <joshna.medisetty@intel.com>
Signed-off-by: Iryna Boiko <iboiko@habana.ai>
Co-authored-by: Iryna Boiko <iboiko@habana.ai>
Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
Signed-off-by: David Chen <530634352@qq.com>
…roject#9172)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Co-authored-by: amy-why-3459 <amy-why-3459@users.noreply.github.com>
…e video exceeds the judge context (vllm-project#9101)

Signed-off-by: kunkunblueberry <1833921874@qq.com>
Signed-off-by: natureofnature <wzliu@connect.hku.hk>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
…cannot break model inspection (vllm-project#9168)

Signed-off-by: y-null <y-null@users.noreply.github.com>
Co-authored-by: y-null <y-null@users.noreply.github.com>
…project#9119)

Signed-off-by: Yuanheng <jonathan.zhaoyh@gmail.com>
Signed-off-by: 禾波 <yangrunhe.yrh@antgroup.com>
Co-authored-by: 禾波 <yangrunhe.yrh@antgroup.com>
Co-authored-by: Co-Author runheyang <2591045161@qq.com>
Signed-off-by: yasong.wang <yasong.wang@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: wangyu <410167048@qq.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
…ct#9204)

Signed-off-by: mooncake2026 <284529637+mooncake2026@users.noreply.github.com>
Co-authored-by: mooncake2026 <284529637+mooncake2026@users.noreply.github.com>
Signed-off-by: SYLAR <125541396+lishunyang12@users.noreply.github.com>
…GPU (vllm-project#9160)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ssions (vllm-project#9175)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The MASTER_PORT precedence test took a port from get_open_port() and
then required settle_port to accept that same port. The probe does not
reserve the port, so when another process takes it settle_port steps
ahead by 37 and the equality assertion fails. That step is the intended
fallback.

Stub is_port_available for every test that asserts which port was
selected, including the default-port path that previously re-bound the
resolved port.

Fixes vllm-project#9208

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Sheng GAO <sheng.gao.dev@gmail.com>
@ShengDev ShengDev closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet