algorand / conduit

Algorand's data pipeline framework.
MIT License
37 stars 26 forks source link

Pipelining followups #147

Closed tzaffi closed 1 year ago

tzaffi commented 1 year ago

Summary

Addressing the Pipelining Followups Issue along with the "CLI health endpoint bug" which I discovered while working on the block generator.

The CLI Health Endpoint Bug

This bug was actually introduced by the Pipelining PR which preceded the health endpoint, and in particular this line which caused Start() itself to wait forever. As a consequence, the setup of the health endpoint was never reached while conduit was running.

Issue

141

TODO's

Testing

Introducing TestHealthEndpoint() in cli_test.go for checking that the health endpoint is ON/OFF as configured. I verified that when the bug is re-introduced, the API_ON case fails as expected. For the purposes of the test, I also introduced a noop importer which waits 100 ms before returning in its GetBlock() method.

codecov[bot] commented 1 year ago

Codecov Report

Merging #147 (d635841) into master (442791a) will increase coverage by 5.23%. Report is 57 commits behind head on master. The diff coverage is 82.80%.

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
+ Coverage   67.66%   72.89%   +5.23%     
==========================================
  Files          32       38       +6     
  Lines        1976     2789     +813     
==========================================
+ Hits         1337     2033     +696     
- Misses        570      646      +76     
- Partials       69      110      +41     
Files Changed Coverage Δ
conduit/data/block_export_data.go 100.00% <ø> (+92.30%) :arrow_up:
conduit/metrics/metrics.go 100.00% <ø> (ø)
conduit/pipeline/metadata.go 73.52% <ø> (+4.41%) :arrow_up:
conduit/plugins/config.go 100.00% <ø> (ø)
conduit/plugins/importers/algod/metrics.go 100.00% <ø> (ø)
...gins/processors/filterprocessor/fields/searcher.go 77.50% <ø> (ø)
...ins/processors/filterprocessor/filter_processor.go 83.82% <ø> (+3.54%) :arrow_up:
...plugins/processors/filterprocessor/gen/generate.go 34.28% <ø> (ø)
conduit/plugins/processors/noop/noop_processor.go 64.70% <ø> (+6.81%) :arrow_up:
pkg/cli/internal/list/list.go 20.75% <ø> (ø)
... and 22 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

tzaffi commented 1 year ago

Approved pending your offer to remove the unused function.

d6358415c5c2cd598662697ab829b44977e7c3b3