tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 4da439adf9961e21a7bc3b241ce30b85357f57dd
parent 5d29082a538f7f270cd4f01b477008b4fda35bd7
Author: Atila Butkovits <abutkovits@mozilla.com>
Date:   Wed, 29 Oct 2025 21:23:36 +0200

Revert "Bug 1980436 - [ci] Run Taskgraph verifications in a standalone task instead of Decision task, r=taskgraph-reviewers,releng-reviewers,bhearsum" for causing skip-fail failures.

This reverts commit 68043b8ca6bd75017a25ca6ad1326455447b8196.

Revert "Bug 1980436 - [ci] Support --no-verify in Gecko taskgraph, r=taskgraph-reviewers,bhearsum"

This reverts commit 0652a6d0421a48be778213d8f207bfcdc953f9fd.

Revert "Bug 1980436 - Format taskcluster/gecko_taskgraph/main.py, r=taskgraph-reviewers,bhearsum"

This reverts commit fcee2e77a5684624cddd21c6df0d31827ee30cd5.

Diffstat:
M.taskcluster.yml | 6+-----
Mtaskcluster/gecko_taskgraph/decision.py | 1-
Mtaskcluster/gecko_taskgraph/main.py | 20++++++++------------
Mtaskcluster/kinds/source-test/python.yml | 17-----------------
Mtaskcluster/test/python.toml | 3---
Dtaskcluster/test/test_decision_verify.py | 123-------------------------------------------------------------------------------
6 files changed, 9 insertions(+), 161 deletions(-)

