fix(gcs): list_objects con auth=False pagina correttamente#72
Merged
Conversation
La funzione _gcs_http_list restituisce solo 1000 oggetti per pagina (default GCS). list_objects() ignorava nextPageToken e restituiva solo la prima pagina, perdendo slug che iniziano con lettere finali (u, v, w, x, y, z). Ora fa paginazione completa fintanto che nextPageToken e' presente, rispettando l'eventuale limit.
3 nuovi test per il ramo auth=False: - test_auth_false_no_pagination: pagina singola - test_auth_false_with_pagination: 2 pagine con merge - test_auth_false_with_limit: limit rispettato item per item Allineata la logica di limit a item-level (non page-level) per coerenza con il ramo auth=None fallback.
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
list_objects(bucket, auth=False)restituiva solo la prima pagina di risultati (default GCS: 1000 oggetti), ignorandonextPageToken. Slug che iniziano con lettere alfabeticamente successive (u, v, w, x, y, z) venivano persi.Causa
_gcs_http_listrestituisce correttamente(items, next_page_token)malist_objectsignorava il token e restituiva solo la prima pagina. Questo causava la scomparsa diunified_comuniewho_is_who_padalclean_catalog.jsondi dataset-incubator a ogni rebuild.Fix
Aggiunta paginazione completa nel ramo
auth=False: loop fintanto chenextPageTokenè presente, rispettando l'eventualelimit.Test