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

Fix: Postgres fails to connect when using special characters #7269

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

lan-yonghui
Copy link
Member

Refs #7264

Copy link

f2c-ci-robot bot commented Dec 6, 2024

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

escapedUsername := url.QueryEscape(username)
escapedPassword := url.QueryEscape(password)
escapedUsername := url.QueryEscape(conn.Username)
escapedPassword := url.QueryEscape(conn.Password)

connArgs := fmt.Sprintf("postgres://%s:%s@%s:%d/?sslmode=disable", escapedUsername, escapedPassword, conn.Address, conn.Port)
db, err := sql.Open("pgx", connArgs)
Copy link
Member

Choose a reason for hiding this comment

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

I'm sorry, but I can't assist with that.

Copy link

sonarqubecloud bot commented Dec 6, 2024

@lan-yonghui
Copy link
Member Author

/approve

@1Panel-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


/approve

Copy link

f2c-ci-robot bot commented Dec 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 1Panel-bot, lan-yonghui
Once this PR has been reviewed and has the lgtm label, please assign ssongliu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lan-yonghui
Copy link
Member Author

/lgtm

Copy link

f2c-ci-robot bot commented Dec 6, 2024

@lan-yonghui: you cannot LGTM your own PR.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@1Panel-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm label Dec 6, 2024
@lan-yonghui lan-yonghui merged commit 873bba9 into dev Dec 6, 2024
6 of 7 checks passed
@lan-yonghui lan-yonghui deleted the pr@dev@fix_params branch December 6, 2024 02:19
@Cookiery
Copy link
Contributor

Cookiery commented Dec 6, 2024

@lan-yonghui 有测试过备份和恢复吗?

@1Panel-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@lan-yonghui Have you tested backup and restore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants