chore(trunk): fix the scheduled trunk check-all failures (#5141)

* chore(trunk): fix the scheduled trunk check-all failures

- Ignore hadolint DL3008 on the runtime stage apt-get, matching the
  emulator-download stage
- Build alias-search test ROMs with tests.factories.make_rom instead of
  the banned add_rom
- Drop a bandit B405 ignore that suppresses nothing
- Bump fast-uri to 3.1.8 for GHSA-hrr3-gc8f-f4qj

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(tests): type the alias-search rom helper kwargs as Any

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Georges-Antoine Assi
2026-10-05 08:05:38 -04:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 377405e514
commit ad0146a88e
4 changed files with 8 additions and 19 deletions
+1
View File
@@ -99,6 +99,7 @@ FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
# trunk-ignore(hadolint/DL3008)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
make \
@@ -5,6 +5,7 @@ from typing import Any
import pytest
from sqlalchemy import select
from tests.conftest import session as session_factory
from tests.factories import make_rom
from tests.sql_dialects import MARIADB_DIALECT, POSTGRESQL_DIALECT, compile_sql
from handler.database import db_rom_handler
@@ -12,21 +13,8 @@ from models.platform import Platform
from models.rom import Rom
def _add_rom(platform: Platform, name: str, **metadata: dict[str, Any]) -> Rom:
fs_name = f"{name.replace(' ', '_')}.zip"
return db_rom_handler.add_rom(
Rom(
platform_id=platform.id,
name=name,
slug=name.lower().replace(" ", "-"),
fs_name=fs_name,
fs_name_no_tags=fs_name.removesuffix(".zip"),
fs_name_no_ext=fs_name.removesuffix(".zip"),
fs_extension="zip",
fs_path=f"{platform.slug}/roms",
**metadata,
)
)
def _add_rom(platform: Platform, name: str, **metadata: Any) -> Rom:
return make_rom(platform, name, fs_stem=name.replace(" ", "_"), **metadata)
def _search_ids(term: str) -> list[int]:
@@ -3,7 +3,7 @@ cache, every stored media path, and the entries and failures a parse skips."""
from pathlib import Path
from unittest.mock import patch
from xml.etree.ElementTree import Element # trunk-ignore(bandit/B405)
from xml.etree.ElementTree import Element
import pytest
+3 -3
View File
@@ -8573,9 +8573,9 @@
"license": "MIT"
},
"node_modules/fast-uri": {
"version": "3.1.7",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz",
"integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==",
"version": "3.1.8",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz",
"integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==",
"dev": true,
"funding": [
{