-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[chore][receiver/sqlquery] Move reusable logic to internal package #30709
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
cmd/configschema
configschema command
cmd/otelcontribcol
otelcontribcol command
extension/healthcheck
Health Check Extension
extension/observer
internal/aws
internal/kubelet
pkg/translator/prometheus
pkg/translator/signalfx
processor/resourcedetection
Resource detection processor
receiver/awscontainerinsight
receiver/cloudflare
receiver/jmx
JMX Receiver
receiver/k8scluster
receiver/kubeletstats
receiver/loki
receiver/postgresql
receiver/sqlquery
SQL query receiver
receiver/zookeeper
testbed
labels
Jan 22, 2024
github-actions
bot
requested review from
Aneurysm9,
bertysentry,
dashpole,
dehaansa,
djaglowski,
dmitryax,
jpkrohling,
mar4uk,
mx-psi,
mxiamxia and
pmcollins
January 22, 2024 19:17
github-actions
bot
requested review from
povilasv,
pxaws,
rmfitzpatrick and
TylerHelmuth
January 22, 2024 19:17
crobert-1
commented
Jan 22, 2024
dmitryax
reviewed
Jan 23, 2024
crobert-1
force-pushed
the
sqlquery_package
branch
from
January 23, 2024 21:30
05638e7
to
81a0bc9
Compare
@crobert-1 can you please rebase and check CI failures? |
crobert-1
force-pushed
the
sqlquery_package
branch
from
January 29, 2024 19:11
81a0bc9
to
4c1e578
Compare
Done. I've filed #30836 for the failing test, it was unrelated to these changes. |
- Add myself as code owner to new package - Remove unrelated godep updates - Remove unnecessary Validate() call
crobert-1
force-pushed
the
sqlquery_package
branch
from
February 1, 2024 16:37
94a987d
to
b3f96a3
Compare
dmitryax
approved these changes
Feb 2, 2024
dmitryax
reviewed
Feb 2, 2024
Queries []Query `mapstructure:"queries"` | ||
StorageID *component.ID `mapstructure:"storage"` | ||
Telemetry TelemetryConfig `mapstructure:"telemetry"` | ||
sqlquery.Config `mapstructure:",squash"` | ||
} | ||
|
||
func (c Config) Validate() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is redundant now. feel free to remove in a follow-up PR
dmitryax
pushed a commit
that referenced
this pull request
Feb 5, 2024
**Description:** [Requested change by Dmitrii](#30709 (comment)), this function was redundant as the underlying config has a `Validate` function called automatically.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cmd/configschema
configschema command
cmd/otelcontribcol
otelcontribcol command
extension/healthcheck
Health Check Extension
extension/observer
internal/aws
internal/kubelet
pkg/translator/prometheus
pkg/translator/signalfx
processor/resourcedetection
Resource detection processor
receiver/awscontainerinsight
receiver/cloudflare
receiver/jmx
JMX Receiver
receiver/k8scluster
receiver/kubeletstats
receiver/loki
receiver/postgresql
receiver/sqlquery
SQL query receiver
receiver/zookeeper
testbed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
As noted in the related issues, a lot of the logic in the sqlquery receiver can be moved to a central package to be used by other receivers. I realize this appears to be a large change, but it's purely a re-organization PR, there's no functional changes. GitHub is not recognizing moved files, so please refer to new file names and their deleted counterparts. A lot of members are now public in the internal package that were private in the receiver which is likely what's causing GitHub to miss that they're just moved files.
This doesn't require a changelog (in my mind) because all things moving were originally private to the receiver. They're now still purely internal, so they won't be published.
I believe
internal
is the best destination for now as it allows us to solidify the usage and interface before moving it topkg
to be publicly available. There are still a lot of unknowns as far as how it can be used by other receivers, so I fully expect "breaking changes" to this. If we keep it internal we can update all usages with the changing interface, so the changes won't be breaking.Link to tracking Issue:
#30297, #13546
Testing:
Existing tests are all passing.
Documentation:
This is purely an internal change.