apache / apache/iceberg-python

refactor Config() and _ENV_CONFIG

Aperta
#3,028 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
1.1k
Fork
581
Merge medio
1g 17h
PR unite (30g)
78

Descrizione

### Apache Iceberg version

None

### Please describe the bug 🐞

Follow up to #3006, i want to see if we can refactor Config() and _ENV_CONFIG
a couple of issues ive seen
* Config() `__init__` reads both env vars and local config files implicitly, this can be a potentially footgun.
* _ENV_CONFIG is loaded on import time... which calls Config() above and reads env vars and local config files.

#3006 is a fix for pytests. Ideally, I think we can be more explicit here

### Willingness to contribute

- [ ] I can contribute a fix for this bug independently
- [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by tracing Config() and _ENV_CONFIG, then read the follow-up issue #3006 to understand the existing pytest fix and current configuration loading behavior. Done means configuration files and environment variables are no longer read implicitly by Config() or during import, with the intended explicit behavior covered by tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
tooling
Tipo di issue
Refactoring
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.