apache / apache/iceberg-python

refactor Config() and _ENV_CONFIG

Ouverte
#3,028 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
1.1k
Forks
581
Merge moyen
1 j 17 h
PR mergées (30 j)
77

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par suivre Config() et _ENV_CONFIG, puis lisez l’issue de suivi #3006 pour comprendre le correctif pytest existant et le comportement actuel de chargement de la configuration. La tâche est terminée lorsque les fichiers de configuration et les variables d’environnement ne sont plus lus implicitement par Config() ou lors de l’importation, et que le comportement explicite attendu est couvert par des tests.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
tooling
Type d'issue
Refactorisation
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.