[treescript] switch from using `actions` to using `behaviors`
还没有人认领这个 Issue。
评估
调研方向
从 treescript/src/treescript/script.py 的第 57-67 行开始,并与 iscript/src/iscript/script.py 的第 29-50 行进行比较。在选择行为边界之前,盘点现有的操作组合以及 merge-day 和 l10n 工作流。完成意味着 treescript 使用可分别测试的受支持工作流对应的行为,包括所描述的 version-bump、tagging、merge-day 和 l10n 交互。
由索引模型根据 Issue 内容生成。
描述
In treescript, we currently use actions to determine what logic to run. This follows the mozharness model, and made sense when we first implemented treescript, to allow us to tag, version bump, and/or push independently or together. However, the script has grown in complexity, now supporting l10n bumping and merge day automation, and there are the following downsides to using actions:
- Various actions are incompatible with each other. Neither l10n bumping nor merge day were designed to work with the current tagging or version bumping logic, so there are caveats when choosing combinations of actions to run.
- If we make a large change or refactor to one or more of the actions, we need to test to make sure all valid combinations of actions still work. It isn't completely clear which combinations of actions are supported, and which are not.
- If we want to include or exclude an action in a given set of tasks, we also have to make an in-tree change, and coordinate landing. This likely means we need to run at least one full staging release to test this and (2).
- It's trickier making a change where an action behaves differently in a subset of cases. This likely means adding a task payload setting, and then making sure that setting is correctly set in all permutations of the gecko taskgraph.
In iscript, we use behaviors to determine what logic to run. Instead of multiple mix-and-match actions per task, there is a single behavior per task. If we need to be able to run tagging separately from version bumping, as well as together, that might mean three behaviors (tag, version_bump, version_bump_and_tag) or a single behavior with flags (version_bump_and_tag, with an empty new_version, for instance).
This doesn't seem like a big win when looking at just tagging, version bumping, and pushing. When we get to merge day automation, however, it's a huge win:
- the merge day behavor can have all appropriate logic baked in. We can test these as appropriate.
- we may even want to separate these into separate behaviors:
merge_central_to_beta,merge_beta_to_release,merge_release_to_esr,bump_esr,bump_early_to_late_beta,bump_central. (bump_centralcould potentially be part of themerge_central_to_betatask if we wanted, though.) These would duplicate a lot of the same logic, but those could be factored out into simple standalone functions that they each call. - we will be able to test these separately, and be able to make more surgical changes if any of these behaviors need different workflows than the others.
- we may even want to separate these into separate behaviors:
- we want to l10n bump after the
central_to_betabehavior. This currently necessitates another task, and we have to deal with both a) removingDONTBUILDand b) addingCLOSED TREE, which is a change from the current non-merge-day behavior. We can add an l10n bump helper function call into themerge_central_to_betabehavior function, with the appropriateDONTBUILD/CLOSED TREEsettings, and that problem is solved. - we want to version bump in the merge behavior. We can call the version bump helper function.
- by having a single task handle all of these, rather than multiple disparate tasks, we avoid multiple pushes, and save in both CI compute time and taskgraph complexity.
Not a blocker, but I think moving from actions to behaviors will save us time and headache in the long run.
- 主要语言
- Python
- 星标
- 16
- 派生
- 38
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 14
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mozilla-releng/scriptworker-scripts 的其他 Issue
-
难度 5/5 一周以上 新手友好度 15/100
-
难度 5/5 一周以上 新手友好度 25/100
-
treescript
难度 5/5 一周以上 新手友好度 35/100
mozilla-releng/scriptworker-scripts#1055 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 32/100
mozilla-releng/scriptworker-scripts#994 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
mozilla-releng/scriptworker-scripts#980 · 1 条评论 ·
查看 mozilla-releng/scriptworker-scripts 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100