You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cross-project deploy fails with 500 once the target project has collections #1606
Deploying one project into another (e.g. staging to prod) works the first time, then returns a 500 on every later deploy once the target has collections.
Steps to reproduce
Add a collection to the staging project in Lightning
openfn project deploy prod --no-checkout --force: succeeds and creates the collections in prod
Edit a job, then run the same deploy again: Failed to deploy project: 500
Lightning logs:
** (RuntimeError) you are attempting to change relation :collections of
Lightning.Projects.Project but the `:on_replace` option of this relation
is set to `:raise`.
Cause
For cross-project deploys, merge uses sandbox mode, which takes the local collections as they are instead of passing them through mergeCollections. Collections from resources.yaml are only names, so each deploy sends new ids for collections prod already has, and Lightning rejects them.
Activity