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

Better error message when a change is not found #205

Closed
Ovid opened this issue Dec 12, 2014 · 1 comment
Closed

Better error message when a change is not found #205

Ovid opened this issue Dec 12, 2014 · 1 comment

Comments

@Ovid
Copy link
Collaborator

Ovid commented Dec 12, 2014

I recently tried to deploy on a shared server and encountered this error:

$ sqitch deploy some_project
Cannot find 3aa4c0d2abbdffd6552c5ec504ab51d22a5aea21 in the plan

The status command gave this:

$ sqitch status some_project;
# On database some_project
# Project:  corp-some_project
# Change:   3aa4c0d2abbdffd6552c5ec504ab51d22a5aea21
# Name:     some-index-to-a-table
# Deployed: 2014-12-10 19:51:36 -0800
# By:       Colin Olleague <c.olleague@example.com>
#
Cannot find this change in sqitch/sqitch.plan
Make sure you are connected to the proper database for this project.

After a lot of debugging, I found out that "Colin" has deployed, but accidentally reverted his plan changes. So he went in and manually added them to sqitch.plan. The date, email, and note were all different from what was in the sqitch.changes table, so the SHA1 didn't match. Since the sqitch.changes.change value matched what was in the sqitch.plan file, it would be great if the error message could point out that a potentially identical plan is in the sqitch.plan file, but with a different checksum. It would have made debugging easier (I saw the change in the plan, but I had no idea that it had been manually edited, thus causing quite a bit of digging through code).

@theory
Copy link
Collaborator

theory commented Dec 23, 2014

Have a look at Engine.pm and feel free to suggest a change. You would likely need to call latest_change() to get information about the change represented by $id and include it in the message.

@theory theory closed this as completed in b446e32 Jan 6, 2015
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