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

Issue #526 BUGFIX - Postgres init - Only match first major number of postgres #522

Closed
wants to merge 1 commit into from

Conversation

clickthisnick
Copy link

@clickthisnick clickthisnick commented Jul 24, 2023

#526

I'm testing this with a base image of redhat 8.6 - everything works once I modify this line.

postgres --version returns:
postgres (PostgreSQL) 13.10

Which the regex matches both the 13 and the 10 and caused postgres init to attempt to update the database version and then fail. Postgres doesn't ever come up and thus pulp doesn't work.

Once I use | head -n1 to get get the 13 and not the additional 10 in the postgres version, everything works.

Screenshot 2023-07-24 at 10 17 25 AM

Using regexr

`postgres --version` returns:
postgres (PostgreSQL) 13.10

Which the regex matches both the 13 and the 10 and caused postgres init to attempt to update the database version and then fail.
@clickthisnick clickthisnick changed the title BUGFIX - Postgres init - Only match first major number of postgres Issue #526 BUGFIX - Postgres init - Only match first major number of postgres Jul 28, 2023
@mikedep333
Copy link
Member

Hi @clickthisnick ,

To fix our CI: Please add this to the end of your commit message:

fixes: #526

@stale
Copy link

stale bot commented Sep 3, 2023

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label Sep 3, 2023
@@ -13,7 +13,7 @@ export C035="\e[35m"
export C036="\e[36m"
export C037="\e[37m"

PGVERSION=$(postgres --version | egrep -o "1[0-9]")
PGVERSION=$(postgres --version | egrep -o "1[0-9]" | head -n1)
Copy link
Member

Choose a reason for hiding this comment

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

Does this work to?

Suggested change
PGVERSION=$(postgres --version | egrep -o "1[0-9]" | head -n1)
PGVERSION=$(postgres --version | egrep -m 1 -o "1[0-9]")

@stale
Copy link

stale bot commented Sep 4, 2023

This pull request is no longer marked for closure.

1 similar comment
@stale
Copy link

stale bot commented Sep 4, 2023

This pull request is no longer marked for closure.

@stale stale bot removed stale labels Sep 4, 2023
@stale
Copy link

stale bot commented Oct 4, 2023

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label Oct 4, 2023
Copy link

stale bot commented Nov 4, 2023

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.

@stale stale bot closed this Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants