-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use pg_temp
to store PostgreSQL auto provisioning procedures
#44255
Use pg_temp
to store PostgreSQL auto provisioning procedures
#44255
Conversation
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
procName := storedProcedureName(pid, match[storedProcedureRe.SubexpIndex("Schema")], match[storedProcedureRe.SubexpIndex("ProcName")]) | ||
var argsCount int | ||
args := strings.Split(match[storedProcedureRe.SubexpIndex("Args")], ",") | ||
for _, arg := range args { | ||
// Skip arguments that have a default value. | ||
if !strings.Contains(strings.ToLower(arg), "default") { | ||
argsCount++ |
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.
On one hand, it's quite impressive to validate things like this, but on the other hand, I feel it's too much custom mock logic. I would prefer something simpler but i don't mind keep this either.
What's more important is we cover these in our E2E tests. I see both RDS and Redshift auto-user provisioning passed so we are good 👍
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.
on that topic, could you check if E2E tests need to be updated (like do we need to adjust the permissions given to the admin user)?
@gabrielcorado See the table below for backport results.
|
Related to #37609.
This moves the auto user provisioning procedures to the temporary schema
pg_temp
, similar to what is used for database access controls.Note: This doesn't update how procedures are stored for RedShift (they are still created without specifying the schema). This will be done in a separate PR.
In addition, the tests now also check the procedure presence (asserting per session in case of
pg_temp
usage) and the argument count on the calls.changelog: Moved PostgreSQL auto provisioning users procedures to
pg_temp
schema.