Skip to content

FIX pyrit initializer config in ARM templates must be comma-separated#1955

Open
behnam-o wants to merge 1 commit into
microsoft:mainfrom
behnam-o:fix-copyrit-startup
Open

FIX pyrit initializer config in ARM templates must be comma-separated#1955
behnam-o wants to merge 1 commit into
microsoft:mainfrom
behnam-o:fix-copyrit-startup

Conversation

@behnam-o

@behnam-o behnam-o commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

In startup.sh, the initializers passed in an env var are expected to be comma-separated, but in our ARM templates, they are not. This causes crashes like this when for the container app:

Connecting to stream...
2026-06-08T18:23:32.50309  Connecting to the container 'pyrit-gui'...
2026-06-08T18:23:32.61244  Successfully Connected to container: 'pyrit-gui' [Revision: 'copyrit-test1--0000094', Replica: 'copyrit-test1--0000094-6c4d75bc8c-djbqz']
2026-06-08T18:22:13.1916813Z stderr F     return await anext(self.gen)
2026-06-08T18:22:13.1916831Z stderr F            ^^^^^^^^^^^^^^^^^^^^^
2026-06-08T18:22:13.1916850Z stderr F   File "/opt/venv/lib/python3.11/site-packages/fastapi/routing.py", line 216, in merged_lifespan
2026-06-08T18:22:13.1917523Z stderr F     async with original_context(app) as maybe_original_state:
2026-06-08T18:22:13.1917590Z stderr F   File "/usr/lib/python3.11/contextlib.py", line 204, in __aenter__
2026-06-08T18:22:13.1917644Z stderr F     return await anext(self.gen)
2026-06-08T18:22:13.1917666Z stderr F            ^^^^^^^^^^^^^^^^^^^^^
2026-06-08T18:22:13.1917684Z stderr F   File "/app/pyrit/backend/main.py", line 55, in lifespan
2026-06-08T18:22:13.1917702Z stderr F     await config.initialize_pyrit_async()
2026-06-08T18:22:13.1917721Z stderr F   File "/app/pyrit/setup/configuration_loader.py", line 550, in initialize_pyrit_async
2026-06-08T18:22:13.1917741Z stderr F     resolved_initializers = self.resolve_initializers()
2026-06-08T18:22:13.1917759Z stderr F                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-08T18:22:13.1917776Z stderr F   File "/app/pyrit/setup/configuration_loader.py", line 472, in resolve_initializers
2026-06-08T18:22:13.1917800Z stderr F     initializer_class = registry.get_class(config.name)
2026-06-08T18:22:13.1917820Z stderr F                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-08T18:22:13.1917840Z stderr F   File "/app/pyrit/registry/class_registries/base_class_registry.py", line 212, in get_class
2026-06-08T18:22:13.1917860Z stderr F     raise KeyError(f"'{name}' not found in registry. Available: {available}")
2026-06-08T18:22:13.1918066Z stderr F KeyError: "'target airt' not found in registry. Available: airt, load_default_datasets, preload_scenario_metadata, scenario_objective_list, scenario_technique, scorer, simple, target"
2026-06-08T18:22:13.1918102Z stderr F 
2026-06-08T18:22:13.1918128Z stderr F ERROR:    Application startup failed. Exiting.

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.

1 participant