Closed Bug 1530391 Opened 6 years ago Closed 6 years ago

Intermittent: less: not found

Categories

(Firefox Build System :: Task Configuration, task)

task
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: apavel, Assigned: sfraser)

Details

Attachments

(1 file, 1 obsolete file)

Treeherder link: https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&selectedJob=230260759

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=230260759&repo=mozilla-central&lineNumber=1486

comparing with https://hg.mozilla.org/mozilla-central
searching for changes
/bin/sh: 1: less: not found
[taskcluster 2019-02-25 10:07:57.980Z] === Task Finished ===
[taskcluster 2019-02-25 10:07:58.740Z] Unsuccessful task run with exit code: 255 completed in 228.572 seconds

Summary: Intermittent fug less: not found → Intermittent: less: not found

It looks like this is a crontask to update the funsize pipfile. It seems the pipfile diff is getting large enough that the diff implementation is trying to use a pager -- and no pager is installed. I see sfraser in REVIEWERs, so I'm figuring you know something about this :)

Flags: needinfo?(sfraser)

This seems to be set in https://hg.mozilla.org/mozilla-central/file/tip/taskcluster/docker/recipes/hgrc#l33

Since none of the places that draw that in are interactive, I'd like to turn it off there rather than special-case this current image. Thoughts?

Flags: needinfo?(sfraser)
Assignee: nobody → sfraser

I suspect that line is there to support people using interactive tasks.

(In reply to Tom Prince [:tomprince] from comment #3)

I suspect that line is there to support people using interactive tasks.

Agreed. I don't know if that's a large enough user-base to warrant not changing it, though. Perhaps an hgrc-interactive option to %include?

Ideally, a tool shouldn't try to use a pager if it detects it's not running with a terminal (and this invocation is piped to 'tee'). Option 2 would be to set up non-interactive tasks so they're configured that way, but for now the patch is a workaround.

The problem is that our docker setup makes processes running under think they are running in a terminal. Thus the tool trying to use a pager. Now, the side effect of installing less might be that now, it will find a pager, the pager will be used, and the pager will stay there forever waiting for user input...

A better option might be to add:

[ui]
paginate = never

to hgrc. Or to pass --config ui.paginate=never on the mercurial command line (so that the pager still works in interactive tasks)

(and this invocation is piped to 'tee')

That doesn't seem plausible. The last log lines before the failure say:

comparing with https://hg.mozilla.org/mozilla-central
searching for changes

and that's after the diff.

That looks like this would come from the ${HG} -R "${REPODIR}" out or push_repo command.

BTW, it would be good to add set -x to the script so that it's clearer what command it is that fails (in the future).

(In reply to Mike Hommey [:glandium] from comment #9)

That looks like this would come from the ${HG} -R "${REPODIR}" out or push_repo command.

You're right, I misread that.

Attachment #9046640 - Attachment is obsolete: true

(In reply to Mike Hommey [:glandium] from comment #8)

A better option might be to add:

[ui]
paginate = never

to hgrc. Or to pass --config ui.paginate=never on the mercurial command line (so that the pager still works in interactive tasks)

Adding (and remembering to add!) that to every invocation seems like an awkward workaround. I could alias 'hg' at the top, I suppose.

Part of my reluctance is that I do expect interactive tasks based on non-interactive originals to not have all the niceties, so I'm unsure how far we should be bending to make things convenient at the expense of the task's main operating mode.

Disabling paging for interactive use only means having to run hg diff | less in the cases where the diff is too big -- maybe changing the default is the least-bad option?

Setting the HGPLAIN environment variable should do it too.

I've set HGPLAIN in the container entrypoint so that people running
the main script interactively still get the nice features.

Pushed by sfraser@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45b6b4f345d5 Disable hg extensions incompatible automated tasks r=dustin
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: