Closed Bug 1751474 Opened 3 years ago Closed 3 years ago

Mapping is not part of Collections module

Categories

(Firefox Build System :: Task Configuration, defect)

defect

Tracking

(firefox-esr91 unaffected, firefox96 unaffected, firefox97 unaffected, firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox96 --- unaffected
firefox97 --- unaffected
firefox98 --- fixed

People

(Reporter: vringar, Assigned: vringar)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce:

I ran mach bootstrap which then proceeded to call mach with the following arguments ['artifact', 'toolchain', '--bootstrap', '--from-build', 'linux64-clang-tidy']

Actual results:

Since python 3.3 the collections module no longer contains the Mapping class.
Instead it now exists as collections.abc.Mapping.
This caused the subprocess to crash.

Expected results:

The existing class should have been imported

The stacktrace is

The details of the failure are as follows:

AttributeError: module 'collections' has no attribute 'Mapping'

  File "/run/media/stefan/SourceCode/mozilla-unified/python/mozbuild/mozbuild/artifact_commands.py", line 380, in artifact_toolchain
    tasks = toolchain_task_definitions()
  File "/run/media/stefan/SourceCode/mozilla-unified/python/mozbuild/mozbuild/toolchains.py", line 11, in toolchain_task_definitions
    from gecko_taskgraph.generator import load_tasks_for_kind
  File "/run/media/stefan/SourceCode/mozilla-unified/taskcluster/gecko_taskgraph/generator.py", line 10, in <module>
    from taskgraph.config import GraphConfig
  File "/run/media/stefan/SourceCode/mozilla-unified/third_party/python/taskcluster_taskgraph/taskgraph/config.py", line 19, in <module>
    graph_config_schema = Schema(
  File "/run/media/stefan/SourceCode/mozilla-unified/third_party/python/taskcluster_taskgraph/taskgraph/util/schema.py", line 187, in __init__
    check_schema(self)
  File "/run/media/stefan/SourceCode/mozilla-unified/third_party/python/taskcluster_taskgraph/taskgraph/util/schema.py", line 176, in check_schema
    iter("schema", schema.schema)
  File "/run/media/stefan/SourceCode/mozilla-unified/third_party/python/taskcluster_taskgraph/taskgraph/util/schema.py", line 164, in iter
    if isinstance(sch, collections.Mapping):

This has been fixed since last July.
Which revision/version of Firefox are you building?

Flags: needinfo?(stefan)

I am on branches/default/tip/trunk.
I'm pretty confused why it differs from what is shown on sf.

Flags: needinfo?(stefan)

ea0d2279861f02176a1d1f1080c455f8de308b41 is my hg commit hash.

It seems that my local repo is just completly messed up. Sorry for the bad report.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

Your repo is not messed up. The problem is that we have two versions of the same code, and one was fixed, and we recently switched to the one that is not fixed.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Component: Bootstrap Configuration → Task Configuration
Flags: needinfo?(ahal)
Assignee: nobody → stefan
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/ci/taskgraph/rev/ccc2f284abde Changed import to collections.abc r=ahal,releng-reviewers

Thanks, I just released taskgraph==1.1.2 with this fix. Don't have time to craft the Gecko update patch right now, but can likely get to it tonight.

Flags: needinfo?(ahal)
Regressed by: 1746414

This picks up a bustage fix that occurs with Python 3.10.

Attachment #9260289 - Attachment description: WIP: Bug 1751474 - Vendor taskcluster-taskgraph==1.1.2 → Bug 1751474 - Vendor taskcluster-taskgraph==1.1.2
Pushed by jcristau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2cb1f8cf75c4 Vendor taskcluster-taskgraph==1.1.2 r=jcristau

(In reply to Jens Stutte [:jstutte] from comment #13)

Applying that patch I get now (maybe unrelated):

See bug 1751673.

Has Regression Range: --- → yes
Pushed by csabou@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/7e667b6a803d Vendor taskcluster-taskgraph==1.1.2 r=jcristau
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
No longer regressions: 1759017
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: