unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44825: Error in reporting guix deploy error
@ 2020-11-23 18:09 Christopher Lemmer Webber
  2020-11-23 18:45 ` Christopher Lemmer Webber
  2020-11-26 22:41 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Christopher Lemmer Webber @ 2020-11-23 18:09 UTC (permalink / raw)
  To: 44825

Seems strange... the message I get:

  guix deploy: error: failed to deploy tulsi: ~A: ~S

Errors upon errors!  Formatting this time, apparently. :)

Looking at the relevant code:

(define (deploy-machine* store machine)
  "Deploy MACHINE, taking care of error handling."
  (info (G_ "deploying to ~a...~%")
        (machine-display-name machine))

  (guard (c ((message-condition? c)
             (report-error (G_ "failed to deploy ~a: ~a~%")
                           (machine-display-name machine)
                           (condition-message c)))
            ((deploy-error? c)
             (when (deploy-error-should-roll-back c)
               (info (G_ "rolling back ~a...~%")
                     (machine-display-name machine))
               (run-with-store store (roll-back-machine machine)))
             (apply throw (deploy-error-captured-args c))))
    (run-with-store store (deploy-machine machine))

    (info (G_ "successfully deployed ~a~%")
          (machine-display-name machine))))

I looked at other examples of report-error, they seemed similar.. can't
see why this one wouldn't be formatting correctly.  Any idea?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#44825: Error in reporting guix deploy error
  2020-11-23 18:09 bug#44825: Error in reporting guix deploy error Christopher Lemmer Webber
@ 2020-11-23 18:45 ` Christopher Lemmer Webber
  2020-11-26 22:41 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Lemmer Webber @ 2020-11-23 18:45 UTC (permalink / raw)
  Cc: 44825

By the way, I did pinpoint out what caused the failure in *deploying*,
but not what caused the error message to not format correctly.

The mistake was:

(modify-services  %desktop-services
        (guix-service-type config =>
                          (guix-configuration
                           (inherit config)
                           (authorized-keys
-                           (append (list (local-file "twig-guix-signing-key.pub"))
+                           (append (list (local-file "../keys/twig-guix-signing-key.pub"))
                                    %default-authorized-guix-keys)))))

So basically I referenced a file that doesn't exist with local-file.

But why would that cause the string formatting to fail?  Dunno...

Christopher Lemmer Webber writes:

> Seems strange... the message I get:
>
>   guix deploy: error: failed to deploy tulsi: ~A: ~S
>
> Errors upon errors!  Formatting this time, apparently. :)
>
> Looking at the relevant code:
>
> (define (deploy-machine* store machine)
>   "Deploy MACHINE, taking care of error handling."
>   (info (G_ "deploying to ~a...~%")
>         (machine-display-name machine))
>
>   (guard (c ((message-condition? c)
>              (report-error (G_ "failed to deploy ~a: ~a~%")
>                            (machine-display-name machine)
>                            (condition-message c)))
>             ((deploy-error? c)
>              (when (deploy-error-should-roll-back c)
>                (info (G_ "rolling back ~a...~%")
>                      (machine-display-name machine))
>                (run-with-store store (roll-back-machine machine)))
>              (apply throw (deploy-error-captured-args c))))
>     (run-with-store store (deploy-machine machine))
>
>     (info (G_ "successfully deployed ~a~%")
>           (machine-display-name machine))))
>
> I looked at other examples of report-error, they seemed similar.. can't
> see why this one wouldn't be formatting correctly.  Any idea?





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#44825: Error in reporting guix deploy error
  2020-11-23 18:09 bug#44825: Error in reporting guix deploy error Christopher Lemmer Webber
  2020-11-23 18:45 ` Christopher Lemmer Webber
@ 2020-11-26 22:41 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2020-11-26 22:41 UTC (permalink / raw)
  To: Christopher Lemmer Webber; +Cc: 44825-done

Hi Chris,

Christopher Lemmer Webber <cwebber@dustycloud.org> skribis:

> Seems strange... the message I get:
>
>   guix deploy: error: failed to deploy tulsi: ~A: ~S
>
> Errors upon errors!  Formatting this time, apparently. :)
>
> Looking at the relevant code:
>
> (define (deploy-machine* store machine)
>   "Deploy MACHINE, taking care of error handling."
>   (info (G_ "deploying to ~a...~%")
>         (machine-display-name machine))
>
>   (guard (c ((message-condition? c)
>              (report-error (G_ "failed to deploy ~a: ~a~%")
>                            (machine-display-name machine)
>                            (condition-message c)))

[...]

I believe this is fixed by 5842239a66683b2f5e36e95da8225e2ab7f7dac3.

Thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-26 22:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 18:09 bug#44825: Error in reporting guix deploy error Christopher Lemmer Webber
2020-11-23 18:45 ` Christopher Lemmer Webber
2020-11-26 22:41 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).