Code location history and rollbacks
Dagster+ automatically tracks metadata every time a code location is loaded. This can be used to understand when changes have been made, and what those changes were. In addition, this metadata can be used to quickly redeploy an older version.
Prerequisites
Before continuing, you should be familiar with:
Viewing code location history
- In the Dagster+ UI, navigate to the Deployment tab.
- In the row associated with the code location you're interested in, click View history in the Updated column.
This will bring up a modal showing a history of every time that code location has been loaded, and metadata associated with that load. If you have connected Dagster+ to a GitHub or GitLab repository, each row will have a link to the commit that was deployed at that point in time.
If a code location has been deployed multiple times with identical metadata, these rows will be collapsed together. You can expand them by deselecting Collapse similar entries in the top left corner of the modal.
This metadata will also include information regarding assets that have been added, removed, or changed. In the Assets column, you can see the keys of assets in any of these categories.
Currently, changes to code version, tags, metadata, dependencies and partitions definition are tracked. Clicking on any of these assets brings you to its Asset details page. Here, you can find the Change history tab, and see detailed information regarding each time the asset definition has changed.
Rolling back to a previous code location version
To initiate a rollback, you'll need Organization, Admin, or Editor permissions
If you notice an issue with newly deployed code, or your code fails to deploy successfully, you can quickly roll back to a previously deployed image that's known to work properly.
- In the Dagster+ UI, navigate to the Deployment tab.
- In the row associated with the code location you're interested in, click View history in the Updated column.
- In the Actions column click the dropdown menu to the right of View metadata, select Rollback to this version.
Next steps
- Learn more about Code Locations
- Learn how to Alert when a code location fails to load