Skip to content
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

Deployment of identical scripts fails #367

Closed
eric-brechemier opened this issue Dec 9, 2017 · 4 comments
Closed

Deployment of identical scripts fails #367

eric-brechemier opened this issue Dec 9, 2017 · 4 comments

Comments

@eric-brechemier
Copy link

In the context of a migration of changes from one plan to another, I attempted to deploy a list of changes with identical, empty deployment scripts.

This fails in sqitch version 0.9993:

Server: deploy new changes for [NEW] plan (forward-only)
Deploying changes to db:pg:[DB]
  + [CHANGE1] .. ok
  + [CHANGE2] .. ERROR:  duplicate key value violates unique constraint "changes_project_script_hash_key"
DETAIL:  Key (project, script_hash)=([NEW], da39a3ee5e6b4b0d3255bfef95601890afd80709) already exists.
not ok
Reverting to [CHANGE0]  - [CHANGE1] .. 
ok
Deploy failed
@theory
Copy link
Collaborator

theory commented Dec 9, 2017

It's intentional. See #200 for details. Can you add a newline or something to one of the scripts?

@theory theory closed this as completed Dec 9, 2017
@eric-brechemier
Copy link
Author

@theory I don't see how the script_hash is related to the discussion in #200.

Can you add a newline or something to one of the scripts?

Yes, I added a comment with the file name in each script instead of leaving the files empty.

I wanted to avoid the use of --log-only option, which would have been an alternative, but was less convenient in the context of our automatic deployment scripts.

@theory
Copy link
Collaborator

theory commented Dec 12, 2017

It lays the groundwork for a future merge command to be able to fall back on deploy script signatures to determine deployments for when plans diverge, so it can figure out how to merge deployments and end up with a proper deployment timeline.

@eric-brechemier
Copy link
Author

OK.

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

No branches or pull requests

2 participants