github openflagr/flagr 1.2.0

5 hours ago

Flagr 1.2.0

Highlights

Exposure logging (#711)
POST /api/v1/exposures lets clients report when a user actually saw a variant. Eval still assigns; exposure is for impressions. Same recorders as eval, with recordSource: "exposure" on the wire. Docs: flagr_exposure.

JSON flags / eval-only (#699)
Load flags from a JSON file or URL (json_file, json_http) without a DB. Auto-IDs for hand-edited files. flagr-validate for CI. Docs: flagr_json_flag_spec.

Datar (#692)
Optional in-process hourly eval counts and summary APIs. Enable with FLAGR_RECORDER_ENABLED=true and FLAGR_RECORDER_TYPE=...,datar. Does not include exposure rows.

UI (#689, #707, #708)
Vue 3, Vite, Element Plus. Flag page split into smaller components. Playwright e2e via make test-e2e. Dev: npm run dev; env vars use VITE_*.

Eval performance (#709, #686)
Fewer allocations on batch eval; eval cache skips reload when snapshot max ID is unchanged.

Constraints (#682, #683)
Nested field paths in segment rules; conditions library updated (including EREG/NEREG fixes).


Fixes and maintenance

  • Duplicate rows on flag create/restore (#703)
  • Security / dependency updates (#702, #697)
  • Go 1.26 (#656); server under cmd/flagr-server (#705)
  • Integration tests in Go (#701)
  • Documentation updates (#706, #714, #716)

Upgrade notes

Backward compatible. You can upgrade from 1.1.20 without changing clients, env vars, or flag data. Existing eval APIs, CRUD, recorders, and DB-backed workflows behave as before.

If you want the new features, a few optional steps:

  • Exposure — add client calls to POST /api/v1/exposures and teach Kafka consumers about recordSource: "exposure" (only if you care about impression-based A/B denominators).
  • JSON / GitOps — switch DB driver to json_file or json_http and use flagr-validate in CI (only if you want flags without a database).
  • Datar — set FLAGR_RECORDER_ENABLED=true and add datar to FLAGR_RECORDER_TYPE (only if you want the built-in summary APIs).
  • OpenAPI codegen — regenerate clients from docs/api_docs/bundle.yaml if you want types for /exposures or Datar endpoints.

UI (the main visible change). If you are simply using the docker image, no actions needed. The admin UI was fully rebuilt (Vue 3, Vite, Element Plus) with a new layout, spacing, and styling. Day-to-day flag management is the same; it will look and feel different. If you forked or patched the old Vue 2 UI, you will need to port those changes. Frontend dev now uses npm run dev and VITE_* env vars.

What's Changed

  • refactor: modernize interface{} to any and improve eval benchmarks by @zhouzhuojie in #654
  • docs: add AGENTS.md for agent assistance by @zhouzhuojie in #655
  • chore(deps): upgrade Go from 1.25.2 to 1.26 by @zhouzhuojie in #656
  • refactor: modernize pointers to go 1.26 syntax by @zhouzhuojie in #659
  • Bump go.opentelemetry.io/otel/sdk from 1.38.0 to 1.40.0 by @dependabot[bot] in #661
  • Bump axios from 1.8.2 to 1.13.5 in /browser/flagr-ui by @dependabot[bot] in #657
  • Bump lodash from 4.17.21 to 4.17.23 in /browser/flagr-ui by @dependabot[bot] in #648
  • Bump webpack from 5.98.0 to 5.105.0 in /browser/flagr-ui by @dependabot[bot] in #653
  • Bump minimatch from 3.1.2 to 3.1.5 in /browser/flagr-ui by @dependabot[bot] in #660
  • Bump qs and express in /browser/flagr-ui by @dependabot[bot] in #658
  • Bump diff from 3.5.0 to 8.0.3 in /browser/flagr-ui by @dependabot[bot] in #645
  • Bump google.golang.org/grpc from 1.74.2 to 1.79.3 by @dependabot[bot] in #663
  • Fix typos by @kianmeng in #675
  • Bump github.com/jackc/pgx/v5 from 5.5.4 to 5.9.0 by @dependabot[bot] in #674
  • Bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0 by @dependabot[bot] in #677
  • Bump svgo from 2.8.0 to 2.8.2 in /browser/flagr-ui by @dependabot[bot] in #662
  • feat: enhance notification system and migrate to pubsub/v2 to fix CI by @nothing0012 in #642
  • perf: upgrade conditions to v0.2.4 and optimize eval path by @zhouzhuojie in #681
  • Upgrade conditions to v0.2.5 with nested field constraint support by @zhouzhuojie in #682
  • fix: use regex literal form for EREG/NEREG + upgrade conditions to v0.2.6 by @zhouzhuojie in #683
  • chore: remove dead code in pkg/entity/evaluator.go by @zhouzhuojie in #684
  • test: enforce SaveFlagSnapshot call in all mutation handlers by @zhouzhuojie in #687
  • perf: short-circuit EvalCache reload when no new flag_snapshot by @zhouzhuojie in #686
  • refactor: extract shortCircuitReload and protect lastSnapshotMaxID with mutex by @zhouzhuojie in #688
  • feat(ui): migrate Vue CLI → Vite, Vue 2 → Vue 3, Element UI → Element Plus by @zhouzhuojie in #689
  • fix: security dep bumps + supply chain cooldown + eslint 9 by @zhouzhuojie in #697
  • refactor: migrate integration tests to Go, split monolith, clean up seed data by @zhouzhuojie in #701
  • feat: Datar as DataRecorder, comma-separated RecorderType by @zhouzhuojie in #692
  • feat: JSON-based GitOps flag management — eval-only mode, auto-ID, validator, docs by @zhouzhuojie in #699
  • fix: resolve all open Dependabot and CodeQL security alerts by @zhouzhuojie in #702
  • fix: prevent duplicate rows when creating/restoring flags by @zhouzhuojie in #703
  • chore: remove redundant CodeQL and CodeSee workflows by @zhouzhuojie in #704
  • refactor: consolidate server binary under cmd/ folder by @zhouzhuojie in #705
  • docs: refactor README and docs for clarity, accuracy, and recent features by @zhouzhuojie in #706
  • feat(ui): visual hierarchy, spacing scale, responsive breakpoints, danger zone rework by @zhouzhuojie in #707
  • refactor(ui): refine color palette and extract color tokens by @zhouzhuojie in #708
  • perf(handler): faster eval and batch evaluation by @zhouzhuojie in #709
  • feat: client exposure logging for A/B testing by @zhouzhuojie in #711
  • docs(exposure): pipeline guide, entityContext-only, lint & swagger fixes by @zhouzhuojie in #713
  • docs: refactor and enrich all docs for clarity, accuracy, and narrative by @zhouzhuojie in #714
  • docs(env): clarify that FLAGR_JWT_AUTH_SECRET holds RSA public key for RS256 by @zhouzhuojie in #715
  • docs: replace flagr_arch.png with code-aligned mermaid architecture by @zhouzhuojie in #716
  • fix(integration): wait for eval readiness after seeding by @zhouzhuojie in #717
  • Prepare 1.2.0 release by @zhouzhuojie in #718

New Contributors

Full Changelog: 1.1.20...1.2.0

Don't miss a new flagr release

NewReleases is sending notifications on new releases.