KaotoIO / kaoto

The UI of the Kaoto project
https://kaoto.io
Apache License 2.0
37 stars 28 forks source link

Cannot delete Kamelet route container #1663

Open apupier opened 19 hours ago

apupier commented 19 hours ago

Describe the Bug

Cannot delete Kamelet route container

EDIT: I found this stack in console log but in fact it is not related to this action (but might impact it?)

hook.js:608 Could not compile schema MissingRefError: can't resolve reference #/definitions/org.apache.camel.model.ProcessorDefinition from id #
 Error Component Stack
    at SchemaBridgeProvider (schema-bridge.provider.tsx:22:13)
    at CanvasFormBody (CanvasFormBody.tsx:18:27)
    at div (<anonymous>)
    at div (<anonymous>)
    at ErrorBoundary (ErrorBoundary.tsx:18:5)
    at CanvasForm (CanvasForm.tsx:15:66)
    at FilteredFieldProvider (filtered-field.provider.tsx:19:39)
    at ErrorBoundary (ErrorBoundary.tsx:18:5)
    at div (<anonymous>)
    at CanvasSideBar (CanvasSideBar.tsx:15:13)
    at div (<anonymous>)
    at div (<anonymous>)
    at div (<anonymous>)
    at div (<anonymous>)
    at div (<anonymous>)
    at div (<anonymous>)
    at Canvas (Canvas.tsx:47:77)
    at ErrorBoundary (ErrorBoundary.tsx:18:5)
    at CanvasFormTabsProvider (canvas-form-tabs.provider.tsx:15:41)
    at div (<anonymous>)
    at Visualization (Visualization.tsx:19:22)
    at ActionConfirmationModalContextProvider (action-confirmation-….provider.tsx:28:41)
    at CatalogModalProvider (catalog-modal.provider.tsx:42:31)
    at DesignPage (DesignPage.tsx:9:27)
    at VisibleFlowsProvider (visible-flows.provider.tsx:18:27)
    at CatalogTilesProvider (catalog-tiles.provider.tsx:14:26)
    at CatalogLoaderProvider (catalog.provider.tsx:16:45)
    at SchemasLoaderProvider (schemas.provider.tsx:17:45)
    at RuntimeProvider (runtime.provider.tsx:22:45)
    at div (<anonymous>)
    at div (<anonymous>)
    at div (<anonymous>)
    at Panel (<anonymous>)
    at main (<anonymous>)
    at div (<anonymous>)
    at Shell (Shell.tsx:13:37)
    at EntitiesProvider (entities.provider.tsx:7:17)
    at SourceCodeProvider (source-code.provider.tsx:22:39)
    at SettingsProvider (settings.provider.tsx:13:49)
    at Provider (reload.hook.tsx:15:50)
    at App (App.tsx:19:26)

Steps to Reproduce the Bug or Issue

  1. Create a Kamelet
  2. select the route container of the Kamelet
  3. click on the delete button
  4. click confirm --> the default route is still here

Screenshots or Videos

No response

Platform

lhein commented 18 hours ago

When deleting the container it actually means deleting the whole kamelet content. I am wondering what would be best here. If we want to stay consistent I would think we should empty the Kamelet fully and let the user start from scratch.

lordrip commented 18 hours ago

From scratch meaning a source and a sink?

lhein commented 18 hours ago

Probably the same as when the source code is empty? Having the "Start from Scratch" thing?

lordrip commented 17 hours ago

Sure, but after that, what next? Because that control uses the kamelet template, so we're gonna be in the same place as before :thinking:

Could creating an empty Kamelet with just a source be an alternative?

lordrip commented 17 hours ago

@apupier this log happens because we're not including the ProcessorDefinition property in all schemas, but it doesn't impact the Kamelet situation.

Could not compile schema MissingRefError: can't resolve reference #/definitions/org.apache.camel.model.ProcessorDefinition from id #
lordrip commented 12 hours ago

We could go with something similar to this Image