Reset incarnation¶
There is an option to reset an incarnation by removing all customizations that were done to it and bring it back to a pristine state as if it was just created freshly from the template.
By default, the target version and data is taken from the last change that was successfully applied to the incarnation, but they can be overridden. For the data, partial overrides are also allowed.
Ignore some files from reset¶
Sometimes, you want to keep some files in the incarnation that were created or modified after the initial
creation of the incarnation. For example, you might have a pipeline.yaml which is created by different process.
To achieve this, you can create a file called .fengine-reset-ignore in the root of your incarnation repository (that
is about to be reset) and add the path to the file you want to preserve.
Additionally, if you need to ignore identical files across all incarnations, you can add .fengine-reset-ignore to your
template. This file will propagate to all incarnations through foxops’ usual synchronization mechanisms. That’s actually
the expected usecase otherwise the .fengine-reset-ignore file would be also deleted/overwritten during reset.
This file should contain a list of file paths (one per line) that should be ignored during the reset process.
Examples¶
Ignoring top-level files and directories¶
To ignore files or directories at the root level:
pipeline.yaml
config/
.env
This will preserve pipeline.yaml, the entire config/ directory, and .env during reset.
Ignoring specific nested files¶
You can also ignore specific files within directories while still allowing other files in the same directory to be reset:
example/file1
config/secrets.yaml
src/generated/api.py
With this configuration:
example/file1is preserved, butexample/file2would be deletedconfig/secrets.yamlis preserved, but other files inconfig/would be deletedsrc/generated/api.pyis preserved, but other files insrc/generated/would be deleted
Combining top-level and nested exclusions¶
You can mix both styles:
.env
config/
src/custom/special_file.py
docs/generated/api-reference.md
This will:
Preserve the entire
config/directoryPreserve
.envat the rootPreserve only
special_file.pyinsrc/custom/(other files in that directory will be deleted)Preserve only
api-reference.mdindocs/generated/(other files will be deleted)