Azure / Azure/azure-sdk-for-python
Storage Blob tsp conversion
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g 2h
- PR unite (30g)
- 213
Descrizione
Improvements:
- With the tsp regeneration the operations have splatted out a lot of the previous param Models (BlobHttpHeaders, AppendPositionAccessConditions, BlobModifiedAccessConditions) a lot of the helper methods are not really necessary anymore and could be refactored and removed.
- A lot of the deserialization helper methods are no longer needed as the new typespec models are also dictionaries and can be called .as_dict()
Potential Issues:
- There was a transform that made AccessPolicy datetimes (start/expiry) into strings since python cannot handle that level of precision, however UserDelegationKey did not have that transform for signedStart and signedExpiry so it is generated as a datetime. We maintained this pattern in the typespec generated code, however this may need investigation as an incorrect datetime could cause issues with the service.
- def _upload_chunk(self, chunk_offset, chunk_data):
# TODO: This is incorrect, but works with recording.
- AccessPolicy takes in optional parameters but the underlying model is required properties, also permissions takes in ContainerSasPermissions but the type of permissions in the generated code is strA
- Download blob operation returns 304 as an error, Go and .NET customized this to return a success. Is returning a 304 ResourceNotModifiedError idiomatic to python
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Iniziate esaminando i modelli Storage Blob generati da tsp e i metodi helper che coinvolgono BlobHttpHeaders, AppendPositionAccessConditions e BlobModifiedAccessConditions. Ispezionate _upload_chunk e il comportamento di AccessPolicy, UserDelegationKey e download blob descritto qui. Il lavoro è completato quando gli helper non necessari sono stati rimossi e sono state risolte le domande elencate relative a modello, upload, datetime e 304-response.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, python
- Ambito
- backend, cloud
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100