Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(cli): Fix postgres TDE failing version check #7203

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 4 commits into from
Apr 19, 2023

Conversation

MTschirnich
Copy link
Contributor

Hi,

I am running postgres 13 TDE and ran into the issue coder reporting the version is not v13 or higher.

After a bit of investigating I noticed coder uses "SHOW server_version".
Unfortunately the postgres TDE build reports it version other than a normal postgres build.
Postgres 13 TDE: "13.10_TDE_1.0.5 (Ubuntu.....)"
Postgres 12: "12.13 (Ubuntu...)"

In cli/server.go the version check splits at the space and proceeds to compare it with semver, which does not seem to like the additional content.

I addressed this by changing the server_version to server_version_num, as this is a number and the TDE information is not present. This also simplifies the comparison of the versions.

@github-actions
Copy link

github-actions bot commented Apr 19, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@MTschirnich
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

cdrcommunity added a commit to coder/cla that referenced this pull request Apr 19, 2023
@kylecarbs kylecarbs requested a review from coadler April 19, 2023 15:56
@coadler
Copy link
Contributor

coadler commented Apr 19, 2023

Thanks @MTschirnich!

@MTschirnich
Copy link
Contributor Author

Hello @coadler, I am not sure what the exact nature of the error in the test-go for Ubuntu is.
It seems to have worked before my fixes, so I am not sure what caused the fail now. And why nothing else failed.

Do you have an idea?

@coadler
Copy link
Contributor

coadler commented Apr 19, 2023

Just looks like a flake. I'll rerun and merge 🙂

@MTschirnich
Copy link
Contributor Author

Thanks 😄

@coadler coadler merged commit fff2b1d into coder:main Apr 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants