fix(script source): timeout configurabile via client + iniezione client appiattito - #475
Open
Gabrymi93 wants to merge 2 commits into
Open
fix(script source): timeout configurabile via client + iniezione client appiattito#475Gabrymi93 wants to merge 2 commits into
Gabrymi93 wants to merge 2 commits into
Conversation
- _fetch_script: timeout leggibile da client.timeout (default 600) — gli harvest lunghi (es. inPA ~17min) venivano uccisi dal limite hardcoded - run_raw: se il source non ha il blocco client:, inietta i campi appiattiti (timeout/retries/user_agent/headers) da RawSourceConfig.to_dict() — i plugin script/http vedevano client vuoto e usavano i default
Regressione per il timeout hardcoded 600s — verifica che client.timeout venga letto (1s per il test) invece del default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sintesi
Rende configurabile il timeout del source type
script(era hardcoded a 600s) e sistema l'iniezione del client per i plugin quando ildataset.ymlnon dichiara il bloccoclient:.Necessario per gli harvest lunghi via script (es. candidate
inpa-bandiin dataset-incubator: OPEN ~13 min, CLOSED ~17 min), che venivano uccisi dal limite di 10 minuti.Contesto collegato
Collegata a intake di dataset-incubator:
inpa-bandieinpa-comunicazioni(reclutamento PA dal Portale inPA).Cosa cambia
Impatto su contratti pubblici
dataset.yml—raw.sources[].client.timeoutora letto dal sourcescript(campo già usato da http_file/http_post_file, quindi coerente)Verifica
python -m pytest -q # 1375 passed ruff check toolkit/raw/_fetch_utils.py toolkit/raw/run.pyTest aggiunto:
tests/test_script_source.py::test_script_client_timeout_appliedverifica checlient.timeoutvenga letto dal subprocess.