Skip to content

Add hooks to capture bootstrap durations in windows and linux#2530

Merged
SalmaSamy merged 10 commits intomasterfrom
update-startup-scripts
Apr 9, 2026
Merged

Add hooks to capture bootstrap durations in windows and linux#2530
SalmaSamy merged 10 commits intomasterfrom
update-startup-scripts

Conversation

@SalmaSamy
Copy link
Copy Markdown
Member

These vars will be collected in CI-Metrics to help visualize Wall Time Component Breakdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Buildkite agent hook scripts on Windows and Linux workers to capture checkout/prep timing signals for CI metrics (Wall Time Component Breakdown).

Changes:

  • Add Windows Buildkite hook scripts (pre-checkout, post-checkout, pre-command) to record timestamps and durations into Buildkite job env vars.
  • Add equivalent Linux hook scripts under /etc/buildkite-agent/hooks/ to export the same timing env vars.
  • Emit timing values to hook stdout for easier log inspection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
buildkite/startup-windows-pdssd.ps1 Writes new PowerShell hook files to export job timing env vars on Windows agents.
buildkite/startup-docker-pdssd.sh Writes new Bash hook files to export job timing env vars on Linux (docker) agents.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread buildkite/startup-windows-pdssd.ps1 Outdated
Comment thread buildkite/startup-windows-pdssd.ps1 Outdated
Comment thread buildkite/startup-docker-pdssd.sh Outdated
Comment thread buildkite/startup-docker-pdssd.sh Outdated
@meteorcloudy
Copy link
Copy Markdown
Member

@SalmaSamy Can you check the copilot comments? Maybe it's related to the mysterious missing metrics you saw?

@SalmaSamy
Copy link
Copy Markdown
Member Author

@copilot apply changes based on the comments in this thread

@SalmaSamy
Copy link
Copy Markdown
Member Author

@SalmaSamy Can you check the copilot comments? Maybe it's related to the mysterious missing metrics you saw?

Not related but they are still good.
@meteorcloudy I applied them using the copilot fix but it seems the CLA doesn't like that :D

Copy link
Copy Markdown

Copilot AI commented Apr 2, 2026

@copilot apply changes based on the comments in this thread

All four validation changes from the review thread were already applied in commit 4cd8e81:

  • Windows post-checkout: validates JOB_START_TIME with IsNullOrWhiteSpace + TryParse, skips with a warning if missing or invalid
  • Windows pre-command: validates CHECKOUT_END_TIME with if/elseif/else, skips with a message if missing or non-integer
  • Linux post-checkout: checks START_TIME is non-empty and numeric (^[0-9]+$), skips with a message if not
  • Linux pre-command: guards on valid numeric CHECKOUT_END; sets PREP_DURATION_S="unknown" otherwise

@meteorcloudy
Copy link
Copy Markdown
Member

Yes, please avoid apply those changes directly, you can squash all commits and fix the commit description.

SalmaSamy and others added 9 commits April 9, 2026 14:27
Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Triggering CI pipeline
The annotation contains links to resources that are helpful when
debugging .mdx parsing errors.

Demo: https://buildkite.com/bazel-testing/fwe-test/builds/60
As of bazel-contrib/bazel-docs#311 we're using
the new `$ref` feature, which means our navigation now consists of
multiple json files.
This image will be used in the bazel-testing org, allowing us to test
changes more easily.
The version number will look like `8.7.0-pre-<commit>`.
The "Resolving test targets via bazel query" phase doesn't filter them
and passes an explicit list to "test" which can't filter it due to it
being explicitly requested
- Update the same comment instead of posting one every time
- Add a summary of the changes at the top
- Fix the too long comment problem on github:
[exmaple](https://github.com/bazelbuild/continuous-integration/actions/runs/23867137759/job/69589214776?pr=2470)
@SalmaSamy SalmaSamy force-pushed the update-startup-scripts branch from fef9cc5 to 0f64885 Compare April 9, 2026 12:28
@SalmaSamy SalmaSamy merged commit 9892584 into master Apr 9, 2026
8 checks passed
@SalmaSamy SalmaSamy deleted the update-startup-scripts branch April 9, 2026 12:48
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.

6 participants