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

Add just recipe to update catalog .env #2938

Closed
stacimc opened this issue Sep 1, 2023 · 0 comments · Fixed by #5099
Closed

Add just recipe to update catalog .env #2938

stacimc opened this issue Sep 1, 2023 · 0 comments · Fixed by #5099
Assignees
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 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

Comments

@stacimc
Copy link
Collaborator

stacimc commented Sep 1, 2023

Problem

We have the just env recipe to create .env files from templates, but in the Catalog we often don't want to fully override our existing .env because we would lose API keys that are set as env variables. It would be nice to have a way to update your catalog/.env to pull in any updates without overriding everything.

Description

A just catalog/env recipe, or else an update to the existing just env, that copies in everything from the env.template but does not overwrite API keys.

Alternatives

Alternatively we could have an entire section of the .env which is preserved, and move the API keys to this section. Something like:

#######################
# Permanent settings
# These settings will not be overwritten by `just catalog/env`
#######################

API_KEY_FOO = 'foo'
API_KEY_BAR = 'bar'

# Devs can place any other settings they don't want to lose to an env update here
MY_OTHER_SETTING_I_DONT_WANT_TO_LOSE = True

We can add this to the env.template. When just env or just catalog/env is run, if no catalog/.env already exists, we copy the whole thing. If there's an existing catalog/.env, we copy over everything else but don't touch this section. It should be at the end of the file, allowing permanent settings to override values in other sections.

Additional context

@stacimc stacimc added 🟩 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 Sep 1, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Sep 1, 2023
@AetherUnbound AetherUnbound added the help wanted Open to participation from the community label Oct 24, 2023
@openverse-bot openverse-bot moved this from 📋 Backlog to 🏗 In Progress in Openverse Backlog Oct 28, 2024
@dhruvkb dhruvkb self-assigned this Oct 28, 2024
@openverse-bot openverse-bot moved this from 🏗 In Progress to ✅ Done in Openverse Backlog Oct 31, 2024
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 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
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants