Skip to content

Have role make deployed IOC a git repo, and commit any changes on deployment. Add role for performing rollbacks to previous deployments#190

Open
jwlodek wants to merge 4 commits intoNSLS2:mainfrom
jwlodek:make-deployed-ioc-git-repo
Open

Have role make deployed IOC a git repo, and commit any changes on deployment. Add role for performing rollbacks to previous deployments#190
jwlodek wants to merge 4 commits intoNSLS2:mainfrom
jwlodek:make-deployed-ioc-git-repo

Conversation

@jwlodek
Copy link
Copy Markdown
Collaborator

@jwlodek jwlodek commented Mar 17, 2026

All deployments will now be git repositories so that changes are tracked from deployment to deployment. This will also allow for easier rollbacks to previous deployments. A helper role to perform rollbacks is also added.

…loyment. Add role for performing rollbacks to previous deployments
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes deployed IOC directories self-contained git repositories so each deployment can be tracked/compared over time, and introduces a new Ansible role to roll back an IOC deployment by resetting the repository to a previous commit.

Changes:

  • Initialize a git repository (if needed) in the IOC deploy directory and attempt to commit deployment changes.
  • Add a new rollback_deployment role that verifies repo state and performs git reset --hard to roll back N commits.
  • Document rollback role variables and provide defaults for IOC directory layout.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
roles/deploy_ioc/tasks/deploy-ioc.yml Adds git init/add/commit steps to record deployment deltas in the IOC directory.
roles/rollback_deployment/tasks/main.yml Implements rollback flow: repo checks, clean-tree requirement, commit-count gate, hard reset.
roles/rollback_deployment/defaults/main.yml Adds default base paths and rollback step count.
roles/rollback_deployment/README.md Documents role purpose and inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@johnsinsheimer
Copy link
Copy Markdown
Contributor

Right now, I think deployment basically ignores autosave files. I think the git change tracking is a nice idea, but maybe we should ignore autosave files. On the other hand, adding/removing PVs with autosave from new deployments could possibly get complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants