Skip to content

Commit

Permalink
updated docker file, fix deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Sep 25, 2023
1 parent 682f066 commit 8d279a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine3.18 as builder
FROM golang:1.21-alpine3.18 as builder
ENV GO111MODULE=on

RUN apk update && \
Expand Down Expand Up @@ -42,4 +42,4 @@ COPY --from=builder /usr/local/bin/radix-api /usr/local/bin/radix-api

EXPOSE 3001
USER 1000
ENTRYPOINT ["/usr/local/bin/radix-api"]
ENTRYPOINT ["/usr/local/bin/radix-api"]
5 changes: 3 additions & 2 deletions api/alerting/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (h *handler) validateUpdateSlackConfig(slackConfig *alertModels.UpdateSlack
func (h *handler) waitForRadixAlertReconciled(ctx context.Context, source *radixv1.RadixAlert) (*radixv1.RadixAlert, bool) {
var reconciledAlert *radixv1.RadixAlert

hasReconciled := func() (bool, error) {
hasReconciled := func(ctx context.Context) (bool, error) {
radixAlert, err := h.accounts.UserAccount.RadixClient.RadixV1().RadixAlerts(source.Namespace).Get(ctx, source.Name, metav1.GetOptions{})
if err != nil {
return false, err
Expand All @@ -233,9 +233,10 @@ func (h *handler) waitForRadixAlertReconciled(ctx context.Context, source *radix
return radixAlert.Status.Reconciled != nil, nil
}

if err := wait.PollImmediate(h.reconcilePollInterval, h.reconcilePollTimeout, hasReconciled); err != nil {
if err := wait.PollUntilContextTimeout(ctx, h.reconcilePollInterval, h.reconcilePollTimeout, true, hasReconciled); err != nil {
return nil, false
}

return reconciledAlert, true
}

Expand Down

0 comments on commit 8d279a8

Please sign in to comment.