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

Fix import of sqlite and ignore it on all platforms that require CGO. #9359

Merged
merged 4 commits into from
Jun 15, 2021

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Jun 13, 2021

Required for all PRs:

  • Updated associated README.md.
  • Wrote appropriate unit tests.

Fix unintended pulling in of CGO by importing the sqlite SQL driver. CGO is required for some platforms when using sqlite. We simply do not support sqlite for those platforms and get rid of the CGO dependency. Fixes CI errors like

[...]
package github.com/influxdata/telegraf/cmd/telegraf
	imports github.com/influxdata/telegraf/plugins/outputs/all
	imports github.com/influxdata/telegraf/plugins/outputs/sql
	imports modernc.org/sqlite
	imports modernc.org/libc
	imports modernc.org/libc/unistd: build constraints exclude all Go files in /go/pkg/mod/modernc.org/libc@v1.9.5/unistd
[...]

@srebhan srebhan requested a review from reimda June 13, 2021 19:37
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jun 13, 2021
@srebhan srebhan added the plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins label Jun 13, 2021
Copy link
Contributor

@reimda reimda 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

@reimda reimda merged commit ee0a86c into influxdata:master Jun 15, 2021
@reimda
Copy link
Contributor

reimda commented Jun 15, 2021

Thanks @srebhan!

reimda pushed a commit that referenced this pull request Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants