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

add max tries and interval #18

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

ZzzzHui
Copy link
Collaborator

@ZzzzHui ZzzzHui commented Feb 4, 2025

No description provided.

@ZzzzHui ZzzzHui requested a review from miltonjonat February 4, 2025 06:33
@ZzzzHui ZzzzHui self-assigned this Feb 4, 2025
@ZzzzHui ZzzzHui linked an issue Feb 4, 2025 that may be closed by this pull request
Copy link
Collaborator

@miltonjonat miltonjonat left a comment

Choose a reason for hiding this comment

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

It works in practice, but I think we could improve things a bit:

  1. Couldn't we use the same policy env vars when attempting to read the DB NodeConfig in main.go?
  2. Would it make sense to add a test case to show that we correctly handle these misconfiguration situations?

if err != nil {
slog.Error("failed fetching latest espresso block height", "error", err)
continue
os.Exit(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why doesn't it return with an error? Isn't it too strong to exit the whole thing since this is not main.go?

@ZzzzHui ZzzzHui force-pushed the feature/max-tries-and-interval branch from a68b829 to e6563b6 Compare February 5, 2025 06:48
@ZzzzHui
Copy link
Collaborator Author

ZzzzHui commented Feb 5, 2025

Would it make sense to add a test case to show that we correctly handle these misconfiguration situations?

Not sure about this. Retry policy was already tested in its own package

@ZzzzHui ZzzzHui merged commit 2178a13 into main Feb 6, 2025
5 checks passed
@ZzzzHui ZzzzHui deleted the feature/max-tries-and-interval branch February 6, 2025 20:44
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.

Handle failures when querying current Espresso block-height on startup
2 participants