Skip to content

Conversation

bernielomax
Copy link
Contributor

No description provided.

@bernielomax bernielomax requested a review from a team as a code owner June 19, 2025 01:39
So it can be access by other packages.
This will be used to patch the manifest lists.
@bernielomax bernielomax force-pushed the bernielomax/feat/airbyte-db-psql-17 branch from e2c4595 to 6e6bd28 Compare June 19, 2025 01:42
@bernielomax bernielomax force-pushed the bernielomax/feat/airbyte-db-psql-17 branch from 6e6bd28 to ff31206 Compare June 19, 2025 01:49
@bernielomax bernielomax changed the title feat: Airbyte DB supports Postgres 17 feat: suport Airbyte DB with Postgres 17 Jun 19, 2025
@bernielomax bernielomax changed the title feat: suport Airbyte DB with Postgres 17 feat: support Airbyte DB with Postgres 17 Jun 19, 2025
}

if opts.PatchPsql17 {
vals = append(vals, "postgresql.image.tag=1.7.0-17")
Copy link
Member

Choose a reason for hiding this comment

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

As we reference this specific version of postgres more than once, can we pull it out to a shared location?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a couple of fixup commits for this.

// PatchPsql17 checks if PostgreSQL data needs patching by examining the
// local PostgreSQL data directory. It returns true if the directory doesn't
// exist or contains PostgreSQL version 17. Otherwise it returns false.
func PatchPsql17() (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Could we rename this to RunningPsql17? Calling it Patch makes me think this method will patch psql to that version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about EnablePostgres17?

Copy link
Member

Choose a reason for hiding this comment

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

That works too

})

pgVersion, err := pgData.Version()
if err != nil && !errors.Is(err, fs.ErrNotExist) {
Copy link
Member

Choose a reason for hiding this comment

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

errors.Is will handle the nil case for you, you don't need to check it explicitly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason why I can't do that is because I am using !. It would also return error when err is nil. See - https://go.dev/play/p/CAN89EgXbav

@bernielomax
Copy link
Contributor Author

bernielomax commented Jun 20, 2025

@colesnodgrass I've added a couple of fixups. Let me know what you think about my other two comments.

@bernielomax bernielomax merged commit c2c129b into main Jun 20, 2025
2 checks passed
@bernielomax bernielomax deleted the bernielomax/feat/airbyte-db-psql-17 branch June 20, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants