taskcluster-taskgraph 5.5.0__tar.gz → 5.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. {taskcluster-taskgraph-5.5.0/src/taskcluster_taskgraph.egg-info → taskcluster-taskgraph-5.6.0}/PKG-INFO +1 -1
  2. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0/src/taskcluster_taskgraph.egg-info}/PKG-INFO +1 -1
  3. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/__init__.py +1 -1
  4. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/config.py +5 -0
  5. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/task.py +13 -1
  6. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_task.py +74 -0
  7. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/LICENSE +0 -0
  8. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/MANIFEST.in +0 -0
  9. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/README.rst +0 -0
  10. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/pyproject.toml +0 -0
  11. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/requirements/base.in +0 -0
  12. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/requirements/base.txt +0 -0
  13. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/requirements/dev.in +0 -0
  14. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/requirements/dev.txt +0 -0
  15. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/requirements/test.in +0 -0
  16. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/requirements/test.txt +0 -0
  17. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/setup.cfg +0 -0
  18. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/setup.py +0 -0
  19. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskcluster_taskgraph.egg-info/SOURCES.txt +0 -0
  20. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskcluster_taskgraph.egg-info/dependency_links.txt +0 -0
  21. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskcluster_taskgraph.egg-info/entry_points.txt +0 -0
  22. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskcluster_taskgraph.egg-info/requires.txt +0 -0
  23. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskcluster_taskgraph.egg-info/top_level.txt +0 -0
  24. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/__init__.py +0 -0
  25. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/add_new_jobs.py +0 -0
  26. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/cancel.py +0 -0
  27. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/cancel_all.py +0 -0
  28. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/rebuild_cached_tasks.py +0 -0
  29. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/registry.py +0 -0
  30. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/retrigger.py +0 -0
  31. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/actions/util.py +0 -0
  32. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/create.py +0 -0
  33. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/decision.py +0 -0
  34. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/docker.py +0 -0
  35. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/files_changed.py +0 -0
  36. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/filter_tasks.py +0 -0
  37. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/generator.py +0 -0
  38. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/graph.py +0 -0
  39. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/loader/__init__.py +0 -0
  40. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/loader/default.py +0 -0
  41. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/loader/transform.py +0 -0
  42. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/main.py +0 -0
  43. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/morph.py +0 -0
  44. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/optimize/__init__.py +0 -0
  45. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/optimize/base.py +0 -0
  46. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/optimize/strategies.py +0 -0
  47. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/parameters.py +0 -0
  48. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/run-task/fetch-content +0 -0
  49. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/run-task/hgrc +0 -0
  50. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/run-task/robustcheckout.py +0 -0
  51. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/run-task/run-task +0 -0
  52. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/target_tasks.py +0 -0
  53. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/task.py +0 -0
  54. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/taskgraph.py +0 -0
  55. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/__init__.py +0 -0
  56. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/base.py +0 -0
  57. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/cached_tasks.py +0 -0
  58. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/code_review.py +0 -0
  59. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/docker_image.py +0 -0
  60. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/fetch.py +0 -0
  61. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/from_deps.py +0 -0
  62. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/job/__init__.py +0 -0
  63. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/job/common.py +0 -0
  64. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/job/index_search.py +0 -0
  65. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/job/run_task.py +0 -0
  66. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/job/toolchain.py +0 -0
  67. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/transforms/notify.py +0 -0
  68. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/__init__.py +0 -0
  69. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/archive.py +0 -0
  70. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/attributes.py +0 -0
  71. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/cached_tasks.py +0 -0
  72. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/decision.py +0 -0
  73. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/dependencies.py +0 -0
  74. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/docker.py +0 -0
  75. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/hash.py +0 -0
  76. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/keyed_by.py +0 -0
  77. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/memoize.py +0 -0
  78. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/parameterization.py +0 -0
  79. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/path.py +0 -0
  80. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/python_path.py +0 -0
  81. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/readonlydict.py +0 -0
  82. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/schema.py +0 -0
  83. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/shell.py +0 -0
  84. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/taskcluster.py +0 -0
  85. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/taskgraph.py +0 -0
  86. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/templates.py +0 -0
  87. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/time.py +0 -0
  88. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/treeherder.py +0 -0
  89. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/vcs.py +0 -0
  90. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/verify.py +0 -0
  91. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/workertypes.py +0 -0
  92. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/src/taskgraph/util/yaml.py +0 -0
  93. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_actions_rebuild_cached_tasks.py +0 -0
  94. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_actions_registry.py +0 -0
  95. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_create.py +0 -0
  96. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_decision.py +0 -0
  97. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_files_changed.py +0 -0
  98. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_generator.py +0 -0
  99. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_graph.py +0 -0
  100. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_main.py +0 -0
  101. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_morph.py +0 -0
  102. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_optimize.py +0 -0
  103. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_optimize_strategies.py +0 -0
  104. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_parameters.py +0 -0
  105. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_scripts_fetch_content.py +0 -0
  106. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_scripts_run_task.py +0 -0
  107. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_target_tasks.py +0 -0
  108. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_taskgraph.py +0 -0
  109. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transform_docker_image.py +0 -0
  110. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_base.py +0 -0
  111. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_fetch.py +0 -0
  112. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_from_deps.py +0 -0
  113. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_job.py +0 -0
  114. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_job_run_task.py +0 -0
  115. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_job_toolchain.py +0 -0
  116. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_transforms_notify.py +0 -0
  117. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_attributes.py +0 -0
  118. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_dependencies.py +0 -0
  119. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_docker.py +0 -0
  120. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_memoize.py +0 -0
  121. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_parameterization.py +0 -0
  122. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_path.py +0 -0
  123. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_python_path.py +0 -0
  124. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_readonlydict.py +0 -0
  125. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_schema.py +0 -0
  126. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_taskcluster.py +0 -0
  127. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_templates.py +0 -0
  128. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_time.py +0 -0
  129. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_treeherder.py +0 -0
  130. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_vcs.py +0 -0
  131. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_verify.py +0 -0
  132. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_workertypes.py +0 -0
  133. {taskcluster-taskgraph-5.5.0 → taskcluster-taskgraph-5.6.0}/test/test_util_yaml.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taskcluster-taskgraph
3
- Version: 5.5.0
3
+ Version: 5.6.0
4
4
  Summary: Build taskcluster taskgraphs
5
5
  Home-page: https://github.com/taskcluster/taskgraph
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taskcluster-taskgraph
3
- Version: 5.5.0
3
+ Version: 5.6.0
4
4
  Summary: Build taskcluster taskgraphs
5
5
  Home-page: https://github.com/taskcluster/taskgraph
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -2,7 +2,7 @@
2
2
  # License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
- __version__ = "5.5.0"
5
+ __version__ = "5.6.0"
6
6
 
7
7
  # Maximum number of dependencies a single task can have
8
8
  # https://docs.taskcluster.net/reference/platform/taskcluster-queue/references/api#createTask
@@ -35,6 +35,11 @@ graph_config_schema = Schema(
35
35
  "lowest",
36
36
  ),
37
37
  ),
38
+ Optional(
39
+ "task-deadline-after",
40
+ description="Default 'deadline' for tasks, in relative date format. "
41
+ "Eg: '1 week'",
42
+ ): optionally_keyed_by("project", str),
38
43
  Required("workers"): {
39
44
  Required("aliases"): {
40
45
  str: {
@@ -221,6 +221,13 @@ def get_default_priority(graph_config, project):
221
221
  )
222
222
 
223
223
 
224
+ @memoize
225
+ def get_default_deadline(graph_config, project):
226
+ return evaluate_keyed_by(
227
+ graph_config["task-deadline-after"], "Graph Config", {"project": project}
228
+ )
229
+
230
+
224
231
  # define a collection of payload builders, depending on the worker implementation
225
232
  payload_builders = {}
226
233
 
@@ -1069,7 +1076,12 @@ def build_task(config, tasks):
1069
1076
  task["expires-after"] = "28 days" if config.params.is_try() else "1 year"
1070
1077
 
1071
1078
  if "deadline-after" not in task:
1072
- task["deadline-after"] = "1 day"
1079
+ if "task-deadline-after" in config.graph_config:
1080
+ task["deadline-after"] = get_default_deadline(
1081
+ config.graph_config, config.params["project"]
1082
+ )
1083
+ else:
1084
+ task["deadline-after"] = "1 day"
1073
1085
 
1074
1086
  if "priority" not in task:
1075
1087
  task["priority"] = get_default_priority(
@@ -794,3 +794,77 @@ def test_check_task_dependencies(graph_config, test_task, expectation):
794
794
  assert (
795
795
  len(list(task.check_task_dependencies(transform_config, [test_task]))) == 1
796
796
  )
797
+
798
+
799
+ @pytest.mark.parametrize(
800
+ "deadline_after, test_task",
801
+ (
802
+ (
803
+ None,
804
+ {
805
+ "description": "fake description",
806
+ "name": "fake-task-name",
807
+ "worker-type": "t-linux",
808
+ "worker": {
809
+ "docker-image": "fake-image-name",
810
+ "max-run-time": 1800,
811
+ },
812
+ },
813
+ ),
814
+ (
815
+ "2 weeks",
816
+ {
817
+ "description": "fake description",
818
+ "name": "fake-task-name",
819
+ "worker-type": "t-linux",
820
+ "worker": {
821
+ "docker-image": "fake-image-name",
822
+ "max-run-time": 1800,
823
+ },
824
+ },
825
+ ),
826
+ ),
827
+ )
828
+ def test_default_deadline_after(run_transform, graph_config, deadline_after, test_task):
829
+ if deadline_after:
830
+ graph_config._config["task-deadline-after"] = deadline_after
831
+
832
+ params = FakeParameters(
833
+ {
834
+ "base_repository": "git@github.com://github.com/mozilla/example.git",
835
+ "build_date": 0,
836
+ "build_number": 1,
837
+ "head_repository": "git@github.com://github.com/mozilla/example.git",
838
+ "head_rev": "abcdef",
839
+ "head_ref": "default",
840
+ "level": "1",
841
+ "moz_build_date": 0,
842
+ "next_version": "1.0.1",
843
+ "owner": "some-owner",
844
+ "project": "some-project",
845
+ "pushlog_id": 1,
846
+ "repository_type": "git",
847
+ "target_tasks_method": "test_method",
848
+ "tasks_for": "github-pull-request",
849
+ "try_mode": None,
850
+ "version": "1.0.0",
851
+ },
852
+ )
853
+
854
+ transform_config = TransformConfig(
855
+ "check_deadline",
856
+ str(here),
857
+ {},
858
+ params,
859
+ {},
860
+ graph_config,
861
+ write_artifacts=False,
862
+ )
863
+
864
+ task_dict = deepcopy(test_task)
865
+
866
+ task_dict = run_transform(task.transforms, task_dict, config=transform_config)[0]
867
+ if deadline_after:
868
+ assert task_dict["task"]["deadline"] == {"relative-datestamp": deadline_after}
869
+ else:
870
+ assert task_dict["task"]["deadline"] == {"relative-datestamp": "1 day"}