-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
featureProduct featureProduct feature
Description
Summary
Projects using the PTB workflow templates often try to extend the following workflows:
merge-gate.yml-> often additional 'slow' testschecks.yml-> additional fast testscd.yml-> additional build objects that we do not want coupled with the existing ones
To accommodate these, the plan is to allow these PTB workflows to be extended:
slow-checks.ymlchecks.ymlcd.yml
To do this, we would:
- Create a new Pydantic model which has individual fields for each of these workflow extensions to be turned on/off
- An instance of this model, where all of them are turned off, will be provided as a default value as an attribute
to the BaseConfig. This allows users to easily substitute it as needed.
-
Add Jinja blocks in these workflow templates that if the extensions is enabled that the rendered template includes it. If it is not enabled, then the block will not be shown.
-
Users would need to move additions to be called in these workflow extensions. The PTB would not check or maintain these. (Maybe in the future we would allow them to be templates themselves & render Jinja variables, but that's out of scope for this effort.)
Example
In the slow-checks.yml template, after the run-integration-tests job, we'd have something like:
{% if enabled_slow_checks_extension %}
slow-checks-extension:
name: Extend Slow Checks
uses: ./.github/workflows/slow-checks-extension.yml
permissions:
contents: read
{% endif %}Clarification
- Do we want to hard-code the names of the workflow extensions or should users be able to override it?
- Proposed names:
- slow-checks-extension.yml
- checks-extension.yml
- cd-extension.yml
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureProduct featureProduct feature