Skip to content

Latest commit

 

History

History
121 lines (96 loc) · 6.28 KB

File metadata and controls

121 lines (96 loc) · 6.28 KB

Glockit 1.1.2 Migration Notes

Scope: migrate Benchmark Buddy UI and runtime integration from Glockit 1.0.9 behavior to 1.1.2 behavior without breaking existing workspace data.

Release Inputs Considered

Glockit 1.1.2 release highlights used for this plan:

  • Summary mode
  • API response result checks
  • Authorization dependencies
  • Dynamic variables/functions
  • Pre/post request hooks
  • Performance and progress improvements

Current State Snapshot

  • Dependencies are now aligned to Glockit 1.1.2 in both package.json and electron/package.json.
  • Renderer executes benchmarks through Electron IPC bridge.
  • Existing UI already exposes several endpoint-level advanced features:
    • response checks
    • auth dependencies
    • hooks
    • variables
  • Biggest risk: result schema mismatch between Glockit output and current UI contracts/parsers.

Migration Strategy

Principle: isolate compatibility risk first, then expand feature UI.

Phase 1: Compatibility Core ✅ COMPLETE

  1. Upgrade Glockit package version. ✅ electron/package.json"glockit": "^1.1.2"
  2. Add result normalization adapter in src/lib/benchmark-runner.ts. ✅ isGlockit112Result, normalizeGlockit112, normalizeGlockitResult wired into runBenchmark.
  3. Update src/types/glockit.ts. ✅ Raw 1.1.2 input types added (GlockitRaw*). EndpointResult and BenchmarkSummary extended with optional enrichment fields.
  4. Adjust src/components/ResultsPanel.tsx. ✅ Percentile row (p50/p90/p95/p99) in EndpointResultCard. SLO pass/fail banner in ResultsView.
  5. Adjust src/components/RunHistory.tsx. ✅ No changes needed — reads totalRequests and successRate which are both present in normalized output.

Deliverable: benchmark runs and history render correctly after upgrade, regardless of whether runs were produced before or after migration.

Phase 2: Report Ingestion Compatibility ✅ COMPLETE

  1. Updated src/components/ReportViewer.tsx parseJsonReport. ✅ New branch for 1.1.2 JSON shape (json.results[] array + renamed summary fields) added before legacy branch. Legacy JSON and flat-array branches preserved.
  2. Validate imported reports in mixed-version datasets — covered by branch ordering (1.1.2 check first).

Deliverable: imported report files remain usable with both old and new benchmark artifacts.

Phase 3: Config Contract Expansion ✅ COMPLETE

  1. Extended src/types/glockit.ts for advanced global config blocks in 1.1.2+ workflows. ✅ Added optional contracts for executor/arrival rate, load shape, phases, data feeder, SLO, coordinated omission, scenario mix, virtual users, transaction groups, diagnostics, observability, distributed mode, and reporters.
  2. Kept all new fields optional for backward compatibility. ✅ Existing saved workspaces remain valid without migrations.

Deliverable: type-level support for advanced Glockit features with backward compatibility.

Phase 4: Visual Editor Enhancements ✅ COMPLETE

  1. Existing endpoint advanced tabs remain intact. ✅
  2. Added global advanced sections in src/components/ConfigEditor.tsx for common 1.1.2 workflows. ✅ Covered visually: executor and arrival-rate setup, data feeder basics, virtual-user toggles, SLO thresholds, coordinated omission, diagnostics, Prometheus/OTLP observability, and distributed execution basics.
  3. Dense workbench layout preserved with collapsible advanced sections. ✅
  4. Added visual editors for array-heavy fields. ✅ Load Phases (phases[]), Transaction Groups (transactionGroups[]), and Reporters (reporters[]) all have repeating-row editors with add/remove. scenarioMix remains JSON-only by design (nested scenario flow-step arrays).
  5. CSS @import order warning resolved. ✅ Google Fonts import moved before Tailwind directives in src/index.css — build is fully clean.

Deliverable: users can author 1.1.2-oriented configurations without dropping to raw JSON for common workflows.

Phase 5: Persistence Safety ✅ COMPLETE

  1. Added workspace/config schemaVersion metadata at save time in the Electron persistence path. ✅ electron/main.cjs now writes schema version into both workspace metadata and individual config files.
  2. Kept load logic tolerant of version-absent records. ✅ Older records default safely when schemaVersion or runHistory is missing.
  3. Normalized runHistory and lastRunResults on load and persist normalized form lazily. ✅ src/store/workspace-store.ts normalizes loaded benchmark results before they enter app state; subsequent saves write the normalized shape.

Deliverable: smooth migration of existing local workspace data.

File-Level Worklist

High-priority files:

  • package.json
  • electron/main.cjs
  • src/lib/benchmark-runner.ts
  • src/types/glockit.ts
  • src/components/ResultsPanel.tsx
  • src/components/RunHistory.tsx
  • src/components/ReportViewer.tsx
  • src/components/ConfigEditor.tsx
  • src/store/workspace-store.ts

Secondary files (only if needed by UI additions):

  • src/components/editor/EndpointCard.tsx
  • src/components/editor/AssertionsEditor.tsx
  • src/components/editor/AuthDependencyEditor.tsx
  • src/components/editor/VariablesEditor.tsx

Validation Plan

  1. Type safety
  • Run TypeScript build and ensure no contract mismatches after type expansion.
  1. Runtime smoke tests (Electron)
  • Open workspace
  • Run benchmark
  • Confirm summary/details/history render
  • Restart app and verify persistence still loads
  1. Data compatibility
  • Load old stored run history
  • Import old JSON report
  • Import new JSON report
  • Confirm both parse and render correctly
  1. Regression checks
  • Endpoint editing still works in visual and JSON mode.
  • Settings panel glockit check still reports runtime status.

Rollout Recommendation

  1. Release A (stability release)
  • dependency upgrade
  • result adapter
  • parser compatibility
  • persistence compatibility
  1. Release B (feature UX release)
  • advanced global editor sections
  • expanded visual controls for new Glockit configuration blocks

Risks and Mitigations

  • Risk: incompatible result payload assumptions in UI components.

    • Mitigation: strict normalization layer before UI rendering.
  • Risk: old saved data cannot be parsed after type updates.

    • Mitigation: optional fields + tolerant loaders + versioned persistence.
  • Risk: expanding editor too quickly harms usability.

    • Mitigation: phased sub-editor approach and preservation of current information architecture.