Details
Description
Problem:
When upgrading Stash 3.x to Bitbucket Server 4.x.x the State of the Reject Force Hook for the repositories is not retained. It will be off for all repositories regardless of its previous state before the upgrade.
HTR
- Setup Stash 3.x and enable Reject Force Push in the repositories Hooks settings
- Upgrade to 4.x.x
Expected results
The Reject Force Push hook is still enabled.
Actual results
Note the state of the Reject Force Push is disabled
Analysis
The hook keys retain their old namespace reference to "com.atlassian.stash.stash-bundled-hooks" which doesn't match the new namespace "com.atlassian.bitbucket.server.bitbucket-bundled-hooks".
Workaround
Always back up your database before performing any modification to the database. If possible, try your modifications on a test server.
Perform a database update:
Postgres SQL to change state of Reject Force Push Hook to state that it was in before upgrade
UPDATE public.sta_repo_hook SET hook_key = 'com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook' WHERE hook_key = 'com.atlassian.stash.stash-bundled-hooks:force-push-hook' AND repository_id NOT IN ( SELECT repository_id FROM public.sta_repo_hook WHERE hook_key = 'com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook' )
Attachments
Issue Links
- mentioned in
-
Page Loading...