Skip to content

Conversation

@inteon
Copy link
Contributor

@inteon inteon commented Nov 14, 2025

This should help with debugging https://venafi.atlassian.net/browse/VC-46449.

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@inteon inteon added the test-e2e To signal e2e test job to be run label Nov 14, 2025
notificationFunc := backoff.Notify(func(err error, t time.Duration) {
eventf("Warning", "PushingErr", "retrying in %v after error: %s", t, err)
log.Info("Warning: PushingErr: retrying", "in", t, "reason", err)
log.Error(err, "Warning: PushingErr: will retry", "retry_after", t)
Copy link
Member

Choose a reason for hiding this comment

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

This will make the temporary problem more prominent (Error instead of Info) in the logs of the affected user.
There's a risk that other users might find it annoying to suddenly get new errors logged in normal operation.
This backoff feature is intended to smooth over temporary network errors or API errors, so that the user doesn't have to worry about them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with Richard. I believe a warning level is more appropriate.

post := func() (any, error) {
return struct{}{}, postData(klog.NewContext(ctx, log), config, preflightClient, readings)
postCtx, cancel := context.WithTimeout(ctx, config.BackoffMaxTime)
defer cancel()
Copy link
Member

Choose a reason for hiding this comment

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

👍 Good idea, using the existing BackoffMaxTime as the operation timeout, to ensure that no single upload attempt can hang for ever and block the retry.

It seems to me that the backoff module should do this, but it doesn't seem to.

...and the author seems to be adamant that the supplied function should do it's own context cancellation:

@wallrj-cyberark
Copy link
Member

You'll need to push another commit to trigger the E2E tests. It only runs them in response to a commit pushed after the test-e2e label has been added.

@inteon inteon merged commit 14ee0dc into master Nov 14, 2025
9 checks passed
@wallrj-cyberark wallrj-cyberark deleted the add_upload_timeout branch November 14, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-e2e To signal e2e test job to be run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants