You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c32546a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: doc/gui/0_gui.md
+49-1Lines changed: 49 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,7 +358,55 @@ The **Configuration** page provides administrator-only editing for the files and
358
358
-**Initializers** shows the read-only startup sequence from the active `.pyrit_conf`, in run order, along with the catalog of registered initializers.
359
359
-**Custom Initializers** registers or removes Python initializer scripts. This tab requires `allow_custom_initializers: true`; scripts are stored in the configured local directory or Azure Blob container and must define a concrete `PyRITInitializer` subclass.
360
360
361
-
Use **Reload** to discard local edits and fetch the latest source content. Saved configuration and environment changes take effect after restarting PyRIT. Custom initializer scripts execute under the backend service identity, so only trusted administrators should manage them.
361
+
Use **Reload file** to fetch the latest source content; unsaved edits require explicit discard confirmation.
362
+
**Save** only persists a source. **Reinitialize PyRIT** separately applies saved configuration, environment sources,
363
+
and stored initializer scripts for every user of this backend. Save or discard editor changes first.
364
+
Custom initializer scripts execute under the backend service identity, so only trusted administrators should manage them.
365
+
366
+
### Reinitializing without a process restart
367
+
368
+
Set `enable_live_reinitialization: true` in the saved `.pyrit_conf` to enable this administrator action. This setting
369
+
is an explicit operator acknowledgement that the deployment has **one backend process and one replica**.
370
+
It is disabled when `WEB_CONCURRENCY`, `UVICORN_WORKERS`, `PYRIT_API_WORKERS`, or `PYRIT_REPLICAS` specifies anything
371
+
other than `1`. Do not use it behind a multi-worker server or across multiple replicas; it is not a distributed
372
+
configuration update. External scaling settings cannot be discovered from within a process.
373
+
374
+
Before replacement, PyRIT validates the saved configuration, environment sources, scripts, initializer parameters,
375
+
and required environment values. Custom initializer scripts are trusted code. Importing a script or constructing its
376
+
initializer can have side effects during validation.
377
+
378
+
Reinitialization resets setup-owned component registries and recreates backend services. Components created only
379
+
through the GUI must be recreated. The same memory object and persisted history are retained, including an in-memory
380
+
database. Changing the memory type, Azure SQL connection, or Azure results storage configuration requires a backend
381
+
restart and is rejected before replacement.
382
+
383
+
Live apply does not stop or drain work. It rejects the request if a scenario, preparation, send, estimate, or other
384
+
runtime operation is active. Wait for the work to finish, or cancel it with its existing control, and then retry.
385
+
When the runtime is idle, PyRIT closes admission and checks again before it changes runtime state. This second check
386
+
prevents newly admitted work from overlapping replacement.
387
+
388
+
Operation status survives a browser disconnect or navigation; other connected clients detect runtime generation
389
+
changes and refresh catalogs without discarding chat or configuration drafts.
390
+
391
+
If validation fails, PyRIT does not change the live runtime. Repair the saved source and retry. If startup fails, or
392
+
if live initialization fails after replacement starts, runtime operations stay unavailable until you restart the
393
+
backend. The administration UI stays available for configuration repair. Authentication and authorization retain
394
+
their process-start settings; reinitialization does not recreate them.
395
+
396
+
Selected environment assignments replace existing process values, **including deployment-provided values**.
397
+
Omitted variables remain unchanged; empty assignments set an empty value. Key Vault source selection and
398
+
`.env.local` priority are preserved, and interpolation uses the new selected values. Ordinary library initialization
399
+
keeps its existing precedence; replacement is an explicit reinitialization option. There is no rollback of
400
+
environment assignments, initializer side effects, memory writes, or external actions if initialization fails.
401
+
Listener and authentication settings remain process-start-only. This does not run a process supervisor, restart a
402
+
container, or make local source files durable when a container is replaced.
403
+
404
+
API clients can use administrator-only `GET /api/config/runtime`, `POST /api/config/runtime/apply`
405
+
(`version`). Obtain the configuration version and opt-in state from `GET /api/config`. A newly admitted operation
406
+
returns HTTP 202 and is tracked in status. Outcomes distinguish busy, unsupported, version-conflict,
407
+
invalid-configuration, and restart-required. Authenticated non-admin clients can read readiness and generation only
408
+
at `GET /api/runtime`.
409
+
`GET /api/health` reports server responsiveness, not runtime readiness.
0 commit comments