Skip to content

Cancelling an ArchiMate import crashes, and the import never reports progress #1076

Description

@rubenvdlinde

What goes wrong

Cancelling an ArchiMate import fails with an uncaught error, and a running ArchiMate import cannot be followed through the progress API because it never records progress.

Evidence, re-read at c9760e0

Cancel:

  • appinfo/routes.php:103 routes POST /api/archimate/import/cancel to lib/Controller/SettingsController.php:2792 cancelArchiMateImport() (admin-only, checked in the body at :2798).
  • It calls lib/Service/SettingsService.php:5195 cancelArchiMateImport(), which at :5200 calls $archiMateService->cancelArchiMateImport().
  • lib/Service/ArchiMateService.php has no method of that name. The only definitions of cancelArchiMateImport in lib/ are the controller (:2792) and SettingsService (:5195).
  • Calling an undefined method throws \Error. Both the service (:5201) and the controller (:2810) catch only \Exception, so the fallback that clears archimate_import_status never runs and the request ends in an unhandled 500.
  • Nothing in src/ calls /api/archimate/import/cancel, and src/views/settings/sections/ArchiMateImportExport.vue:532-541 shows only an Import button with a spinner while importing, no cancel control.

Progress:

  • appinfo/routes.php:119-120 expose GET /api/progress/{operationId} and /stream, which read ProgressTracker.
  • ProgressTracker is injected into and written by SbomImportService (lib/AppInfo/Application.php:507, writes at SbomImportService.php:144-178) and MergeOrganisatieService (Application.php:283, writes at MergeOrganisatieService.php:242-356). No ArchiMate import class receives or writes it, even though ProgressTracker.php:6 says it exists for ArchiMate import/export and defines an ArchiMate parsing phase (:43).

Why it matters

An admin who starts a large ArchiMate import has no way to stop it or see how far it is: the cancel endpoint crashes instead of cancelling, and any progress query for the import returns nothing.

Needs a live check

Code reading. Confirm the 500 with POST /index.php/apps/stackiq/api/archimate/import/cancel as admin.

Note on the matrix evidence: it says only SbomImportService writes to ProgressTracker. MergeOrganisatieService also does. The ArchiMate conclusion holds.

Surfaced by the capability matrix in stackiq#1072 (merge 38b9938), row arch-import-progress.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triageAwaiting triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions