Skip to content

Commit

Permalink
Track commit push time
Browse files Browse the repository at this point in the history
This should give a good approximation of the time a commit was
submitted for testing. It still breaks down for draft PRs that are
marked non-draft after a while.
  • Loading branch information
TimoWilken committed Nov 27, 2023
1 parent ab04045 commit 5bae93d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ci/build-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function report_state () {
${NUM_BASE_COMMITS:+"num_base_commits=$NUM_BASE_COMMITS"} \
-- "host=\"$(hostname -s)\"" "state=\"$current_state\"" \
"prid=\"$PR_NUMBER\"" ${prtime:+prtime=$prtime} ${PR_OK:+prok=$PR_OK} \
${LAST_PUSH_TIME:+push=$LAST_PUSH_TIME} \
${HAVE_JALIEN_TOKEN:+have_jalien_token=$HAVE_JALIEN_TOKEN}

# Push to Google Analytics if configured
Expand Down
2 changes: 1 addition & 1 deletion ci/continuous-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fi
run_start_time=$(date +%s)
if [ -n "$HASHES" ]; then
# Loop through PRs we can build if there are any.
echo "$HASHES" | cat -n | while read -r BUILD_SEQ BUILD_TYPE PR_NUMBER PR_HASH env_name; do
echo "$HASHES" | cat -n | while read -r BUILD_SEQ BUILD_TYPE PR_NUMBER PR_HASH env_name LAST_PUSH_TIME; do
# Run iterations in a subshell so environment variables are not kept across
# potentially different repos. This is an issue as env files are allowed to
# define arbitrary variables that other files (or the defaults file) might
Expand Down
2 changes: 1 addition & 1 deletion list-branch-pr
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def main(args):
# sorting, so default to the empty string if so.
for pull in sorted(prs, key=lambda pr: pr["updated_at"] or ""):
print(group, pull["number"], pull["sha"],
pull["build_config"], sep="\t")
pull["build_config"], pull["updated_at"], sep="\t")

if grouped["untested"]:
# If there are untested PRs waiting, build all of them first.
Expand Down

0 comments on commit 5bae93d

Please sign in to comment.