Skip to content

Commit 8c14342

Browse files
author
Ender Tunc
committed
add logs about retry attempts
1 parent bcd8ccf commit 8c14342

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/core/src/main/scala/org/scalasteward/core/forge/gitlab/GitLabApiAlg.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,18 @@ final class GitLabApiAlg[F[_]: Parallel](
218218
.flatMap {
219219
case mr if mr.mergeStatus =!= GitLabMergeStatus.Checking => F.pure(mr)
220220
case _ if retries > 0 =>
221-
temporal.sleep(initialDelay) >> waitForMergeRequestStatus(
221+
logger.info(
222+
s"Merge request is still in '${GitLabMergeStatus.Checking}' state. We will check merge request status in $initialDelay again. " +
223+
s"Remaining retries count is $retries"
224+
) >> temporal.sleep(initialDelay) >> waitForMergeRequestStatus(
222225
number,
223226
retries - 1,
224227
initialDelay * backoffMultiplier
225228
)
226229
case other =>
227230
logger
228231
.warn(
229-
s"Exhausted all retires while waiting for merge request status. Last known status is ${other.mergeStatus}"
232+
s"Exhausted all retires while waiting for merge request status. Last known status is '${other.mergeStatus}'"
230233
)
231234
.as(other)
232235
}

0 commit comments

Comments
 (0)