Error in reporting guix deploy error

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Lemmer Webber
  • Ludovic Courtès
Owner
unassigned
Submitted by
Christopher Lemmer Webber
Severity
normal

Debbugs page

Christopher Lemmer Webber wrote 4 years ago
(address . bug-guix@gnu.org)
8736102bdl.fsf@dustycloud.org
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?
Christopher Lemmer Webber wrote 4 years ago
87wnyb29pb.fsf@dustycloud.org
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:

Toggle quote (30 lines)
> 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?
Ludovic Courtès wrote 4 years ago
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 44825-done@debbugs.gnu.org)
87eekfzqp0.fsf@gnu.org
Hi Chris,

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

Toggle quote (18 lines)
> 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’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 44825@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44825
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help