Skip to content
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

BFD-3745: Force UTC everywhere #2498

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

BFD-3745: Force UTC everywhere #2498

wants to merge 5 commits into from

Conversation

aschey-forpeople
Copy link
Contributor

@aschey-forpeople aschey-forpeople commented Nov 20, 2024

JIRA Ticket:
BFD-3745

What Does This PR Do?

This change sets TZ=UTC everywhere we launch a JVM process to ensure consistency with date operations. Notably this fixes the following issues:

  • Timestamps shown in the server timezone instead of UTC
  • SQL connections using local time (causes issues with some SQL queries that perform date math)
  • When clients supply the _lastUpdated parameter without specifying a timezone, it currently defaults to the server timezone which could produce unexpected results

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies

  • Modifies any security controls

  • Adds new transmission or storage of data

  • Any other changes that could possibly affect security?

  • I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (@sb-benohe) approval.)

Validation

Have you fully verified and tested these changes? Is the acceptance criteria met? Please provide reproducible testing instructions, code snippets, or screenshots as applicable.

Tested the server locally and in an ephemeral environment to ensure the setting took effect.

@@ -145,8 +148,8 @@ args=""
[[ $use_minio == "true" ]] && args="$args -Ds3.local=true"
[[ $projects != "" ]] && args="$args$projects"
[[ $include_dependencies = "true" ]] && args="$args -am"
[[ $test_arg != "" ]] && args="$args -Dtest=\"$test_arg\""
[[ $it_test_arg != "" ]] && args="$args -Dit.test=\"$it_test_arg\""
[[ $test_arg != "" ]] && args="$args -Dtest=$test_arg"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes besides setting the timezone are things shellcheck was complaining about

@@ -219,7 +224,6 @@ if [[ $install = "true" ]] ; then
jar_file=${exec_dir}/${app_name}.jar
[[ -r $jar_file ]] && rm -f $jar_file
[[ -d $lib_dir ]] && rm -rf $lib_dir
[[ -r $run_script ]] && rm -f $run_script
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed because $run_script doesn't exist

@@ -252,11 +256,6 @@ if [[ x$kubernetes = xtrue ]] ; then
echo ERROR: unable to find kubernetes resource files in $kubernetes_root 1>&2
exit 1
fi
if [[ $run_mode = "rif" ]] ; then
Copy link
Contributor Author

@aschey-forpeople aschey-forpeople Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed because $run_mode doesn't exist. Looks like this was copy/paste error from the pipeline script.

@aschey-forpeople aschey-forpeople marked this pull request as ready for review November 21, 2024 21:39
dondevun
dondevun previously approved these changes Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants