Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KCP CLI - show errors #1177

Closed
piotrmiskiewicz opened this issue Sep 23, 2024 · 2 comments
Closed

KCP CLI - show errors #1177

piotrmiskiewicz opened this issue Sep 23, 2024 · 2 comments
Assignees
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Comments

@piotrmiskiewicz
Copy link
Member

piotrmiskiewicz commented Sep 23, 2024

The KCP cli must show details of an error which failed the operation. It will help and speedup investigations.

AC:
The output of KCP CLI shows errors from all failed (and deprovision incompleted) operations.

The example output looks like:

      "instanceID": "AC2441C3-67DA-432F-A211-38D4CB11A8E1",
      "runtimeID": "",
      "globalAccountID": "c43fa834-6c17-4e48-a436-1ddc5164f14c",
      "subscriptionGlobalAccountID": "",
      "subAccountID": "ee694042-9cc4-4675-9154-583ba30b0451",
      "region": "",
      "subAccountRegion": "cf-eu20-staging",
      "shootName": "c-33771c4",
      "serviceClassID": "47c9dcbf-ff30-448e-ab36-d3bad66ba281",
      "serviceClassName": "kymaruntime",
      "servicePlanID": "4deee563-e5ec-4731-b9b1-53b42d855f0c",
      "servicePlanName": "azure",
      "provider": "Azure",
      "status": {
        "createdAt": "2024-06-24T07:57:44.040102Z",
        "modifiedAt": "2024-06-24T14:59:11.763854Z",
        "state": "failed",
        "provisioning": {
          "state": "failed",
          "description": "Operation created",
          "createdAt": "2024-06-24T07:57:44.031495Z",
          "updatedAt": "2024-06-24T14:59:11.763854Z",
          "operationID": "ef5aa442-88ba-42dc-b68a-426c4e6d12c8",
          "finishedStages": [
            "start"
          ],
          "error": {
            "step": "check_kyma_runtime",
            "code": "ProvisioningTimeout",
            "message": "operation has reached the time limit",
            "team": "Framefrogs",
            "component": "provisioner"
          }
        }
      },
      "userID": "[email protected]",
      "avsInternalEvaluationID": 0
    }

KEB must add the error object to the output. The necessary data is stored in the LastError field.
The operationManager must set the field with proper values when the operation fails. See OperationManager methods:

Consider to not pass to much details to the operation description field (it goes to the customer).
The component -> team mapping can be provided as a KCP CLI config
Every step is assigned to one component, every component has one responsible team.
Error is displayed only if terminal state happens like: provisioning failed. Should not happen when retry etc.

@PK85 PK85 added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 9, 2024
@ukff ukff self-assigned this Oct 30, 2024
@ukff
Copy link
Contributor

ukff commented Nov 27, 2024

PR KEB: #1491
PR KEB 2: #1496
PR KEB 3: #1517
PR Cfg: documentation PR #723
PR KEB 4 #1527
PR Cfg: https://github.tools.sap/kyma/documentation/pull/731/files
PR CLI: https://github.tools.sap/kyma/kcp-cli/pull/37

@ukff
Copy link
Contributor

ukff commented Dec 17, 2024

To Fix:

kebError.ReasonForError dont takes depenedecies into calculation

processedOperation.LastError = kebError.ReasonForError(err, step.Name())

here this function overrites previous errors which sets wrong dependency (always keb)
Resolved: #1584

@ukff ukff removed their assignment Dec 17, 2024
@KsaweryZietara KsaweryZietara self-assigned this Dec 17, 2024
@KsaweryZietara KsaweryZietara removed their assignment Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

No branches or pull requests

4 participants