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
It would be great if sqitch deploy had an option to require a verify script for each deploy script. Right now, missing verify scripts are only logged without failing the deployment when running sqitch deploy --verify, for example:
+ foo .. Verify script verify/foo.sql does not exist
ok
+ bar .. ok
I recently had this situation when a team mate accidentally moved some of the verify scripts. The test runner did not fail but luckily I spotted the moved files during code review. A failing test run would've been better in catching this right away.
Of course I can add a step to the test runner to manually check the files. Something like:
But I think it's useful if Sqitch can support this out of the box. Also because this script above makes assumptions about the directory layout which is quite flexible in Sqitch.
I'm thinking about a new option --require-verify:
sqitch deploy --verify --require-verify
Maybe even imply --verify when deploying with --require-verify so that it behaves as a stronger variant of --verify. I think the option name fits nicely with the existing --no-verify to allow different verification levels, i.e. --no-verify < --verify < --require-verify.
The text was updated successfully, but these errors were encountered:
Given that we would want to support the same feature with the same name in the verify command, I think --require-verify wouldn't quite cut it. Maybe strict?
But its semantics will vary from the existing revert strict config, which requires the specification of a version to revert to.
Sketch implementation:
Add strict verify (or other named) attribute to App::Sqitch::Engine
Modify verify_change() in App::Sqitch::Engine if the new attribute is true
Add appropriate options and config variables to App::Sqitch::Command::deploy and ::verify and document them in the sqitch-deploy*.pod and sqitch-revert*.pod files
Given that we would want to support the same feature with the same name in the verify command, I think --require-verify wouldn't quite cut it. Maybe strict?
Yes, --strict-verify sounds better than --require-verify. Haven't thought about sqitch verify because I don't use it.
Add appropriate options and config variables [...]
Should it be a separate config variable deploy.strict_verify? Or can we extend deploy.verify to also accept value verify in addition to values accepted by Types::Standard::Bool?
A separate config variable may be misleading:
[deploy]
verify = false
strict_verify = true
Or do we just say that deploy.strict_verify overrides deploy.verify? Same question also for when the user wants to run sqitch deploy --no-verify --strict-verify.
It would be great if
sqitch deploy
had an option to require a verify script for each deploy script. Right now, missing verify scripts are only logged without failing the deployment when runningsqitch deploy --verify
, for example:I recently had this situation when a team mate accidentally moved some of the verify scripts. The test runner did not fail but luckily I spotted the moved files during code review. A failing test run would've been better in catching this right away.
Of course I can add a step to the test runner to manually check the files. Something like:
But I think it's useful if Sqitch can support this out of the box. Also because this script above makes assumptions about the directory layout which is quite flexible in Sqitch.
I'm thinking about a new option
--require-verify
:Maybe even imply
--verify
when deploying with--require-verify
so that it behaves as a stronger variant of--verify
. I think the option name fits nicely with the existing--no-verify
to allow different verification levels, i.e.--no-verify
<--verify
<--require-verify
.The text was updated successfully, but these errors were encountered: