-
Notifications
You must be signed in to change notification settings - Fork 31
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 errors for Solana cases that precede confirmed #2544
Add errors for Solana cases that precede confirmed #2544
Conversation
Co-authored-by: Pavel Brm <[email protected]>
Co-authored-by: Pavel Brm <[email protected]>
Co-authored-by: Pavel Brm <[email protected]>
* improve kaniko caching and add to payments shell * automatically fetch env and pass during pcr2 build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better. Left a few non-blocking suggestions.
if persistedState != nil && | ||
persistedState.ExternalIdempotency != nil && | ||
state.ExternalIdempotency != nil && | ||
!bytes.Equal(state.ExternalIdempotency, persistedState.ExternalIdempotency) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point (soon) it might be good to extract this into a separate predicate to be able to test it in isolation.
if errors.Is(err, SolanaTransactionNotConfirmedError) || | ||
errors.Is(err, SolanaTransactionNotFoundError) || | ||
errors.Is(err, SolanaTransactionUnknownError) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be extracted into a helper predicate:
func isErrSolanaTransaction(err error) bool {
if err == nil {
return false
}
return errors.Is(err, SolanaTransactionNotConfirmedError) || errors.Is(err, SolanaTransactionNotFoundError) || errors.Is(err, SolanaTransactionUnknownError)
}
Co-authored-by: Pavel Brm <[email protected]>
Summary
Closes #2525
Type of Change
Tested Environments
Before Requesting Review
Manual Test Plan