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

feat(inputs.postgresql_extensible): introduce MaxVersion #13620

Merged
merged 3 commits into from
Jul 21, 2023

Conversation

redbaron
Copy link
Contributor

Required for all PRs

resolves #13568

Rename version to minversion and introduce maxversion to limit DB version query should run on.

@redbaron
Copy link
Contributor Author

I can't run tests on my M2 mac, something about docker timing out

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @redbaron! Just some minor comments...

@@ -37,7 +37,9 @@ type Postgresql struct {
type query []struct {
Sqlquery string
Script string
Version int
Version int `deprecated:"1.28.0;use minVersion to specify minimal DB version this query supports"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Version int `deprecated:"1.28.0;use minVersion to specify minimal DB version this query supports"`
Version int `deprecated:"1.28.0;use 'min_version' instead"`

Comment on lines 41 to 42
MinVersion int
MaxVersion int
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add TOML tags for those options!

Comment on lines 52 to 53
# minversion int
# maxversion int
Copy link
Contributor

Choose a reason for hiding this comment

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

By default TOML will name them min_version and max_version if I'm not mistaken...

@srebhan srebhan added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/postgresql plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jul 14, 2023
@powersj
Copy link
Contributor

powersj commented Jul 14, 2023

I can't run tests on my M2 mac, something about docker timing out

How are you running tests? Are you running make test or go test ./...? May be worth adding the -short if the latter to avoid the integration tests as there is where a bunch of docker containers are launched.

@redbaron
Copy link
Contributor Author

redbaron commented Jul 14, 2023

avoid the integration tests as there is where a bunch of docker containers are launched.

Thing is, this plugin tests require PostgreSQL container

Are you running make test or go test ./...?

I am running from VSCode, which internally close to go test I think

@redbaron
Copy link
Contributor Author

Integration test failure seems to be unrelated

@powersj
Copy link
Contributor

powersj commented Jul 14, 2023

I am running from VSCode, which internally close to go test I think

Correct vscode will run go test without the -short option. I only suggest the -short option so you can continue to run at least the unit tests. There appears to be an issue with go1.20.6 + go-testcontainers + docker right now.

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thank you!

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 14, 2023
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the nice feature @redbaron!

@srebhan srebhan merged commit 22100d4 into influxdata:master Jul 21, 2023
24 of 25 checks passed
@github-actions github-actions bot added this to the v1.28.0 milestone Jul 21, 2023
@redbaron redbaron deleted the pg-maxversion branch July 21, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/postgresql feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postgres_extensible: allow specifying version upper bound
3 participants