build(orchestrator): pin FastAPI runtime dependencies
This commit is contained in:
@@ -114,6 +114,7 @@ class TestVersionInputs(unittest.TestCase):
|
||||
'{"PYTHON_BASE_IMAGE": "python:pinned"}\n',
|
||||
)
|
||||
(root / "requirements.gateway.lock").write_text("mitmproxy==11.1.3\n")
|
||||
(root / "requirements.orchestrator.lock").write_text("fastapi==0.140.0\n")
|
||||
(root / "pyproject.toml").write_text("[project]\nname = 'bot-bottle'\n")
|
||||
|
||||
def test_pyproject_toml_change_bumps_version(self) -> None:
|
||||
@@ -165,6 +166,21 @@ class TestVersionInputs(unittest.TestCase):
|
||||
)
|
||||
self.assertNotEqual(before, after)
|
||||
|
||||
def test_orchestrator_lock_change_bumps_orchestrator_version(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
root = Path(d)
|
||||
self._fake_repo(root)
|
||||
before = ia.infra_artifact_version(
|
||||
"init", "orchestrator", repo_root=root,
|
||||
)
|
||||
(root / "requirements.orchestrator.lock").write_text(
|
||||
"fastapi==0.140.0 --hash=sha256:changed\n",
|
||||
)
|
||||
after = ia.infra_artifact_version(
|
||||
"init", "orchestrator", repo_root=root,
|
||||
)
|
||||
self.assertNotEqual(before, after)
|
||||
|
||||
def test_base_image_argument_change_bumps_both_role_versions(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
root = Path(d)
|
||||
|
||||
@@ -62,7 +62,10 @@ class TestWheelInstall(unittest.TestCase):
|
||||
|
||||
# Installing the freshly-built wheel must succeed — fail if it doesn't.
|
||||
install = subprocess.run(
|
||||
[str(cls.venv_py), "-m", "pip", "install", "--quiet", str(wheels[0])],
|
||||
[
|
||||
str(cls.venv_py), "-m", "pip", "install", "--quiet",
|
||||
"--force-reinstall", "--no-deps", str(wheels[0]),
|
||||
],
|
||||
capture_output=True, text=True, check=False,
|
||||
)
|
||||
if install.returncode != 0:
|
||||
|
||||
Reference in New Issue
Block a user