8000 Environment variable fixes (redun init and db creds) by mattrasmus · Pull Request #123 · insitro/redun · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Environment variable fixes (redun init and db creds) #123

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

Merged
merged 5 commits into from
May 29, 2025

Conversation

mattrasmus
Copy link
Collaborator

Fixes #120 and #121

@mattrasmus mattrasmus changed the title Fix init config Environment variable fixes (redun init and db creds) May 29, 2025
@mattrasmus mattrasmus requested a review from pkaleta May 29, 2025 02:31
@@ -3144,18 +3144,31 @@ def _get_uri_from_secret(secret_name: str) -> str:
def _get_credentialed_uri(base_uri: str, conf: Section) -> str:
parts = urlparse(base_uri)

if "@" in parts.netloc:
if parts.password:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we didn't allow even a username to be passed. Usernames are fine. Instead let's just test for the presence of passwords, which is what we really care about.

args.config = os.path.join(basedir, REDUN_CONFIG_DIR)

else:
args.config = get_config_dir(args.config)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using get_config_dir() makes use of all usual ways of discovering the config dir (env var, args, etc).

@mattrasmus mattrasmus requested a review from ctk3b May 29, 2025 15:03
@mattrasmus
Copy link
Collaborator Author

This is ready for review.

@mattrasmus mattrasmus requested a review from gamis-insitro May 29, 2025 20:10
Copy link
Contributor
@gamis-insitro gamis-insitro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattrasmus mattrasmus merged commit 7fb74b8 into main May 29, 2025
10 checks passed
@mattrasmus mattrasmus deleted the fix-init-config branch May 29, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

When using Postgres backend with GSSAPI auth REDUN_DB_PASSWORD is still required
2 participants
0