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

[receiver/purefa] Add validate on config components #17449

Conversation

dgoscn
Copy link
Contributor

@dgoscn dgoscn commented Jan 9, 2023

Description:
There were missing code snippet from validate section on config.go inside the purefa receiver. At this piece of code, a block is inserted and the following unit test.

Link to tracking Issue:
#14886

Testing:
Same present on README.md section

Documentation:
Still in progress

@dgoscn dgoscn requested a review from a team January 9, 2023 17:21
@runforesight
Copy link

runforesight bot commented Jan 9, 2023

Foresight Summary

    
Major Impacts

build-and-test-windows duration(5 seconds) has decreased 33 minutes 26 seconds compared to main branch avg(33 minutes 31 seconds).
View More Details

✅  tracegen workflow has finished in 56 seconds (1 minute 31 seconds less than main branch avg.) and finished at 25th Jan, 2023.


Job Failed Steps Tests
build-dev -     🔗  N/A See Details
publish-latest -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

⭕  build-and-test-windows workflow has finished in 5 seconds (33 minutes 26 seconds less than main branch avg.) and finished at 28th Mar, 2023.


Job Failed Steps Tests
windows-unittest-matrix -     🔗  N/A See Details
windows-unittest -     🔗  N/A See Details

✅  check-links workflow has finished in 43 seconds and finished at 28th Mar, 2023.


Job Failed Steps Tests
changed files -     🔗  N/A See Details
check-links -     🔗  N/A See Details

✅  telemetrygen workflow has finished in 1 minute 6 seconds and finished at 28th Mar, 2023.


Job Failed Steps Tests
publish-latest -     🔗  N/A See Details
build-dev -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  build-and-test workflow has finished in 35 minutes 52 seconds (13 minutes 42 seconds less than main branch avg.) and finished at 28th Mar, 2023.


Job Failed Steps Tests
unittest-matrix (1.20, connector) -     🔗  ✅ 126  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, connector) -     🔗  ✅ 126  ❌ 0  ⏭ 0    🔗 See Details
correctness-metrics -     🔗  ✅ 2  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, internal) -     🔗  ✅ 583  ❌ 0  ⏭ 0    🔗 See Details
correctness-traces -     🔗  ✅ 17  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, extension) -     🔗  ✅ 544  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, processor) -     🔗  ✅ 1557  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, extension) -     🔗  ✅ 544  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, internal) -     🔗  ✅ 583  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, processor) -     🔗  ✅ 1557  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, receiver-0) -     🔗  ✅ 2614  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, receiver-0) -     🔗  ✅ 2614  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, exporter) -     🔗  ✅ 2506  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, exporter) -     🔗  ✅ 2506  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, receiver-1) -     🔗  ✅ 1965  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, other) -     🔗  ✅ 4756  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, receiver-1) -     🔗  ✅ 1965  ❌ 0  ⏭ 0    🔗 See Details
integration-tests -     🔗  ✅ 56  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, other) -     🔗  ✅ 4756  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details
check-collector-module-version -     🔗  N/A See Details
build-examples -     🔗  N/A See Details
check-codeowners -     🔗  N/A See Details
checks -     🔗  N/A See Details
lint-matrix (receiver-0) -     🔗  N/A See Details
lint-matrix (receiver-1) -     🔗  N/A See Details
lint-matrix (processor) -     🔗  N/A See Details
lint-matrix (exporter) -     🔗  N/A See Details
lint-matrix (extension) -     🔗  N/A See Details
lint-matrix (connector) -     🔗  N/A See Details
lint-matrix (internal) -     🔗  N/A See Details
lint-matrix (other) -     🔗  N/A See Details
lint -     🔗  N/A See Details
unittest (1.19) -     🔗  N/A See Details
unittest (1.20) -     🔗  N/A See Details
cross-compile (darwin, amd64) -     🔗  N/A See Details
cross-compile (darwin, arm64) -     🔗  N/A See Details
cross-compile (linux, amd64) -     🔗  N/A See Details
cross-compile (linux, arm) -     🔗  N/A See Details
cross-compile (linux, arm64) -     🔗  N/A See Details
cross-compile (linux, ppc64le) -     🔗  N/A See Details
cross-compile (windows, 386) -     🔗  N/A See Details
cross-compile (windows, amd64) -     🔗  N/A See Details
cross-compile (linux, 386) -     🔗  N/A See Details
build-package (deb) -     🔗  N/A See Details
build-package (rpm) -     🔗  N/A See Details
windows-msi -     🔗  N/A See Details
publish-check -     🔗  N/A See Details
publish-dev -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  changelog workflow has finished in 2 minutes 41 seconds and finished at 28th Mar, 2023.


Job Failed Steps Tests
changelog -     🔗  N/A See Details

✅  load-tests workflow has finished in 6 minutes 58 seconds (3 minutes 52 seconds less than main branch avg.) and finished at 28th Mar, 2023.


Job Failed Steps Tests
loadtest (TestTraceAttributesProcessor) -     🔗  ✅ 3  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestIdleMode) -     🔗  ✅ 1  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceNoBackend10kSPS|TestTrace1kSPSWithAttrs) -     🔗  ✅ 8  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetric10kDPS|TestMetricsFromFile) -     🔗  ✅ 6  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceBallast1kSPSWithAttrs|TestTraceBallast1kSPSAddAttrs) -     🔗  ✅ 10  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetricResourceProcessor|TestTrace10kSPS) -     🔗  ✅ 12  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestBallastMemory|TestLog10kDPS) -     🔗  ✅ 18  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details

