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

Add a WithTimescaleDB option to support using the Timescale PG compatible images #19

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

ionrock
Copy link

@ionrock ionrock commented Jan 4, 2024

This allows support for using Postgres compatible images such as TimescaleDB via:

psqldocker.NewContainer(
	u, p, dbname,
	psqldocker.WithRepository("timescale/timescaledb-ha"),
	psqldocker.WithImageTag("pg15-latest"),
)

This allows support for using Postgres compatible images such as
TimescaleDB via:

```
psqldocker.NewContainer(
	u, p, dbname,
	psqldocker.WithRepository("timescale/timescaledb-ha"),
	psqldocker.WithImageTag("pg15-latest"),
)
```
@adrianbrad
Copy link
Owner

The aim is to maintain a focused approach for this project. maintaining compatibility with select Postgres repositories rather than broad support for any Docker image. In line with this strategy, it's more appropriate to provide options for specific PostgreSQL Docker repositories, with the "postgres" repository being the default one.

For instance, instead of a generic WithRepository(string) option, a more specialized WithTimescaleDB() option should be provided. This approach aligns better with the project direction.

Also if you intend to update the PR to conform to the above-mentioned ideas, please provide a test case for the new option.

Let me know if I can help in any way!

@ionrock
Copy link
Author

ionrock commented Jan 4, 2024

That makes sense to me. I'll update the PR. Thanks for the feedback and taking a look!

This adds the WithTimescaleDB option, which sets the repo to
"timescale/timescaledb" and also sets a valid image tag as the
"alpine" default is not compatible. It only updates the tag when it is
default.
@ionrock ionrock changed the title Add a repo option to support other pg compatible images Add a WithTimescaleDB option to support using the Timescale PG compatible images Jan 4, 2024
@ionrock
Copy link
Author

ionrock commented Jan 4, 2024

@adrianbrad I updated the PR. Let me know what you think!

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b0568fb) 88.20% compared to head (d7eb08a) 88.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   88.20%   88.78%   +0.58%     
==========================================
  Files           2        2              
  Lines         212      223      +11     
==========================================
+ Hits          187      198      +11     
  Misses         17       17              
  Partials        8        8              
Flag Coverage Δ
unittests 88.78% <100.00%> (+0.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adrianbrad
Copy link
Owner

Excellent 👌. I will bump deps and realease a new version.

@adrianbrad adrianbrad merged commit 109bf03 into adrianbrad:main Jan 4, 2024
8 of 9 checks passed
@ionrock
Copy link
Author

ionrock commented Jan 4, 2024

Fantastic! Thanks so much!

@ionrock ionrock deleted the ionrock/add-repo-option branch January 4, 2024 18:20
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