-
Notifications
You must be signed in to change notification settings - Fork 151
K8SPSMDB-1219: Minor test improvements #1871
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
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
write_document "-2nd" | ||
run_backup $backup_name_minio 2 physical | ||
compare_latest_restorable_time "${cluster}-rs0" "${backup_name_minio}-2" | ||
check_recovery "${backup_name_minio}-2" latest "" "-2th" "$cluster" backupSource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here we want to use 3rd
? Mentioning this because we have both find-2th.json
and find-3rd.json
which are identical, but the find-3rd
is the right syntax. Also one of these files I think is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 6a9a86d
e2e-tests/functions
Outdated
@@ -1691,6 +1727,92 @@ format_date() { | |||
echo $(TZ=UTC $date -d@${timestamp} '+%Y-%m-%d %H:%M:%S') | |||
} | |||
|
|||
get_bucket_name() { | |||
local bucket_name=$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable should be backup_name
given the following kubectl command In L.1733, and how it is used here | $sed -e "s|BUCKET-NAME|$(get_bucket_name "$backup_name")|" \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 6a9a86d
check_recovery "${backup_name_minio}-2" latest "" "-2th" "$cluster" backupSource | ||
|
||
desc 'disable pitr' | ||
kubectl patch psmdb "some-name" --type='merge' --patch '{"spec": {"backup": {"pitr": {"enabled": false}}}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Instead of hardcoding some-name
throughout this function, we can use the variable cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 6a9a86d
@@ -304,6 +304,7 @@ func (r *ReconcilePerconaServerMongoDBRestore) getBackup(ctx context.Context, cr | |||
Namespace: cr.Namespace, | |||
}, | |||
Spec: psmdbv1.PerconaServerMongoDBBackupSpec{ | |||
Type: cr.Spec.BackupSource.Type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand, adding this is mostly for consistency, right? Couldn't understand how we use it with this PR's changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this is a bug fix. after incremental backup changes, physical restores using backup source was broken and this fixes it
commit: e37af0d |
CHANGE DESCRIPTION
Problem:
Short explanation of the problem.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability