FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ci(gcb): set TZ=:UTC; log google_time by devjgm · Pull Request #6124 · googleapis/google-cloud-cpp · GitHub

ci(gcb): set TZ=:UTC; log google_time - #6124

Merged
devjgm merged 2 commits into
googleapis:masterfrom
devjgm:gcb-google-time
Mar 28, 2021
Merged

ci(gcb): set TZ=:UTC; log google_time#6124
devjgm merged 2 commits into
googleapis:masterfrom
devjgm:gcb-google-time

Conversation

devjgm commented Mar 28, 2021
edited by coryan
Loading

Copy link
Copy Markdown
Contributor

Per @devbww's comments on
#6123, we set
TZ=:UTC for docker and GCB builds so our logs -- and others' logs --
show up in UTC to make them easily comparable. This PR also logs the
time that google.com thinks it is, which would help us diagnose issues
caused by time synchronization issues (which we've seen on Kokoro).


This change is 

Per @devbww's comments on
googleapis#6123, we set
`TZ=:UTC` for docker and GCB builds so our logs -- and others' logs --
show up in UTC to make them easily comparable. This PR also logs the
time that google.com thinks it is, which would help us diagnose issues
caused by time synchronization issues (which we've seen on Kokoro).
devjgm requested a review from a team March 28, 2021 14:07
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 28, 2021
devjgm requested a review from devbww March 28, 2021 14:12

devjgm commented Mar 28, 2021

Copy link
Copy Markdown
Contributor Author

Example output:

====================
|   Machine Info   |
====================
      utc: 2021-03-28 14:10:52+00:00
   google: 2021-03-28 14:10:52+00:00
   kernel: #41~18.04.1-Ubuntu SMP Fri Feb 26 22:23:13 UTC 2021
       os: PRETTY_NAME="Fedora 33 (Container Image)"
    nproc: 32
      mem: 28.21 GiB
      gcc: gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
    clang: clang version 11.0.0 (Fedora 11.0.0-2.fc33)
       cc: cc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
    cmake: cmake version 3.19.7
    bazel: bazel 3.5.0

codecov Bot commented Mar 28, 2021
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #6124 (dfe47e4) into master (53663dd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6124   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files        1173     1173           
  Lines      104827   104827           
=======================================
  Hits       100296   100296           
  Misses       4531     4531           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53663dd...dfe47e4. Read the comment docs.

Comment thread ci/cloudbuild/build.sh Outdated
io::log_h1 "Machine Info"
TZ=/etc/localtime printf "%10s %s (%s)\n" "local:" "$(date)" "$(date +%z)"
printf "%10s %s\n" "utc:" "$(date -u)"
printf "%10s %s\n" "utc:" "$(date -u --rfc-3339=seconds)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I wonder about the "utc" label. The time is self identifying ... it doesn't really need/want a time-zone label.

Perhaps the difference between "utc" and "google" is more the difference between "host time" and "network time"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done. Though named just "host" and "google" to keep alignment nice.

Comment thread ci/cloudbuild/build.sh Outdated
"--rm"
"--user=$(id -u):$(id -g)"
"--env=USER=$(id -un)"
"--env=TZ=:UTC"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm having second thoughts about the precise incantation. TZ=:UTC will probably only work on tzdb-based implementations that compile the "backward" rules, and I'm not sure who does that.

We're probably better off with TZ=UTC0, which will work on any system that supports the POSIX TZ spec, and that includes any Unix-like libc, plus Windows I believe. Abseil/CCTZ will actually fail to load "UTC0" (unlike bare "UTC", which we special case), but it will then fall back to UTC, so that's OK. [But I think I'll tweak CCTZ so that loading "UTC0" returns success too.]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done.

devjgm merged commit 50b7326 into googleapis:master Mar 28, 2021
devjgm deleted the gcb-google-time branch March 28, 2021 20:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL