Skip to content

changes to accomodate the code migration - #4

Merged
frodopwns merged 30 commits into
masterfrom
migrate-fixes
Feb 14, 2017
Merged

frodopwns merged 30 commits into
masterfrom
migrate-fixes

Conversation

@frodopwns

Copy link
Copy Markdown
Contributor

The Problem:

Drud dev needs to be open sourced but is currently embedded within a largely closed source codebase.

The Fix:

Create a new repo and pull in just the drud dev related functionality

The Test:

run the cli tests and see what happens, run commands that don't have tests and see what happens there

Related Issue Link(s):

drud/general#32

@frodopwns

Copy link
Copy Markdown
Contributor Author

still need to address the vault client for databag retrieval

@frodopwns

Copy link
Copy Markdown
Contributor Author

I haven't done all the name cleanup, just enough to get the tests running.

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is still building into a tool named "drud", so that will need to be changed, and of course it affects the tests dramatically.

@rfay

rfay commented Feb 4, 2017

Copy link
Copy Markdown
Member

I'd be happy to install the build tools and get them going, but don't want to do it when you have something this big WIP. If you want me to do it in this branch I can, as long as we're clear who's working when.

@rfay rfay mentioned this pull request Sep 29, 2025
4 tasks done
rfay added a commit that referenced this pull request Aug 24, 2026
… JSON

## Short Summary (TL;DR)

Extends the gotestsum instrumentation already used by GitHub Actions to the
Buildkite Test-* pipelines, so both CI systems produce the same per-test
JSON data (HANDOFF.md TODO #3).

## How This PR Solves The Issue

`test.sh` now runs `make test` through gotestsum when `GOTESTSUM_JSONFILE_DIR`
is set, and uploads the resulting per-test JSON as a Buildkite build artifact
(`buildkite-agent artifact upload`), mirroring GitHub Actions'
`upload-artifact` step. Capturing the exit code needed restructuring the
`make` call into an `if`, since `set -e` would otherwise abort before the
upload ran on a test failure. `testbot_maintenance.sh` installs gotestsum on
each bot if it's missing: Homebrew on macOS and the WSL2 bots (which already
have it), a pinned release tarball on native Windows (no package there). All
10 pipelines that run `test.sh`/`test.cmd` now set `GOTESTSUM_JSONFILE_DIR`.

Local disk isn't a concern: every one of these pipelines already sets
`BUILDKITE_CLEAN_CHECKOUT: true`, which wipes the checkout (including
test-results/) before each build, and the equivalent GitHub Actions artifacts
run 200KB-700KB compressed per build.

perf/collector/README.md and HANDOFF.md are updated to match: TODO #3 is
done, TODO #4 (aggregating per-test JSON into a lasting dataset) now applies
to both CI systems, and TODO #7's gotestsum-format-change discussion is
deferred to its own PR after this one merges.

## Manual Testing Instructions

`bash -n .buildkite/test.sh .buildkite/testbot_maintenance.sh` passes. Not
yet verified against a live Buildkite run -- worth checking the first real
build's artifacts tab for `test-results/*.ndjson` once this merges.

## Automated Testing Overview

None; this only changes CI plumbing, not application code.

## Release/Deployment Notes

None. Internal CI tooling only.
rfay added a commit that referenced this pull request Aug 24, 2026
…dashboard

## Short Summary (TL;DR)

Adds a third collector and dashboard page that turns gotestsum's per-test JSON (already flowing from both GitHub Actions and Buildkite) into a lasting per-test timing trend, rather than a 90-day build artifact nobody aggregates (HANDOFF.md TODO #4).

## How This PR Solves The Issue

`collect-per-test.js` runs as a second pass over `test-runtime-history.ndjson` in `perf-collect.yml`: for each run/build not yet processed, it downloads that run's gotestsum artifact and appends one row per Go test to `per-test-history.ndjson`, scoped to tests taking 5s+ or that failed outright -- recording all ~600 top-level tests per run would dwarf the other two datasets for a client-side-parsed dashboard. It tracks its own cursor (`per-test-cursor.json`) rather than deriving `--since` from the data file, since a run with zero qualifying tests would otherwise be reprocessed forever, and prunes the dataset to a trailing 180-day window so file size stays bounded.

`per-test-dashboard.html` (deploys as `/perf/ci/tests/`) is a new, self-contained page: a searchable/sortable table of tracked tests with latest duration, trailing median, and percent change (tests over 20% above their trailing median are flagged, matching the existing regression-signal convention), and a per-test trend chart on click. It doesn't use `dashboard-common.js`'s engine -- that engine's per-leg checkbox model doesn't fit a per-test dataset with hundreds of distinct tests -- but reuses `dashboard-common.css` for visual consistency.

`perf-collect.yml` and `docs-publish.yml` are wired the same way the existing two datasets are: collect, commit to `performance-data` under `ci/tests/`, then fold into the deployed site on the next `docs-publish.yml` run.

## Manual Testing Instructions

`node --check` on both new/changed JS files, plus ad hoc fixture tests (no jest/mocha in this repo, matching the existing collector scripts' testing approach): `extractTestEvents()` verified against a fixture gotestsum jsonfile (subtests and package-level events correctly excluded, threshold/fail-always filtering correct); a full `collect-per-test.js` run verified end to end against mocked `gh`/Buildkite responses, confirming correct filtering, dedup, cursor advancement, idempotent re-runs, and pruning. The dashboard's client-side logic (grouping, median, regression percent, render, sort) was verified headlessly by stubbing `document`/`fetch`/`URL`/`Blob`, matching how `dashboard-common.js` was tested earlier in this branch. Not yet verified against a real scheduled run.

## Automated Testing Overview

None committed; this is CI/tooling infrastructure verified ad hoc, same as the sibling collector scripts (see perf/collector/README.md).

## Release/Deployment Notes

None. Internal CI tooling only; adds a new page under `/perf/ci/tests/`, no changes to existing pages' data or URLs beyond a new cross-link.
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.

4 participants