✅  prometheus-compliance-tests workflow has finished in 10 minutes 23 seconds (⚠️ 4 minutes 5 seconds more than main branch avg.) and finished at 28th Mar, 2023.


Job Failed Steps Tests
prometheus-compliance-tests -     🔗  ✅ 21  ❌ 0  ⏭ 0    🔗 See Details

✅  e2e-tests workflow has finished in 11 minutes 58 seconds (2 minutes 50 seconds less than main branch avg.) and finished at 28th Mar, 2023.


Job Failed Steps Tests
kubernetes-test (v1.26.0) -     🔗  N/A See Details
kubernetes-test (v1.24.7) -     🔗  N/A See Details
kubernetes-test (v1.23.13) -     🔗  N/A See Details
kubernetes-test (v1.25.3) -     🔗  N/A See Details

🔎 See details on Foresight

*You can configure Foresight comments in your organization settings page.

@atoulme
Copy link
Contributor

atoulme commented Jan 12, 2023

You might want to add a unit test covering validation checks.

receiver/purefareceiver/config.go Outdated Show resolved Hide resolved
receiver/purefareceiver/config.go Outdated Show resolved Hide resolved
receiver/purefareceiver/config.go Outdated Show resolved Hide resolved
jpkrohling
jpkrohling previously approved these changes Jan 25, 2023
@jpkrohling
Copy link
Member

Looks like the go.mod/sum are outdated now.

@jpkrohling jpkrohling dismissed their stale review January 25, 2023 15:32

go.mod/sum is outdated

Copy link
Contributor

@MovieStoreGuy MovieStoreGuy left a comment

Choose a reason for hiding this comment

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

So far this config only checks the Config.Settings, should it also check the other exposed files as well?

receiver/purefareceiver/config.go Outdated Show resolved Hide resolved
var err error

if c.Settings.ReloadIntervals.Array.String() == "" {
err = multierr.Append(err, errors.New("Arrays not provided and is required"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Golang convention is that errors messages being in lower case

@@ -64,6 +66,23 @@ type ReloadIntervals struct {
}

func (c *Config) Validate() error {
// TODO(dgoscn): perform config validation
return nil
var err error
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit: name this as errs since this represents all errors found in the config validation.

@MovieStoreGuy
Copy link
Contributor

Hey @dgoscn,

Are you still working on this change?

@dgoscn
Copy link
Contributor Author

dgoscn commented Feb 7, 2023

Hey @dgoscn,

Are you still working on this change?

Hi @MovieStoreGuy. Thanks for your review. Yes, I am working on this. I will push de changes asap.

Thank you

@MovieStoreGuy MovieStoreGuy added ready to merge Code review completed; ready to merge by maintainers and removed ready to merge Code review completed; ready to merge by maintainers labels Feb 8, 2023
@jpkrohling jpkrohling force-pushed the purestorage_flasharray_receiver_config_validate branch from e7555c0 to 1e9d113 Compare February 8, 2023 14:29
@jpkrohling
Copy link
Member

jpkrohling commented Feb 8, 2023

@bogdandrutu, I believe @dgoscn is addressing @MovieStoreGuy's concerns now, but I see you are still blocking this PR. Could you please take a look and see if there are blockers left here?

receiver/purefareceiver/config.go Outdated Show resolved Hide resolved
@MovieStoreGuy
Copy link
Contributor

Hey @dgoscn ,

Could I ask you to rebase with main please?

@dgoscn
Copy link
Contributor Author

dgoscn commented Feb 27, 2023

Hey @dgoscn ,

Could I ask you to rebase with main please?

Sure @MovieStoreGuy thansk for the review

@jpkrohling
Copy link
Member

The go.mod/sum files are still outdated.

@dgoscn dgoscn force-pushed the purestorage_flasharray_receiver_config_validate branch 2 times, most recently from 9ea37e3 to 7ce3323 Compare March 8, 2023 01:06
@MovieStoreGuy
Copy link
Contributor

Please rebase.

@jpkrohling
Copy link
Member

Once this is rebased, I'll review and merge this.

@dgoscn dgoscn force-pushed the purestorage_flasharray_receiver_config_validate branch from f5c6aaa to 1798bb4 Compare March 28, 2023 02:17
@dgoscn
Copy link
Contributor Author

dgoscn commented Mar 28, 2023

Hi, @jpkrohling. Thank you for your last comment. Can you please check my previous commit?

Thank you

@dgoscn dgoscn requested review from MovieStoreGuy and removed request for bogdandrutu March 28, 2023 12:41
@jpkrohling jpkrohling dismissed bogdandrutu’s stale review March 29, 2023 18:46

sorry to dismiss your review, but you don't seem to have responded to previous requests for re-reviews -- if you feel like this should still be done differently, let me know and I'll work with @dgoscn on getting that ammended

@jpkrohling jpkrohling merged commit 4243ffc into open-telemetry:main Mar 29, 2023
@github-actions github-actions bot added this to the next release milestone Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants