Limit changed directories
tfaction >= v1.17.0
, #2744
You can limit the number of changed working directories and modules in one pull request. By default, there is no limit.
--
Why is the limit necessary?
You shouldn't change many working directories and modules in one pull request.
- It's difficult to review many changes. You can miss unexpected changes
- CI becomes unstable
- API rate limit
- Inefficient
- If you fix a directory, you need to run CI on all changed directories
- Changes can be blocked due to a directory
- If a directory has some trouble like drift, you can't merge the pull request
How to limit
tfaction-root.yaml
limit_changed_dirs:
working_dirs: 5 # The maximum number of changed working directories in one pull request
modules: 5 # The maximum number of changed modules in one pull request
If working_dirs
and modules
are less than 1
, they are ignored.
How to resolve the failure
If CI fails due to this limit, you have two options:
- Split changes to multiple pull requests
- Fix tfaction-root.yaml and increase the limit. If you want to disable the limit, remove
limit_changed_dirs
or changeworking_dirs
andmodules
to0
limit_changed_dirs:
working_dirs: 0 # no limit
modules: 0 # no limit