diff --git a/.taskcluster.yml b/.taskcluster.yml @@ -243,11 +243,7 @@ tasks: - bash - -cx - $let: - extraArgs: - $switch: - 'tasks_for == "cron"': '${cron.quoted_args}' - 'repository.project in ["autoland", "try"]': '--no-verify' - $default: '' + extraArgs: {$if: 'tasks_for == "cron"', then: '${cron.quoted_args}', else: ''} in: $if: 'tasks_for == "action"' then: > diff --git a/taskcluster/gecko_taskgraph/decision.py b/taskcluster/gecko_taskgraph/decision.py @@ -183,7 +183,6 @@ def taskgraph_decision(options, parameters=None): parameters=parameters, decision_task_id=decision_task_id, write_artifacts=True, - enable_verifications=options.get("verify", True), ) if not create.testing: diff --git a/taskcluster/gecko_taskgraph/main.py b/taskcluster/gecko_taskgraph/main.py @@ -145,7 +145,7 @@ FORMAT_METHODS["yaml"] = format_taskgraph_yaml "--tasks-regex", "--tasks", default=None, - help="only return tasks with labels matching this regular expression.", + help="only return tasks with labels matching this regular " "expression.", ) @argument( "--exclude-key", @@ -379,7 +379,8 @@ def show_taskgraph(options): if options["format"] != "json": print( - 'If you were expecting differences in task bodies you should pass "-J"\n', + "If you were expecting differences in task bodies " + 'you should pass "-J"\n', file=sys.stderr, ) @@ -414,7 +415,8 @@ def build_image(args): ) @argument( "--task-id", - help="Load the image at public/image.tar.zst in this task, rather than searching the index", + help="Load the image at public/image.tar.zst in this task, " + "rather than searching the index", ) @argument( "-t", @@ -451,7 +453,8 @@ def load_image(args): @command("image-digest", help="Print the digest of a docker image.") @argument( "image_name", - help="Print the digest of the image of this name based on the current contents of the tree.", + help="Print the digest of the image of this name based on the current " + "contents of the tree.", ) def image_digest(args): from taskgraph.docker import get_image_digest @@ -514,13 +517,6 @@ def image_digest(args): "--tasks-for", required=True, help="the tasks_for value used to generate this task" ) @argument("--try-task-config-file", help="path to try task configuration file") -@argument( - "--no-verify", - dest="verify", - default=True, - action="store_false", - help="Skip graph verifications.", -) def decision(options): from gecko_taskgraph.decision import taskgraph_decision @@ -576,7 +572,7 @@ def action_callback(options): "--parameters", "-p", default="", - help="parameters file (.yml or .json; see `taskcluster/docs/parameters.rst`)`", + help="parameters file (.yml or .json; see " "`taskcluster/docs/parameters.rst`)`", ) @argument("--task-id", default=None, help="TaskId to which the action applies") @argument( diff --git a/taskcluster/kinds/source-test/python.yml b/taskcluster/kinds/source-test/python.yml @@ -628,23 +628,6 @@ telemetry-python: files-changed: - 'toolkit/components/telemetry/**' -verify-decision: - description: verifications on Decision task output - run-on-projects: ["autoland"] - treeherder: - platform: gecko-decision/opt - symbol: verify - run: - using: python-test - subsuite: decision - when: - files-changed: - - .cron.yml - - .taskcluster.yml - - 'taskcluster/**' - - 'third_party/python/taskcluster/**' - - 'third_party/python/taskcluster_taskgraph/**' - webext: description: WebExtensions python utilities unit tests platform: diff --git a/taskcluster/test/python.toml b/taskcluster/test/python.toml @@ -5,9 +5,6 @@ subsuite = "ci" ["test_autoland_backstop.py"] -["test_decision_verify.py"] -subsuite = "decision" - ["test_generate_params.py"] ["test_mach_try_auto.py"] diff --git a/taskcluster/test/test_decision_verify.py b/taskcluster/test/test_decision_verify.py @@ -1,123 +0,0 @@ -# Any copyright is dedicated to the public domain. -# http://creativecommons.org/publicdomain/zero/1.0/ - -import os - -import gecko_taskgraph -import pytest -from gecko_taskgraph.util.verify import verifications -from mozunit import main -from taskgraph.generator import TaskGraphGenerator -from taskgraph.parameters import Parameters -from taskgraph.taskgraph import TaskGraph -from taskgraph.util.taskcluster import get_artifact - - -def pytest_generate_tests(metafunc): - if "verification" in metafunc.fixturenames: - name = metafunc.function.__name__.split("_", 1)[1] - verification_objs = verifications._verifications.get(name, []) - ids = [v.func.__name__ for v in verification_objs] - metafunc.parametrize("verification", verification_objs, ids=ids) - - -@pytest.fixture(scope="module") -def parameters(): - if "TASK_GROUP_ID" not in os.environ: - pytest.skip(reason="requires a Decision taskId to test against") - - return Parameters( - **get_artifact(os.environ["TASK_GROUP_ID"], "public/parameters.yml") - ) - - -@pytest.fixture(scope="module") -def tgg(parameters): - root = os.path.dirname(os.path.dirname(gecko_taskgraph.__file__)) - return TaskGraphGenerator(root, parameters) - - -@pytest.fixture(scope="module") -def graph_config(tgg): - return tgg.graph_config - - -@pytest.fixture(scope="module") -def kinds(tgg): - return {kind.name: kind for kind in tgg._load_kinds(tgg.graph_config, [])} - - -@pytest.fixture(scope="module") -def full_task_graph(): - if "TASK_GROUP_ID" not in os.environ: - pytest.skip(reason="requires a Decision taskId to test against") - - return TaskGraph.from_json( - get_artifact(os.environ["TASK_GROUP_ID"], "public/full-task-graph.json") - )[1] - - -@pytest.fixture(scope="module") -def target_task_graph(): - if "TASK_GROUP_ID" not in os.environ: - pytest.skip(reason="requires a Decision taskId to test against") - - return TaskGraph.from_json( - get_artifact(os.environ["TASK_GROUP_ID"], "public/target-tasks.json") - )[1] - - -@pytest.fixture(scope="module") -def morphed_task_graph(): - if "TASK_GROUP_ID" not in os.environ: - pytest.skip(reason="requires a Decision taskId to test against") - - return TaskGraph.from_json( - get_artifact(os.environ["TASK_GROUP_ID"], "public/task-graph.json") - )[1] - - -def test_initial(verification): - verification.verify() - - -def test_graph_config(verification, graph_config): - verification.verify(graph_config) - - -def test_kinds(verification, kinds): - verification.verify(kinds) - - -def test_parameters(verification, parameters): - verification.verify(parameters) - - -def test_full_task_set(verification, full_task_graph, graph_config, parameters): - # We don't write out the full_task_set as a decision task artifact, but - # the full_task_graph is functionally equivalent. - verification.verify(full_task_graph, graph_config, parameters) - - -def test_full_task_graph(verification, full_task_graph, graph_config, parameters): - verification.verify(full_task_graph, graph_config, parameters) - - -def test_target_task_graph(verification, target_task_graph, graph_config, parameters): - verification.verify(target_task_graph, graph_config, parameters) - - -def test_optimized_task_graph( - verification, morphed_task_graph, graph_config, parameters -): - # We don't write out the optimized graph as a decision task artifact, but - # the morphed graph is a good enough stand-in. - verification.verify(morphed_task_graph, graph_config, parameters) - - -def test_morphed_task_graph(verification, morphed_task_graph, graph_config, parameters): - verification.verify(morphed_task_graph, graph_config, parameters) - - -if __name__ == "__main__": - main()