@@ -78,6 +78,11 @@ class RepoSettings(BaseModel):
7878 # Prevents stale broken releases from blocking pagination indefinitely.
7979 # Set to null to disable.
8080 reconcile_max_age_days : int | None = 90
81+ # When set, only release assets whose name contains this string are
82+ # matched for the windows_url / linux_url columns. Useful for
83+ # multi-package releases (e.g. set to "base" to match only the base
84+ # package archive).
85+ asset_match_filter : str | None = None
8186
8287 @property
8388 def full_name (self ) -> str :
@@ -106,14 +111,14 @@ def settings_customise_sources(
106111 return (init_settings , env_settings , YamlConfigSettingsSource (settings_cls ))
107112
108113 api : ApiSettings = Field (default_factory = ApiSettings )
109- storage : StorageSettings
114+ storage : StorageSettings | None = None
110115 github : GithubSettings = Field (default_factory = GithubSettings )
111116 database : DatabaseSettings | None = None
112117 repo : RepoSettings | None = None
113118 log : LogSettings = Field (default_factory = LogSettings )
114119
115120
116- config = AppConfig () # ty: ignore[missing-argument]
121+ config = AppConfig ()
117122
118123logging .basicConfig (
119124 level = logging .INFO , format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
@@ -141,12 +146,17 @@ def _run_reconcile():
141146 _releases_client ,
142147 config .database ,
143148 config .repo .version_branches ,
144- drop_base_path = config .storage .build_drop_base_path ,
145- process_symbols_fn = _process_pdb_artifact_for_sha ,
149+ drop_base_path = config .storage .build_drop_base_path
150+ if config .storage
151+ else None ,
152+ process_symbols_fn = _process_pdb_artifact_for_sha
153+ if config .storage
154+ else None ,
146155 download_fn = lambda url , path : download_file (url , path ),
147156 product_name = config .repo .product_name ,
148157 max_age_days = config .repo .reconcile_max_age_days ,
149158 commit_log_table = config .database .commit_log_table ,
159+ asset_match_filter = config .repo .asset_match_filter ,
150160 )
151161 except Exception :
152162 logger .exception ("Scheduled reconciliation failed" )
@@ -236,6 +246,7 @@ def _process_symbols_only(
236246 auth_headers : dict ,
237247) -> None :
238248 """Download PDB zip, extract, and commit to symstore. Serialized via _storage_lock."""
249+ assert config .storage is not None
239250 base_symbols_path = config .storage .symbol_store_base_path
240251
241252 product_symbols_path = Path (base_symbols_path ).resolve ()
@@ -320,7 +331,7 @@ def _process_pdb_artifact_for_sha(sha: str, product_name: str) -> None:
320331 download the PDB artifact, and process into symstore.
321332 Artifacts expire after ~90 days; logs a warning and returns if unavailable.
322333 """
323- if not _releases_client or not config .repo :
334+ if not _releases_client or not config .repo or not config . storage :
324335 return
325336
326337 run = _releases_client .find_workflow_run_for_commit (sha , config .repo .workflow_path )
@@ -378,13 +389,13 @@ def process_artifacts(
378389 auth_headers = {"Authorization" : f"Bearer { token } " } if token else {}
379390
380391 # Download and process symbol files
381- if symbols_url :
392+ if symbols_url and config . storage :
382393 _process_symbols_only (symbols_url , safe_version , product_name , auth_headers )
383394
384395 # Fetch the GitHub Release once; used for both DB upsert and build drop.
385396 release = None
386397 needs_release = (config .database and config .repo ) or (
387- config .storage .build_drop_base_path and config .repo
398+ config .storage and config . storage .build_drop_base_path and config .repo
388399 )
389400 if needs_release and _releases_client :
390401 try :
@@ -405,14 +416,15 @@ def process_artifacts(
405416 config .database ,
406417 config .repo .version_branches ,
407418 commit_log_table = config .database .commit_log_table ,
419+ asset_match_filter = config .repo .asset_match_filter ,
408420 )
409421 except Exception :
410422 logger .exception (
411423 "DB upsert failed for build %s (non-fatal)" , build_version
412424 )
413425
414426 # Download build archives to the local drop directory as a backup mirror.
415- if release and config .storage .build_drop_base_path :
427+ if release and config .storage and config . storage .build_drop_base_path :
416428 try :
417429 version_prefix = "." .join (build_version .split ("." )[:2 ])
418430 drop_dir = Path (config .storage .build_drop_base_path ) / version_prefix
0 commit comments