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

api: New API with health endpoint #139

Merged
merged 6 commits into from
Aug 22, 2023
Merged

Conversation

winder
Copy link
Contributor

@winder winder commented Aug 16, 2023

Summary

Add a new option for an API which includes a health endpoint to return the current round.

Demo and overview.

Test Plan

New unit tests.

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #139 (bf2092a) into master (442791a) will increase coverage by 4.05%.
Report is 53 commits behind head on master.
The diff coverage is 80.81%.

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   67.66%   71.71%   +4.05%     
==========================================
  Files          32       37       +5     
  Lines        1976     2747     +771     
==========================================
+ Hits         1337     1970     +633     
- Misses        570      678     +108     
- Partials       69       99      +30     
Files Changed Coverage Δ
conduit/data/block_export_data.go 100.00% <ø> (+92.30%) ⬆️
conduit/metrics/metrics.go 100.00% <ø> (ø)
conduit/pipeline/metadata.go 69.11% <ø> (ø)
conduit/plugins/config.go 100.00% <ø> (ø)
...duit/plugins/exporters/filewriter/file_exporter.go 81.63% <ø> (-1.06%) ⬇️
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%) ⬆️
...plugins/processors/filterprocessor/gen/generate.go 34.28% <ø> (ø)
conduit/plugins/processors/noop/noop_processor.go 64.70% <ø> (+6.81%) ⬆️
... and 21 more

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

@winder winder force-pushed the will/health branch 2 times, most recently from d43f613 to c7a5dc3 Compare August 17, 2023 13:07
Remove telemetry from default template. It is not yet available.

Add tests and minor refactoring for testability.

Address linter complaints.

Revert some unnecessary refactoring.
@winder winder requested review from algochoi and tzaffi August 17, 2023 17:38
@winder winder marked this pull request as ready for review August 17, 2023 17:38
Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

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

I like the video demo, very neat and we should do it more often.
I also tried it out on sandbox, but failed -- it looks like the metrics endpoint is exposed, is there a similar thing we can do for /health or am I just misusing it?

conduit/pipeline/pipeline.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

still working through the review, but I was pinged and don't want to keep folks waiting

api/api.go Outdated Show resolved Hide resolved
conduit/pipeline/pipeline.go Outdated Show resolved Hide resolved
@winder winder requested review from algochoi and tzaffi August 17, 2023 19:28
api/api.go Show resolved Hide resolved
conduit/data/config.go Show resolved Hide resolved
api/api_test.go Show resolved Hide resolved
api/api_test.go Show resolved Hide resolved
conduit/pipeline/pipeline.go Show resolved Hide resolved
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

IMO, this is approvable, but let's wait for #128 to get merged in first.

Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

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

LGTM -- do we need to do something special to expose this endpoint in sandbox environments?

@winder
Copy link
Contributor Author

winder commented Aug 18, 2023

LGTM -- do we need to do something special to expose this endpoint in sandbox environments?

A new port would need to be exposed for this to be available in sandbox

@winder winder merged commit 9243819 into algorand:master Aug 22, 2023
3 checks passed
@winder winder deleted the will/health branch August 22, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants