generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Resolve DSN from runtime in PG Proxy #3458
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jvmakine
changed the title
feat(Juho/module): in proxy
Resolve DSN from runtime in PG Proxy
Nov 22, 2024
Open
github-actions
bot
changed the title
Resolve DSN from runtime in PG Proxy
feat: Resolve DSN from runtime in PG Proxy
Nov 22, 2024
jvmakine
force-pushed
the
juho/module-in-proxy
branch
3 times, most recently
from
November 22, 2024 05:00
6457549
to
0a5f94f
Compare
jvmakine
commented
Nov 22, 2024
if !ok { | ||
return "", fmt.Errorf("database %s not found", params["database"]) | ||
} | ||
logger.Debugf("Resolved DSN (%s): %s", params["database"], db.Runtime.DSN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is where the logic to use a dsn resolver based on provisioned runtime (like type: aws-iam-auth
) will be added
jvmakine
force-pushed
the
juho/module-in-proxy
branch
2 times, most recently
from
November 25, 2024 00:15
b635b09
to
b6ca3cb
Compare
jvmakine
force-pushed
the
juho/module-in-proxy
branch
from
November 25, 2024 01:01
ae113f2
to
51279db
Compare
jvmakine
force-pushed
the
juho/module-in-proxy
branch
2 times, most recently
from
November 25, 2024 02:18
262c532
to
1aa21bb
Compare
jvmakine
force-pushed
the
juho/module-in-proxy
branch
3 times, most recently
from
November 25, 2024 02:36
6ea7f5b
to
7d19c0b
Compare
stuartwdouglas
approved these changes
Nov 25, 2024
Instead, when GetDatabase in the runner is called, and there is no DSN for the DB, it gets translated to pgproxy DSN. We start the pgproxy before the deployment in the runner, and pass the local address in an environment variable to the runner. pgproxy gets the active schema, and redirects connections to the DSN defined in the runtime of that schema. Follow-ups - Integrate MySQL proxy - Remove DSNs from ModuleContext completely
jvmakine
force-pushed
the
juho/module-in-proxy
branch
from
November 25, 2024 03:18
7d19c0b
to
b820db9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
High level changes:
ModuleContext
to the runners.GetDatabase
in the runner is called, and there is no DSN for the DB, it gets translated to pgproxy DSN.Follow-ups
ModuleContext
completely