-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-47507: Add workflow for triggering ConsDB migrations #278
base: main
Are you sure you want to change the base?
Conversation
953f23d
to
781f744
Compare
781f744
to
a4c3a24
Compare
a4c3a24
to
aa19eac
Compare
5bb4ef0
to
f7e6172
Compare
.github/workflows/migrate.yaml
Outdated
|
||
on: | ||
pull_request: | ||
types: [closed] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just do merges to main?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know how to get the name of the branch that is being merged if it triggers on pushes to main
. As far as I can tell, only the commit SHA is available in that case. From the PR trigger, this is easily accessible information. (If you have a suggestion on how to do this, I can incorporate it.)
.github/workflows/migrate.yaml
Outdated
- name: Trigger migration workflow in consdb repository | ||
run: | | ||
curl -X POST \ | ||
-H "Authorization: token ${{ secrets.REPO_DISPATCH_TOKEN }}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a service account rubinobs-dm-admin
that can be used to create this token.
f7e6172
to
e28b5c6
Compare
e28b5c6
to
91832c4
Compare
91832c4
to
2f974fb
Compare
7cf58f1
to
fc84b92
Compare
fc84b92
to
3203714
Compare
This workflow is not functioning properly right now and needs to be re-reviewed after changes.
This PR adds a workflow which triggers automatic creation of migrations scripts in the consdb repo using repository dispatch. It activates on closed and merged PRs on which there were changes to
cdb_*.yaml
schemas requiring migrations to be generated. This is done usingfelis diff --comparator alembic
so that changes which do not result in updates to the logical data model in the database will be ignored and not dispatched toconsdb
.Do not merge until lsst/felis#109 is merged.