Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-MatchManifest CPAN distribution.

Report information
The Basics
Id: 111943
Status: open
Priority: 0/
Queue: Dist-Zilla-Plugin-MatchManifest

People
Owner: Nobody in particular
Requestors: davidp [...] preshweb.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Hangs waiting on prompt even when run from dzil smoke
Hi, I had a Travis build which eventually timed out because D::Z::P::MM was waiting for someone to answer the "Update MANIFEST? [y/N]" question - even though the build was run using "dzil smoke", which sets $ENV{AUTOMATED_TESTING} etc. I'm not sure if the bug is in this plugin, though, or perhaps Dist::Zilla itself, as this plugin just calls $self->zilla->chrome->prompt_yn(), and you'd kinda expect that method to know that it can't ask a user who isn't there. Hmm. What do you think - a fix in this plugin to skip asking if $ENV{AUTOMATED_TESTING} is set, or a fix to D::Z instead?
On 2016-02-11 10:10:46, BIGPRESH wrote: Show quoted text
> I'm not sure if the bug is in this plugin, though, or perhaps > Dist::Zilla itself, [...]
I've raised a ticket for Dist::Zilla too, to discuss whether this should be fixed at a higher level so no other plugins have the same issue: https://github.com/rjbs/Dist-Zilla/issues/514
I'm not clear on exactly what's happening. Is something hanging when you try to install D::Z::P::MM, or do you have a dist that uses D::Z::P::MM and it's hanging when you try to build that dist? If it's the latter, I'm not sure that $ENV{AUTOMATED_TESTING} is relevant, because MatchManifest isn't running a test. I think you would want it to just answer N and have the build fail, because you shouldn't commit files without updating MANIFEST. But how does it know that there's nobody to answer the question?
On 2016-02-11 08:53:53, CJM wrote: Show quoted text
> I'm not clear on exactly what's happening. Is something hanging when > you try to install D::Z::P::MM, or do you have a dist that uses > D::Z::P::MM and it's hanging when you try to build that dist? > > If it's the latter, I'm not sure that $ENV{AUTOMATED_TESTING} is > relevant, because MatchManifest isn't running a test. I think you > would want it to just answer N and have the build fail, because you > shouldn't commit files without updating MANIFEST. But how does it > know that there's nobody to answer the question?
I have logic in Dist::Zilla::Plugin::PromptIfStale (which runs and prompts during the build and release phases) to not prompt if the build is non-interactive. You may want to do something similar in this plugin.
On 2016-02-11 16:53:53, CJM wrote: Show quoted text
> I'm not clear on exactly what's happening. Is something hanging when > you try to install D::Z::P::MM, or do you have a dist that uses > D::Z::P::MM and it's hanging when you try to build that dist?
The latter - Dancer (D1) to be precise - as part of our Travis CI testing, we run dzil smoke - but during that run, MatchManifest spots that I forgot to update the MANIFEST, asks if it should update it, and then simply waits until Travis times out the build - for e.g. this build: https://travis-ci.org/PerlDancer/Dancer/jobs/108424109 - as you'll see, Jenkins executed `dzil smoke --author --release`, and during that run, MatchManifest prompted, and thus the build hung. Show quoted text
> If it's the latter, I'm not sure that $ENV{AUTOMATED_TESTING} is > relevant, because MatchManifest isn't running a test. I think you > would want it to just answer N and have the build fail, because you > shouldn't commit files without updating MANIFEST. But how does it > know that there's nobody to answer the question?
Anything run via "dzil smoke" can be assumed to be run unattended, I'd say. dzil smoke, among other things, sets $ENV{AUTOMATED_TESTING}. As Karen suggests, not prompting if being run with nobody there to prompt would make sense, I think. I'm not sure, though, if this should be addressed here, or in D::Z itself, so it makes sense for all plugins - which is why I also raised https://github.com/rjbs/Dist-Zilla/issues/514 to discuss that. Hope that explains it a little better?