-
Notifications
You must be signed in to change notification settings - Fork 499
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
bugfix: get time string from current time instead of pod name #1229
Conversation
timestamp=$(echo ${POD_NAME}|awk -F- '{print $(NF-1)}') | ||
## use UTC time zone to resolve timestamp, avoiding different parsing results due to different default time zones | ||
backupName=scheduled-backup-`date -u -d @${timestamp} "+%Y%m%d-%H%M%S"` | ||
backupName=scheduled-backup-`date "+%Y%m%d-%H%M%S"` |
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.
Use TZ
env timezone information of the pod instead of UTC
. @onlymellb
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.
👌
timestamp=$(echo ${POD_NAME}|awk -F- '{print $(NF-1)}') | ||
## use UTC time zone to resolve timestamp, avoiding different parsing results due to different default time zones | ||
backupName=scheduled-backup-`date -u -d @${timestamp} "+%Y%m%d-%H%M%S"` | ||
backupName=scheduled-backup-`date "+%Y%m%d-%H%M%S"` |
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.
I recommend continuing to use UTC
timestamps date -u "+%Y%m%d-%H%M%S"
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.
It should be strange if the user set TZ
already.
/run-e2e-tests |
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.
LGTM
Does this impact the restore from the scheduled backup? |
The generated name is the same as the old way: |
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.
LGTM
What problem does this PR solve?
fixes #1227
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
Does this PR introduce a user-facing change?: