apache / apache/iceberg-python

refactor Config() and _ENV_CONFIG

Offen
#3,028 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
1.1k
Forks
581
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
78

Beschreibung

### 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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, Config() und _ENV_CONFIG nachzuverfolgen, und lies dann das Folgeissue #3006, um den bestehenden pytest-Fix und das aktuelle Verhalten beim Laden der Konfiguration zu verstehen. Fertig ist die Aufgabe, wenn Konfigurationsdateien und Umgebungsvariablen nicht mehr implizit von Config() oder während des Imports gelesen werden und das beabsichtigte explizite Verhalten durch Tests abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
tooling
Issue-Typ
Refactoring
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.