Closed Bug 1599658 Opened 5 years ago Closed 4 years ago

makefiles: use py3_action instead of py_action

Categories

(Firefox Build System :: General, task)

task
Not set
normal

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mars, Assigned: rstewart)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

As part of the Firefox build system conversion to Python 3 we need to update our Makefiles to use Python 3 instead of Python 2.

Bug 1599648 adds a new py3_action build action that Makefiles can use to run code with Python 3 instead of Python 2. The occurrences of py_action in the Makefiles need to be changed to py3_action (probably not all at once) so that we have no Makefile dependencies on Python 2.

To do the port change one or more occurrences of py_action to py3_action and check that Firefox builds successfully on your platform. Use Try to verify that your changes build on all platforms before landing them.

We'll know this is done when we can remove the py_action function for Make and for Tup and nothing fails.

Occurrences are easy to find with ripgrep:

 ~/w/firefox  rg py_action
Makefile.in
104:	$(addprefix $(call py_action,process_install_manifest,--track install_$(subst /,_,$*).track $*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
114:	$(call py_action,process_install_manifest,--track install__test_files.track _tests _build_manifests/install/_test_files)
162:	$(call py_action,fat_aar,\
249:	$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' \
256:	$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \
...
Assignee: nobody → mshal
Depends on: 1611326
Depends on: 1616630
Depends on: 1618620
Depends on: 1620035
Depends on: 1620140
Depends on: 1620143
Depends on: 1620449
Depends on: 1620744
Depends on: 1621359
Depends on: 1621361
Depends on: 1621363
Depends on: 1621436
Depends on: 1621439
Depends on: 1621440
Depends on: 1621441
Depends on: 1621442
Depends on: 1621447
Depends on: 1621448
Blocks: 1621451
Depends on: 1621560
Assignee: mshal → nobody
Depends on: 1623718
Depends on: 1628205
Depends on: 1632573
Depends on: 1632916
Depends on: 1632920
Depends on: 1633016
Assignee: nobody → rstewart
Status: NEW → ASSIGNED
Attachment #9143274 - Attachment description: Bug 1599658 - Delete definition of py_action in Makefiles, leaving only py3_action → Bug 1599658 - Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist.
Pushed by rstewart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d06b0ec349f8 Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist. r=glandium
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77

Backed out 6 changesets (bug 1632916, bug 1599658, bug 1633037, bug 1633039, bug 1633016, bug 1632920) for SA bustages

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedTaskRun=Md5eFYLVTkaNzJ_njGqo0Q-0&searchStr=static-analysis-autotest&fromchange=c7a7b7056257586a7c07f8864de3cc3d64c76eac&tochange=1e7acd6af3ee39f1ef2e6db60ca8ec1f08685f46

Backout link: https://hg.mozilla.org/integration/autoland/rev/1e7acd6af3ee39f1ef2e6db60ca8ec1f08685f46

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300436002&repo=autoland&lineNumber=1746

...
[task 2020-05-01T22:26:16.170Z] RUNNING: clang-tidy checker readability-uniqueptr-delete-release.
[task 2020-05-01T22:26:16.210Z] Error running mach:
[task 2020-05-01T22:26:16.210Z] 
[task 2020-05-01T22:26:16.210Z]     ['--log-no-times', 'static-analysis', 'autotest', '--intree-tool']
[task 2020-05-01T22:26:16.210Z] 
[task 2020-05-01T22:26:16.210Z] The error occurred in code that was called by the mach command. This is either
[task 2020-05-01T22:26:16.210Z] a bug in the called code itself or in the way that mach is calling it.
[task 2020-05-01T22:26:16.210Z] You can invoke |./mach busted| to check if this issue is already on file. If it
[task 2020-05-01T22:26:16.210Z] isn't, please use |./mach busted file| to report it. If |./mach busted| is
[task 2020-05-01T22:26:16.210Z] misbehaving, you can also inspect the dependencies of bug 1543241.
[task 2020-05-01T22:26:16.210Z] 
[task 2020-05-01T22:26:16.210Z] If filing a bug, please include the full output of mach, including this error
[task 2020-05-01T22:26:16.210Z] message.
[task 2020-05-01T22:26:16.210Z] 
[task 2020-05-01T22:26:16.210Z] The details of the failure are as follows:
[task 2020-05-01T22:26:16.210Z] 
[task 2020-05-01T22:26:16.210Z] OSError: [Errno 2] No such file or directory
[task 2020-05-01T22:26:16.210Z] 
[task 2020-05-01T22:26:16.210Z]   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/code-analysis/mach_commands.py", line 1177, in autotest
[task 2020-05-01T22:26:16.210Z]     ret_val = future.result()
[task 2020-05-01T22:26:16.210Z]   File "/builds/worker/checkouts/gecko/third_party/python/futures/concurrent/futures/_base.py", line 398, in result
[task 2020-05-01T22:26:16.211Z]     return self.__get_result()
[task 2020-05-01T22:26:16.211Z]   File "/builds/worker/checkouts/gecko/third_party/python/futures/concurrent/futures/thread.py", line 55, in run
[task 2020-05-01T22:26:16.211Z]     result = self.fn(*self.args, **self.kwargs)
[task 2020-05-01T22:26:16.211Z]   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/code-analysis/mach_commands.py", line 1724, in _verify_checker
[task 2020-05-01T22:26:16.211Z]     checks='-*,' + check, header_filter='', sources=[test_file_path_cpp])
[task 2020-05-01T22:26:16.212Z]   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/code-analysis/mach_commands.py", line 1246, in _run_analysis
[task 2020-05-01T22:26:16.212Z]     clang_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8')
[task 2020-05-01T22:26:16.212Z]   File "/usr/lib/python2.7/subprocess.py", line 212, in check_output
[task 2020-05-01T22:26:16.212Z]     process = Popen(stdout=PIPE, *popenargs, **kwargs)
[task 2020-05-01T22:26:16.212Z]   File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
[task 2020-05-01T22:26:16.213Z]     errread, errwrite)
[task 2020-05-01T22:26:16.213Z]   File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
[task 2020-05-01T22:26:16.213Z]     raise child_exception
[task 2020-05-01T22:26:16.236Z] 22:26:16  WARNING - setting return code to 2
[task 2020-05-01T22:26:16.236Z] 22:26:16    FATAL - 'mach static-analysis autotest --intree-tool' did not run successfully. Please check log for errors.
[task 2020-05-01T22:26:16.237Z] 22:26:16    FATAL - Running post_fatal callback...
[task 2020-05-01T22:26:16.237Z] 22:26:16    FATAL - Exiting -1
Status: RESOLVED → REOPENED
Flags: needinfo?(rstewart)
Resolution: FIXED → ---
Target Milestone: mozilla77 → ---
Flags: needinfo?(rstewart)
Pushed by rstewart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce693358ceb4 Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist. r=glandium
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: