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 catchup error on first run and add retry forever option. #89

Merged
merged 5 commits into from
May 31, 2023

Conversation

winder
Copy link
Contributor

@winder winder commented May 31, 2023

Summary

Two small changes:

  1. The needs catchup logic was incorrectly reporting an error on first run because there was no catchpoint available for round 0.
  2. Add handling for retry = 0 to cause the pipeline to keep retrying forever. This could be useful if algod is being upgraded or otherwise down for maintenance.

Test Plan

Update unit tests.

@winder winder requested review from tzaffi and Eric-Warehime May 31, 2023 16:40
@tzaffi
Copy link
Contributor

tzaffi commented May 31, 2023

Is this failing because the test needs updating or because the changes aren't correct?

@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #89 (014919f) into master (442791a) will increase coverage by 1.43%.
The diff coverage is 74.59%.

❗ Current head 014919f differs from pull request most recent head ee5735b. Consider uploading reports for the commit ee5735b to get more accurate results

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   67.66%   69.09%   +1.43%     
==========================================
  Files          32       36       +4     
  Lines        1976     2417     +441     
==========================================
+ Hits         1337     1670     +333     
- Misses        570      654      +84     
- Partials       69       93      +24     
Impacted Files Coverage Δ
conduit/data/block_export_data.go 100.00% <ø> (+92.30%) ⬆️
conduit/plugins/importers/algod/metrics.go 100.00% <ø> (ø)
...plugins/processors/filterprocessor/gen/generate.go 34.28% <ø> (ø)
pkg/cli/internal/list/list.go 20.75% <ø> (ø)
...lugins/exporters/postgresql/postgresql_exporter.go 66.66% <51.21%> (-11.54%) ⬇️
pkg/cli/cli.go 65.97% <65.97%> (ø)
conduit/pipeline/pipeline.go 66.18% <72.48%> (+0.72%) ⬆️
conduit/data/config.go 76.47% <76.47%> (ø)
conduit/plugins/importers/algod/algod_importer.go 87.34% <88.03%> (-0.97%) ⬇️
conduit/pipeline/errors.go 100.00% <100.00%> (ø)
... and 4 more

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

@winder winder marked this pull request as ready for review May 31, 2023 20:31
@winder winder requested a review from tzaffi May 31, 2023 20:31
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.

Looks good but I had one remaining question.

conduit/pipeline/pipeline_test.go Outdated Show resolved Hide resolved
@winder winder requested a review from tzaffi May 31, 2023 22:23
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.

LGTM

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.

2 participants