Skip to content

Commit ebbef65

Browse files
authored
Merge pull request #729 from github/djdefi-no-es-hookshot
Remove deprecated es-hookshot backup and restore
2 parents b142c19 + a4a1b93 commit ebbef65

File tree

7 files changed

+2
-140
lines changed

7 files changed

+2
-140
lines changed

bin/ghe-backup

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,6 @@ commands+=("
203203
echo \"Backing up audit log ...\"
204204
ghe-backup-es-audit-log || printf %s \"audit-log \" >> \"$failures_file\"")
205205

206-
commands+=("
207-
echo \"Backing up hookshot logs ...\"
208-
ghe-backup-es-hookshot || printf %s \"hookshot \" >> \"$failures_file\"")
209-
210206
commands+=("
211207
echo \"Backing up Git repositories ...\"
212208
ghe-backup-repositories || printf %s \"repositories \" >> \"$failures_file\"")

bin/ghe-restore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ if test -f $GHE_RESTORE_SNAPSHOT_PATH/es-scan-complete; then
380380
ghe-ssh "$GHE_HOSTNAME" -- "sudo touch $GHE_REMOTE_DATA_USER_DIR/common/es-scan-complete"
381381
fi
382382

383-
# Restore exported audit and hookshot logs to 2.12.9 and newer single nodes and
383+
# Restore exported audit logs to 2.12.9 and newer single nodes and
384384
# all releases of cluster
385385
if $CLUSTER || [ "$(version $GHE_REMOTE_VERSION)" -ge "$(version 2.12.9)" ]; then
386386
if [[ "$GHE_RESTORE_SKIP_AUDIT_LOGS" = "yes" ]]; then
@@ -391,9 +391,6 @@ if $CLUSTER || [ "$(version $GHE_REMOTE_VERSION)" -ge "$(version 2.12.9)" ]; the
391391
ghe-restore-es-audit-log \"$GHE_HOSTNAME\" 1>&3")
392392
fi
393393

394-
commands+=("
395-
echo \"Restoring hookshot logs ...\"
396-
ghe-restore-es-hookshot \"$GHE_HOSTNAME\" 1>&3")
397394
fi
398395

399396
if [ "$GHE_PARALLEL_ENABLED" = "yes" ]; then

share/github-backup-utils/ghe-backup-es-hookshot

Lines changed: 0 additions & 49 deletions
This file was deleted.

share/github-backup-utils/ghe-restore-es-hookshot

Lines changed: 0 additions & 63 deletions
This file was deleted.

test/bin/curl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Fake curl command stub for tests.
44
set -e
55

6-
# Return empty list of indexes for ghe-backup-es-audit-log and ghe-backup-es-hookshot
6+
# Return empty list of indexes for ghe-backup-es-audit-log
77
if echo "$@" | grep -q '_cat/indices/'; then
88
exit 0
99
# Exit with non-zero code to mimic a non-existant index

test/test-ghe-backup.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,6 @@ begin_test "ghe-backup without password pepper"
132132
)
133133
end_test
134134

135-
begin_test "ghe-backup empty hookshot directory"
136-
(
137-
set -e
138-
139-
rm -rf $GHE_REMOTE_DATA_USER_DIR/hookshot/repository-*
140-
rm -rf $GHE_DATA_DIR/current/hookshot/repository-*
141-
ghe-backup
142-
143-
# Check that the "--link-dest arg does not exist" message hasn't occurred.
144-
[ ! "$(grep "[l]ink-dest arg does not exist" $TRASHDIR/out)" ]
145-
)
146-
end_test
147-
148135
begin_test "ghe-backup empty git-hooks directory"
149136
(
150137
set -e

test/testlib.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,6 @@ setup_test_data () {
261261
echo "fake audit log this yr this mth" | gzip > audit_log-1-$this_yr-$this_mth-1.gz
262262
echo "1" > audit_log-1-$this_yr-$this_mth-1.size
263263

264-
# Create hookshot logs
265-
mkdir -p "$loc/hookshot/"
266-
cd "$loc/hookshot/"
267-
echo "fake hookshot log" | gzip > hookshot-logs-2018-03-05.gz
268-
269264
# Create some test repositories in the remote repositories dir
270265
mkdir -p "$loc/repositories/info"
271266
mkdir -p "$TRASHDIR/hooks"
@@ -497,7 +492,6 @@ verify_all_restored_data() {
497492
else
498493
grep -q "fake audit log last yr last mth" "$TRASHDIR/restore-out"
499494
grep -q "fake audit log this yr this mth" "$TRASHDIR/restore-out"
500-
grep -q "fake hookshot log" "$TRASHDIR/restore-out"
501495
fi
502496

503497
# verify settings import was *not* run due to instance already being

0 commit comments

Comments
 (0)