Revert Kitchens¶
Kitchen revert returns a kitchen to the immediate previous state, one state at a time, from most recent to oldest.
Revert with caution. Kitchen revert will roll back previous updates and merges and can impact your environment. The kitchen-revert command should only be used with caution!
Prerequisites¶
You must have access to a kitchen to revert that kitchen to a previous state.
How to from the Kitchen History page¶
- From the Kitchens page, select a kitchen.
- Click HISTORY in the green menu.
- Click Revert kitchen to previous state.
-
On the Revert Kitchen page, review the changes.
- Summary of updates: Includes the number of updates, changed files, recipes, and authors involved in the revert.
Click in the summary to open specific Commit Details.
- Summary of file changes: Shows the specific code changes included in the latest update or merge. These will be rolled back.
-
Click Revert Kitchen.
- In the confirmation dialog, click Revert.
Check the kitchen history again to confirm that the latest update is now gone.
- If reverting a single update, the history no longer lists that update.
- If reverting a merge, the history removes the merge and, instead, displays a no-file-change commit, to show a record of the revert process with information on what has been rolled back.
How to from the command line¶
Tip
DKCloudCommand option: Use the kitchen-revert command in the command line interface.
- Use the kitchen-history command to view the latest changes in the kitchen.
-
You can use the count option for this command to reduce the output to the latest X commits.
Output: kitchen-history command:
YYYY-MM-DD HH:MM:SS - Getting kitchen history for kitchen test_kitchen. -- author : user@company.com date : 2020-06-23T15:55:35Z message : Merge from feature_kitchen to test_kitchen sha : adcfa6aae8ee7935881e1bd3a151efed5cbd033d -- author : user@company.com date : 2020-06-23T15:36:44Z message : Files updated in recipe 'parallel-recipe-test': C3 sha : f2051eccf2b08b1098e3b7ca2b2b94190f5e46d9 -- author : user@company.com date : 2020-06-23T15:16:13Z message : Merge from test_kitchen to feature_kitchen sha : f57fa041595b0371db84a8267d2825a43b8de0a9 -
Use the kitchen-revert command to roll back the latest update or merge.
Output: kitchen-revert command:
-
Check the kitchen history again to confirm that the latest commit is now gone.
- If reverting a single update, the history no longer lists that update.
- If reverting a merge, the history removes the merge and, instead, displays a no-file-change commit, to show a record of the revert process with information of what has been rolled back.