mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-23 06:40:23 -07:00
Merge pull request #19 from m-cahill/m05-fix-opts-test
fix(M05): ensure config exists for test_opts_override
This commit is contained in:
commit
ae161cbb65
3 changed files with 109 additions and 1 deletions
|
|
@ -162,4 +162,21 @@ No failures. All jobs passed.
|
||||||
|-------|--------|--------|
|
|-------|--------|--------|
|
||||||
| Smoke Tests | 22876253113 | ✓ success |
|
| Smoke Tests | 22876253113 | ✓ success |
|
||||||
| Linter | 22876253091 | ✓ success |
|
| Linter | 22876253091 | ✓ success |
|
||||||
| Quality Tests | — | Pending (push to main) |
|
| Quality Tests | 22877674534 | ✗ failed (test_opts_override) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. Quality Run 1 — Post-Merge (22877674534)
|
||||||
|
|
||||||
|
**Status:** Failed
|
||||||
|
**Cause:** `test_opts_override.py` — 2 failures
|
||||||
|
|
||||||
|
### Failure
|
||||||
|
|
||||||
|
When `opts.load()` gets `FileNotFoundError` (no config.json), it sets `opts.data = {}`.
|
||||||
|
`temporary_opts` only applies overrides for keys in `opts.data`, so no overrides are applied and `samples_save` stays at its default (True).
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
Ensure a minimal config exists before loading webui so `opts.data` is populated.
|
||||||
|
Updated `test/conftest.py` `initialize` fixture to create `config.json` with `{"samples_save": True}` when missing.
|
||||||
|
|
|
||||||
79
docs/milestones/M05/M05_run2.md
Normal file
79
docs/milestones/M05/M05_run2.md
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
# M05 CI Run 2 — Fix: Config for test_opts_override
|
||||||
|
|
||||||
|
**Date:** 2026-03-09
|
||||||
|
**Branch:** m05-fix-opts-test
|
||||||
|
**PR:** #19
|
||||||
|
**Trigger:** pull_request (fix for Quality failure in Run 1)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Workflow Identity
|
||||||
|
|
||||||
|
| Workflow | Run ID | Trigger | Branch | Status |
|
||||||
|
|----------|--------|---------|--------|--------|
|
||||||
|
| Smoke Tests | 22877868495 | pull_request | m05-fix-opts-test | ✓ success |
|
||||||
|
| Linter | 22877868499 | pull_request | m05-fix-opts-test | ✓ success |
|
||||||
|
| Quality Tests | — | push to main | — | Pending (runs after merge) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Fix Context
|
||||||
|
|
||||||
|
| Item | Value |
|
||||||
|
|------|-------|
|
||||||
|
| Run type | Corrective (fix for Run 1 Quality failure) |
|
||||||
|
| Change | `test/conftest.py` — initialize fixture creates minimal config.json when missing |
|
||||||
|
| Cause addressed | opts.load() sets opts.data = {} on FileNotFoundError; temporary_opts only applies keys in opts.data |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Run 2 Results
|
||||||
|
|
||||||
|
### Smoke Tests (22877868495)
|
||||||
|
|
||||||
|
| Step | Result |
|
||||||
|
|------|--------|
|
||||||
|
| Verify repository | ✓ |
|
||||||
|
| Verify base branch | ✓ |
|
||||||
|
| Checkout, Setup, Install | ✓ |
|
||||||
|
| Create stub repositories | ✓ |
|
||||||
|
| Start test server | ✓ |
|
||||||
|
| **Run smoke tests** | **✓** |
|
||||||
|
| Kill test server | ✓ |
|
||||||
|
|
||||||
|
**Duration:** 2m38s
|
||||||
|
|
||||||
|
### Linter (22877868499)
|
||||||
|
|
||||||
|
| Job | Result |
|
||||||
|
|-----|--------|
|
||||||
|
| ruff | ✓ |
|
||||||
|
| eslint | ✓ |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Verdict
|
||||||
|
|
||||||
|
**Fix PR #19:** Smoke Tests ✓ | Linter ✓
|
||||||
|
|
||||||
|
**Quality Tests:** Will run on push to main after merge. Expected to pass with config fixture ensuring opts.data is populated.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Summary Table
|
||||||
|
|
||||||
|
| Check | Run ID | Result |
|
||||||
|
|-------|--------|--------|
|
||||||
|
| Smoke Tests | 22877868495 | ✓ success |
|
||||||
|
| Linter | 22877868499 | ✓ success |
|
||||||
|
| Quality Tests | — | Pending (post-merge) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Next Actions
|
||||||
|
|
||||||
|
| Action | Owner |
|
||||||
|
|--------|-------|
|
||||||
|
| Merge PR #19 | Human |
|
||||||
|
| Verify Quality run post-merge | Human/Cursor |
|
||||||
|
| Generate M05 closeout (summary, audit, ledger) | Cursor (after Quality green) |
|
||||||
|
|
@ -45,4 +45,16 @@ def mask_basic_image_base64() -> str:
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def initialize() -> None:
|
def initialize() -> None:
|
||||||
|
"""Load webui; ensure config exists so opts.data is populated for quality tests."""
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
from modules.shared_cmd_options import cmd_opts
|
||||||
|
|
||||||
|
config_path = cmd_opts.ui_settings_file
|
||||||
|
if not os.path.exists(config_path):
|
||||||
|
os.makedirs(os.path.dirname(config_path) or ".", exist_ok=True)
|
||||||
|
with open(config_path, "w", encoding="utf-8") as f:
|
||||||
|
json.dump({"samples_save": True}, f)
|
||||||
|
|
||||||
import webui # noqa: F401
|
import webui # noqa: F401
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue