Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove connection ID environment variables in favor of simply defining them #2294

Closed
AetherUnbound opened this issue Jun 1, 2023 · 2 comments · Fixed by #2386
Closed

Remove connection ID environment variables in favor of simply defining them #2294

AetherUnbound opened this issue Jun 1, 2023 · 2 comments · Fixed by #2386
Assignees
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users good first issue New-contributor friendly help wanted Open to participation from the community 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: catalog Related to the catalog and Airflow DAGs 🔧 tech: airflow Involves Apache Airflow

Comments

@AetherUnbound
Copy link
Contributor

Description

We currently have a pattern of defining the connection ID for an Airflow Connection via an environment variable (with a default) in addition to the environment variable for the connection itself. This creates two new configuration values for one connection ID. Below are all of the current examples:

POSTGRES_CONN_ID = os.getenv("OPENLEDGER_CONN_ID", "postgres_openledger_testing")
OPENLEDGER_API_CONN_ID = os.getenv("OPENLEDGER_API_CONN_ID", "postgres_openledger_api")
API_CONN_ID = os.getenv("API_CONN_ID", "api")
AWS_CONN_ID = os.getenv("AWS_CONN_ID", "aws_conn_id")
AWS_RDS_CONN_ID = os.environ.get("AWS_RDS_CONN_ID", AWS_CONN_ID)

POSTGRES_CONN_ID = os.getenv("TEST_CONN_ID")

POSTGRES_CONN_ID = os.getenv("TEST_CONN_ID")

POSTGRES_TEST_CONN_ID = os.getenv("TEST_CONN_ID")

These values rarely change (if ever), and do not need to be configured via environment variable.

Instead, we should define these values outright as constants and remove the environment variables from the catalog's env.template file.

@AetherUnbound AetherUnbound added good first issue New-contributor friendly help wanted Open to participation from the community 🔧 tech: airflow Involves Apache Airflow 🟩 priority: low Low priority and doesn't need to be rushed 🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: catalog Related to the catalog and Airflow DAGs labels Jun 1, 2023
@duwarakan
Copy link
Contributor

What should be the target branch?

@zackkrida
Copy link
Member

Hi @duwarakan main is the default branch for the project and a good choice for most PR targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users good first issue New-contributor friendly help wanted Open to participation from the community 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: catalog Related to the catalog and Airflow DAGs 🔧 tech: airflow Involves Apache Airflow
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants