+semver:minor Add PalasoImage robust helper default overrides (BL-16221)#1499
+semver:minor Add PalasoImage robust helper default overrides (BL-16221)#1499andrew-polk wants to merge 1 commit into
Conversation
tombogle
left a comment
There was a problem hiding this comment.
@tombogle reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on andrew-polk).
SIL.Windows.Forms/ImageToolbox/PalasoImage.cs line 377 at r1 (raw file):
// Again you'd expect that if it's corrupt, it would stay that way, but // experimentally, it seems we can get this if the file can't be read because it is (temporarily?) locked. // (The text of the message reads, "File could not be read and is possible corrupted", which
typo: possibly
Since you're there, you probably should also capitalize "experimentally"
JohnThomson
left a comment
There was a problem hiding this comment.
@JohnThomson reviewed all commit messages and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on andrew-polk).
SIL.Windows.Forms/ImageToolbox/PalasoImage.cs line 416 at r1 (raw file):
int maxRetryAttempts = RetryUtility.kDefaultMaxRetryAttempts, int retryDelay = RetryUtility.kDefaultRetryDelay, HashSet<Type> retryOnExceptions = null)
I would be inclined to make this additionalRetryOnExceptions, and union it with the three we already know are likely. Is there any reason we would NOT want to include the types we already know can be a problem? So it makes life easier for the client, and also, a client will automatically benefit from any further ones that get added to the library.
JohnThomson
left a comment
There was a problem hiding this comment.
One suggestion, but if you don't think it's a good idea,
@JohnThomson reviewed 3 files and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on andrew-polk).
And expand the exception types which are retried
62b2ae5 to
f954a16
Compare
andrew-polk
left a comment
There was a problem hiding this comment.
@andrew-polk made 2 comments.
Reviewable status: 1 of 4 files reviewed, 2 unresolved discussions (waiting on JohnThomson and tombogle).
SIL.Windows.Forms/ImageToolbox/PalasoImage.cs line 377 at r1 (raw file):
Previously, tombogle (Tom Bogle) wrote…
typo: possibly
Since you're there, you probably should also capitalize "experimentally"
Done.
SIL.Windows.Forms/ImageToolbox/PalasoImage.cs line 416 at r1 (raw file):
Previously, JohnThomson (John Thomson) wrote…
I would be inclined to make this additionalRetryOnExceptions, and union it with the three we already know are likely. Is there any reason we would NOT want to include the types we already know can be a problem? So it makes life easier for the client, and also, a client will automatically benefit from any further ones that get added to the library.
Done.
tombogle
left a comment
There was a problem hiding this comment.
FYI: I didn't carefully re-review the file with the changes @JohnThomson suggested, since I figured he'd look over that.
@tombogle reviewed 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on JohnThomson).
JohnThomson
left a comment
There was a problem hiding this comment.
@JohnThomson reviewed 3 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on andrew-polk).
SIL.Windows.Forms/ImageToolbox/PalasoImage.cs line 451 at r2 (raw file):
exceptionTypesToRetry.UnionWith(additionalExceptionTypesToRetry); return exceptionTypesToRetry;
Sorry, but this feels like unnecessary complexity arising from an AI trying too hard to generalize things. We have two new methods, each of which has only one caller. Why not just have the original method create the set, with the build-in types in the constructor, and union in the extra exception types if any?
What you have is satisfactory, so I'm approving it, and if you really think the extra methods help you can just merge.
And expand the exception types which are retried
This change is