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

(ChaosCenter): API Testing issues tracker #362

Open
Jonsy13 opened this issue Jan 31, 2022 · 2 comments
Open

(ChaosCenter): API Testing issues tracker #362

Jonsy13 opened this issue Jan 31, 2022 · 2 comments
Assignees

Comments

@Jonsy13
Copy link
Collaborator

Jonsy13 commented Jan 31, 2022

This issue will be used as a tracker for tracking issues in different APIs of ChaosCenter -

@Aman-Codes
Copy link
Contributor

Aman-Codes commented Jan 31, 2022

GraphQL API

  • Issue 1:
    API: deleteMyHub
    When a user try to delete a myhub which belongs to a project which it does not have access to, then the delete Api returns "deleteMyHub": true instead of error: "permission_denied"

  • Issue 2:
    API: getYAMLData , GetPredefinedWorkflowList and GetPredefinedExperimentYAML
    Above 3 APIs asks for a mandotary field projectID but a user with no access to that project is successfully getting the data. That user should not receive the data and instead should receive an error stating permission_denied.

  • Issue 3:
    API: syncHub
    The syncHub APIs asks for a mandotary field id (HubID) but a user with no access to the project where the hub was created is successfully getting the data. That user should not receive the data and instead should receive an error stating permission_denied.

  • Issue 4:
    API: userClusterReg

    • Multiple cluster with same cluster name possible
    • Documentation states that platform_name is optional but it is a required string input field with no input validation (could be empty string as well)
    • No input validation on cluster_type parameter. Possible values should only be external or internal but currently it could have any gibberish value or empty string
    • No input validation on agent_scope parameter. Possible values should only be cluster or internal but currently it could have any gibberish value or empty string
    • Documentation states that agent_ns_exists, agent_sa_exists and skip_ssl boolean flags are mandatory parameters but currently they are optional parameters with default value null
    • Documentation states that node_selector is a mandatory parameter but currently it is an optional parameter
    • Missing tolerations parameter from documentation
  • Issue 5:
    API: deleteClusterReg
    Viewer is able to delete agent using deleteClusterReg mutation

  • Issue 6:
    RBAC checks needed for:
    DeleteChaosWorkflow, GeneraterSSHKey, UpdateDashboard, DeleteDashboard, DeleteDataSource, DeleteManifestTemplate, CreateImageRegistry, UpdateImageRegistry, DeleteImageRegistry, ListDataSource, GetPromSeriesList, ListDashboard, GetGitOpsDetails, ListManifestTemplate, GetTemplateManifestByID, ListImageRegistry, GetImageRegistry, TerminateChaosWorkflow, SyncWorkflow, SyncHub APIs.

  • Issue 7:
    API: createChaosWorkFlow
    Creating workflow with existing workflow name should not be possible but currently it is possible to create 2 workflows with same workflow name.

  • Issue 8:
    API: reRunChaosWorkFlow
    Reruning a chaos workflow gives internal system error.

  • Issue 9:
    API: updateChaosWorkflow
    Updating a chaos workflow without providing a workflow_id creates a new workflow instead of giving error.

  • Issue 10:
    API: deleteChaosWorkflow
    Deleting a chaos workflow while it is running gives internal system error.

  • Issue 11:
    API: deleteClusters
    Deleting a cluster gives internal system error.

Authentication API

  • Issue 1:
    API: POST /create
    Currently there is no email id validation while creating a new user. A basic regex based check is needed on the server.

  • Issue 2:
    API: POST /update/state
    The documentation states that is_deactivate is a mandatory parameter but when it is not provided then the api treats null value to be false. Instead it should return error stating invalid_request.

  • Issue 3:
    API: POST /create_project
    When no project_name is provided it returns {message: "project name can't be empty"} instead the response should have been { "error": "invalid_request", "error_description": "project name can't be empty" } to clearly showcase that the request failed.

  • Issue 4:
    API: POST /get_project/${project_id}
    A user could get the details of a project which they are not a part of.

  • Issue 5:
    API: POST /send_invitation
    When no role is provided it returns {message: "role can't be empty"} instead the response should have been { "error": "invalid_request", "error_description": "role can't be empty" } to clearly showcase that the request failed.

  • Issue 6:
    API: GET /list_projects and /get_project/{project_id}
    Additional field UID is also provided for each project which is missing from Response Example.

  • Issue 7:
    API: POST /get_user_with_project/${username}
    Non-admin users could also get all the details of all other users including their projects through this api.

  • Issue 8:
    API: POST /remove_invitation
    API is giving response {message: "Successful"} even when user_id (a mandatory field) is not provided.

  • Issue 9:
    API: POST /leave_project
    When a user leaves a project still /list_projects api shows them to be a part of that project.

Documentation

  • Issue 1:
    API: POST /create
    Name and email are not mandatory parameters in post request to /create. They should be changed to optional parameters.

  • Issue 2:
    API: GET /get_projects_stats
    Missing documentation of api which is already implemented here

  • Issue 3:
    API: GET /getUser/{user_id}
    The response example states that the response would be an Array but instead it is a JSON Object

  • Issue 4:
    API: POST /update/password
    username is not a mandatory parameters in post request to /update/password. It should be changed to optional parameter.

  • Issue 5:
    API: GET /get_user_with_project/{username}
    The Response Example provided is incorrect and should be changed from

{
  "data": {
    "ID": "c0b43e3f-8e7f-475e-9aa3-c2393a0f408b",
    "UserName": "admin",
    "CreatedAt": "1627040799",
    "Email": "",
    "Name": "",
    "Projects": [
      {
        "ID": "384f6666-3b7d-4381-b5b5-bfc4c3dedbc8",
        "Name": "my project",
        "Members": [
          {
            "UserID": "c0b43e3f-8e7f-475e-9aa3-c2393a0f408b",
            "UserName": "admin",
            "Name": "",
            "Role": "Owner",
            "Email": "",
            "Invitation": "Accepted",
            "JoinedAt": "1640676874",
            "DeactivatedAt": ""
          }
        ],
        "State": "active",
        "CreatedAt": "1627040799",
        "UpdatedAt": "1627040799",
        "RemovedAt": ""
      }
    ]
  }
}

to

{
  "data": {
    "ID": "c0b43e3f-8e7f-475e-9aa3-c2393a0f408b",
    "Username": "admin",
    "CreatedAt": "1627040799",
    "Email": "",
    "Name": "",
    "Projects": [
      {
        "ID": "384f6666-3b7d-4381-b5b5-bfc4c3dedbc8",
        "Name": "my project",
        "Members": [
          {
            "UserID": "c0b43e3f-8e7f-475e-9aa3-c2393a0f408b",
            "Role": "Owner",
            "Invitation": "Accepted",
            "JoinedAt": "1640676874",
          }
        ],
        "State": "active",
        "CreatedAt": "1627040799",
        "UpdatedAt": "1627040799",
        "RemovedAt": ""
      }
    ]
  }
}

That is change UserName to Username and remove additional fields from member object which are not provided.

  • Issue 6:
    API: POST /create_project
    The member schema in Response Example should be changed from
"Members": [
  {
    "UserID": "c0b43e3f-8e7f-475e-9aa3-c2393a0f408b",
    "UserName": "admin",
    "Name": "",
    "Role": "Owner",
    "Email": "",
    "Invitation": "Accepted",
    "JoinedAt": "1640676874",
    "DeactivatedAt": ""
  }
],

to

"Members": [
  {
    "UserID": "c0b43e3f-8e7f-475e-9aa3-c2393a0f408b",
    "Role": "Owner",
    "Invitation": "Accepted",
    "JoinedAt": "1640676874",
  }
],
  • Issue 7:
    API: getYAMLData and GetPredefinedExperimentYAML
    Documentation states that FileType is optional but while running it on generic/pod-delete without FileType give Internal Server Error, whereas if we provide the string experiment then it returns the data of experiment.yaml file.
    Also the name FileType is misleading as we have to instead provide the File Name (without extension).

  • Issue 8:
    API: deleteClusterReg
    deleteClusterReg mutation always fail with message internal system error

  • Issue 9:
    API: POST /leave_project
    Documentation states that user_id is a mandatory field but it should be removed as it is a redundant field. As the api is used by a user (identified by access token) to leave the project (identified by project_id).

  • Issue 10:
    API: getCluster
    cluster_type should be changed to an optional parameter in documentation.

Other Issues

  • Issue 1:
    When a user creates multiple projects from api then Self Agent shows pending state in all the created projects except admin's project.

  • Issue 2:
    When a user tries to disconnect the agent then the executed by field is not provided by the api due to which the request fails.

@Aman-Codes
Copy link
Contributor

Current Api Tests Report

project.spec.js

1 test failing

  1. Testing api without user_id
    User is able to leave project without providing user id

user.spec.js

All tests passed

cluster.spec.js

3 tests fail

  1. Testing input validation in registering a new cluster
    User is able to provide empty platformname, clusterType and agentScope

  2. Registering a new cluster with same name
    It is possible to create a new cluster with existing name

  3. Deleting a cluster gives internal server error
    Graphql logs:

2022/06/22 04:00:44 Server endpoint: http://192.168.65.4:32269/query
time="2022-06-22T04:00:44Z" level=info msg="New Agent Registered with ID: 7ddc20b5-1a4f-454d-8d0f-b9808f6c84c5 PROJECT_ID: 3ea6ee4c-20fd-4c64-a8c9-c54c6720f7bb"
runtime error: invalid memory address or nil pointer dereference

goroutine 629 [running]:
runtime/debug.Stack(0x1, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x25
github.com/99designs/gqlgen/graphql.DefaultRecover(0x2473820, 0xc0009f05a0, 0x1dfb440, 0x317a6a0, 0x0, 0x0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/recovery.go:16 +0xaa
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteClusters.func1(0xc0021cf630, 0xc0021cf660, 0xc000983398)
        /gql-server/graph/generated/generated.go:14764 +0x7e
panic(0x1dfb440, 0x317a6a0)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/cluster/handler.DeleteClusters(0x2473820, 0xc0009f05a0, 0xc0000a8900, 0x24, 0xc00000e7e8, 0x1, 0x1, 0xc000218330, 0xc000218360, 0xc000218390, ...)
        /gql-server/pkg/cluster/handler/handler.go:190 +0x57c
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.(*mutationResolver).DeleteClusters(0xc00000e7f8, 0x2473820, 0xc0009f05a0, 0xc0000a8900, 0x24, 0xc00000e7e8, 0x1, 0x1, 0x1f2b7c0, 0x2165b01, ...)
        /gql-server/graph/cluster.resolvers.go:53 +0x1d9
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteClusters.func2.1(0x2473820, 0xc0009f05a0, 0x1d54e60, 0x240ff30, 0x1f19140, 0xc0009f0390)
        /gql-server/graph/generated/generated.go:14786 +0x1a8
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.NewConfig.func1(0x2473820, 0xc0009f02d0, 0x0, 0x0, 0xc0003ffda0, 0x20, 0x1eeb400, 0x1, 0xc0003ffda0)
        /gql-server/graph/resolver.go:29 +0x115
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteClusters.func2.2(0x2473820, 0xc0009f02d0, 0xc0003ffd80, 0x20, 0x20, 0x1eeb400)
        /gql-server/graph/generated/generated.go:14792 +0x5d
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteClusters.func2(0x2473820, 0xc0009f02d0, 0x20, 0x1eeb400, 0xc0009f0301, 0xc0003ffd80)
        /gql-server/graph/generated/generated.go:14795 +0xcf
github.com/99designs/gqlgen/graphql/executor.processExtensions.func3(0x2473820, 0xc0009f02d0, 0xc0003ffd80, 0xc0009f0300, 0xc0009f0330, 0x0, 0x0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:62 +0x3a
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteClusters(0xc0021cf630, 0x2473820, 0xc0009f02a0, 0xc0059c6d00, 0x0, 0x0, 0x0, 0x0, 0x0)
        /gql-server/graph/generated/generated.go:14783 +0x2cf
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation(0xc0021cf630, 0x2473820, 0xc0009f02a0, 0xc0021cf390, 0x1, 0x1, 0x203000, 0xc000983618)
        /gql-server/graph/generated/generated.go:27144 +0x1c94
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executableSchema).Exec.func2(0x2473820, 0xc0009f0270, 0x30)
        /gql-server/graph/generated/generated.go:3839 +0x7b
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1(0x2473820, 0xc0009f0270, 0xc0021cf640)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:105 +0x43
github.com/99designs/gqlgen/graphql/executor.processExtensions.func2(0x2473820, 0xc0009f0270, 0xc0021cf640, 0x240e420)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:59 +0x3a
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1(0x2473820, 0xc0009f0210, 0xc0003eb3b0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:104 +0x12c
github.com/99designs/gqlgen/graphql/handler/transport.POST.Do(0x246f620, 0xc0008867e0, 0xc0009dc900, 0x2462b10, 0xc0002b5170)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/transport/http_post.go:52 +0x35a
github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP(0xc0002c7be0, 0x246f620, 0xc0008867e0, 0xc0009dc900)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/server.go:115 +0x21b
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/authorization.Middleware.func1(0x246f620, 0xc0008867e0, 0xc0009dc700)
        /gql-server/pkg/authorization/middleware.go:30 +0x1e7
net/http.HandlerFunc.ServeHTTP(0xc0000b6fc0, 0x246f620, 0xc0008867e0, 0xc0009dc700)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/rs/cors.(*Cors).Handler.func1(0x246f620, 0xc0008867e0, 0xc0009dc700)
        /go/pkg/mod/github.com/rs/[email protected]/cors.go:231 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0003ffba0, 0x246f620, 0xc0008867e0, 0xc0009dc700)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc000370180, 0x246f620, 0xc0008867e0, 0xc0009dc500)
        /go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0xd3
net/http.serverHandler.ServeHTTP(0xc0007180e0, 0x246f620, 0xc0008867e0, 0xc0009dc500)
        /usr/local/go/src/net/http/server.go:2868 +0xa3
net/http.(*conn).serve(0xc00045bb80, 0x2473820, 0xc00019ad80)
        /usr/local/go/src/net/http/server.go:1933 +0x8cd
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2994 +0x39b
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
time="2022-06-22T04:01:17Z" level=info msg="Running GitOps DB Sync..."

gitops.spec.js

All tests passed

imageRegistry.spec.js

All tests passed

myhub.spec.js

1 test failed

  1. Fetching the experiment details from a selected chart of a project with editor access
    The Api gives internal server error as response
    graphql logs:
Defaulted container "graphql-server" out of: graphql-server, wait-for-mongodb (init)
time="2022-06-22T04:19:20Z" level=info msg="Go Version: go1.16.15"
time="2022-06-22T04:19:20Z" level=info msg="Go OS/Arch: linux/amd64"
time="2022-06-22T04:19:20Z" level=info msg="Connected To MongoDB"
time="2022-06-22T04:19:20Z" level=info msg="Running GitOps DB Sync..."
time="2022-06-22T04:19:20Z" level=info msg="Running GitOps DB Sync..."
time="2022-06-22T04:19:20Z" level=info msg="connect to http://localhost:8080/ for GraphQL playground"
time="2022-06-22T04:19:20Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
time="2022-06-22T04:19:20Z" level=info msg="GRPC server listening on [::]:8000"
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
time="2022-06-22T04:19:41Z" level=info msg="NEW CLUSTER CONNECT: 65c1263d-8c1d-4e6c-a2f6-0d583dfc2ba5"
time="2022-06-22T04:19:41Z" level=info msg="VALIDATION FAILED: 65c1263d-8c1d-4e6c-a2f6-0d583dfc2ba5"
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
2022/06/22 04:21:07 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
2022/06/22 04:21:19 Cloning https://github.com/litmuschaos/chaos-charts
time="2022-06-22T04:21:20Z" level=info msg="Running GitOps DB Sync..."
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
File reading error open /tmp/version/16647bec-f6fa-4ee6-a143-6c31e8c0d80a/Litmus ChaosHub/charts/: no such file or directory
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
runtime error: invalid memory address or nil pointer dereference

goroutine 454 [running]:
runtime/debug.Stack(0x1, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x25
github.com/99designs/gqlgen/graphql.DefaultRecover(0x2473820, 0xc00401eff0, 0x1dfb440, 0x317a6a0, 0xc000838c28, 0x49b6ac)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/recovery.go:16 +0xaa
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func1(0xc00114df40, 0xc00114dfa0, 0xc0008391d0)
        /gql-server/graph/generated/generated.go:18300 +0x7e
panic(0x1dfb440, 0x317a6a0)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/myhub.GetHubExperiment(0x2473820, 0xc00401eff0, 0xc00013c570, 0x24, 0xc0007dca99, 0x7, 0xc0007dcac0, 0xa, 0xc0007dcae0, 0xc, ...)
        /gql-server/pkg/myhub/myhub.go:236 +0x29
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.(*queryResolver).GetHubExperiment(0xc004d7c278, 0x2473820, 0xc00401eff0, 0xc00013c570, 0x24, 0xc0007dca99, 0x7, 0xc0007dcac0, 0xa, 0xc0007dcae0, ...)
        /gql-server/graph/myhub.resolvers.go:98 +0x155
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func2.1(0x2473820, 0xc00401eff0, 0x1d54e60, 0x240ff30, 0x1f19140, 0xc00401eed0)
        /gql-server/graph/generated/generated.go:18322 +0x1bf
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.NewConfig.func1(0x2473820, 0xc00401ee40, 0x0, 0x0, 0xc000dfb780, 0x20, 0x1eeb400, 0xc00013c501, 0xc000dfb780)
        /gql-server/graph/resolver.go:29 +0x115
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func2.2(0x2473820, 0xc00401ee40, 0xc000dfb760, 0x20, 0x20, 0x1eeb400)
        /gql-server/graph/generated/generated.go:18328 +0x5d
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func2(0x2473820, 0xc00401ee40, 0x20, 0x1eeb400, 0x1, 0xc000dfb760)
        /gql-server/graph/generated/generated.go:18331 +0xcf
github.com/99designs/gqlgen/graphql/executor.processExtensions.func3(0x2473820, 0xc00401ee40, 0xc000dfb760, 0xc00401ee70, 0xc00401eea0, 0x0, 0x0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:62 +0x3a
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment(0xc00114df40, 0x2473820, 0xc00401ee10, 0xc001125e00, 0xc00114df70, 0x1, 0x1, 0x0, 0x0)
        /gql-server/graph/generated/generated.go:18319 +0x2ba
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query.func21(0x0, 0x0)
        /gql-server/graph/generated/generated.go:27958 +0xa8
github.com/99designs/gqlgen/graphql.(*FieldSet).Dispatch(0xc000d9a8c0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/fieldset.go:34 +0x1dd
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query(0xc00114df40, 0x2473820, 0xc00401ede0, 0xc00114dab0, 0x1, 0x1, 0x203000, 0xc000839618)
        /gql-server/graph/generated/generated.go:28042 +0x452
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executableSchema).Exec.func1(0x2473820, 0xc00401ede0, 0x30)
        /gql-server/graph/generated/generated.go:3825 +0x7b
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1(0x2473820, 0xc00401ede0, 0xc00114df50)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:105 +0x43
github.com/99designs/gqlgen/graphql/executor.processExtensions.func2(0x2473820, 0xc00401ede0, 0xc00114df50, 0x240e420)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:59 +0x3a
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1(0x2473820, 0xc00401ed80, 0xc003fd9ef0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:104 +0x12c
github.com/99designs/gqlgen/graphql/handler/transport.POST.Do(0x246f620, 0xc0003e2c40, 0xc0002cac00, 0x2462b10, 0xc00021e2d0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/transport/http_post.go:52 +0x35a
github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP(0xc0005ba860, 0x246f620, 0xc0003e2c40, 0xc0002cac00)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/server.go:115 +0x21b
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/authorization.Middleware.func1(0x246f620, 0xc0003e2c40, 0xc0002caa00)
        /gql-server/pkg/authorization/middleware.go:30 +0x1e7
net/http.HandlerFunc.ServeHTTP(0xc00000d9f8, 0x246f620, 0xc0003e2c40, 0xc0002caa00)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/rs/cors.(*Cors).Handler.func1(0x246f620, 0xc0003e2c40, 0xc0002caa00)
        /go/pkg/mod/github.com/rs/[email protected]/cors.go:231 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc000dfb220, 0x246f620, 0xc0003e2c40, 0xc0002caa00)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0001760c0, 0x246f620, 0xc0003e2c40, 0xc0002ca800)
        /go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0xd3
net/http.serverHandler.ServeHTTP(0xc00017a0e0, 0x246f620, 0xc0003e2c40, 0xc0002ca800)
        /usr/local/go/src/net/http/server.go:2868 +0xa3
net/http.(*conn).serve(0xc004caa1e0, 0x2473820, 0xc0007d47c0)
        /usr/local/go/src/net/http/server.go:1933 +0x8cd
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2994 +0x39b
time="2022-06-22T04:22:09Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
time="2022-06-22T04:22:31Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=true
time="2022-06-22T04:22:31Z" level=info msg="Already up-to-date"
time="2022-06-22T04:23:20Z" level=info msg="Running GitOps DB Sync..."

workflow.spec.js

3 tests failing

  1. Creating workflow with existing workflow name
    User is able to create a chaos workflow with existing workflow name

  2. Updating chaos workflow without workflow_id
    Updating a chaos workflow without workflow_id creates a new workflow instead of giving error that workflow_id is missing

  3. Deleting chaos workflow
    Deleting chaos workflow gives internal system error
    graphql logs:

Defaulted container "graphql-server" out of: graphql-server, wait-for-mongodb (init)
time="2022-06-22T04:25:51Z" level=info msg="Go Version: go1.16.15"
time="2022-06-22T04:25:51Z" level=info msg="Go OS/Arch: linux/amd64"
time="2022-06-22T04:25:51Z" level=info msg="Connected To MongoDB"
time="2022-06-22T04:25:51Z" level=info msg="Running GitOps DB Sync..."
time="2022-06-22T04:25:51Z" level=info msg="GRPC server listening on [::]:8000"
time="2022-06-22T04:25:51Z" level=info msg="Running GitOps DB Sync..."
time="2022-06-22T04:25:51Z" level=info msg="connect to http://localhost:8080/ for GraphQL playground"
time="2022-06-22T04:25:51Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
time="2022-06-22T04:26:13Z" level=info msg="NEW CLUSTER CONNECT: 65c1263d-8c1d-4e6c-a2f6-0d583dfc2ba5"
time="2022-06-22T04:26:13Z" level=info msg="VALIDATION FAILED: 65c1263d-8c1d-4e6c-a2f6-0d583dfc2ba5"
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
time="2022-06-22T04:26:15Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
2022/06/22 04:26:40 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
time="2022-06-22T04:26:42Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
2022/06/22 04:27:09 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
File reading error open /tmp/version/74a0206f-1a52-405c-b401-f237f64d4036/Litmus ChaosHub/charts/: no such file or directory
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
time="2022-06-22T04:27:51Z" level=info msg="Running GitOps DB Sync..."
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
runtime error: invalid memory address or nil pointer dereference

goroutine 392 [running]:
runtime/debug.Stack(0x1, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x25
github.com/99designs/gqlgen/graphql.DefaultRecover(0x2473820, 0xc0045ad620, 0x1dfb440, 0x317a6a0, 0xc000c9cc28, 0x49b6ac)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/recovery.go:16 +0xaa
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func1(0xc0010d4f70, 0xc0010d4fd0, 0xc000c9d1d0)
        /gql-server/graph/generated/generated.go:18300 +0x7e
panic(0x1dfb440, 0x317a6a0)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/myhub.GetHubExperiment(0x2473820, 0xc0045ad620, 0xc000617d10, 0x24, 0xc0049fd549, 0x7, 0xc0049fd580, 0xa, 0xc0049fd5a0, 0xc, ...)
        /gql-server/pkg/myhub/myhub.go:236 +0x29
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.(*queryResolver).GetHubExperiment(0xc0008e24d8, 0x2473820, 0xc0045ad620, 0xc000617d10, 0x24, 0xc0049fd549, 0x7, 0xc0049fd580, 0xa, 0xc0049fd5a0, ...)
        /gql-server/graph/myhub.resolvers.go:98 +0x155
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func2.1(0x2473820, 0xc0045ad620, 0x1d54e60, 0x240ff30, 0x1f19140, 0xc0045ad4a0)
        /gql-server/graph/generated/generated.go:18322 +0x1bf
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.NewConfig.func1(0x2473820, 0xc0045ad410, 0x0, 0x0, 0xc0009dcee0, 0x20, 0x1eeb400, 0xc000617d01, 0xc0009dcee0)
        /gql-server/graph/resolver.go:29 +0x115
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func2.2(0x2473820, 0xc0045ad410, 0xc0009dcec0, 0x20, 0x20, 0x1eeb400)
        /gql-server/graph/generated/generated.go:18328 +0x5d
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment.func2(0x2473820, 0xc0045ad410, 0x20, 0x1eeb400, 0x1, 0xc0009dcec0)
        /gql-server/graph/generated/generated.go:18331 +0xcf
github.com/99designs/gqlgen/graphql/executor.processExtensions.func3(0x2473820, 0xc0045ad410, 0xc0009dcec0, 0xc0045ad440, 0xc0045ad470, 0x0, 0x0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:62 +0x3a
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query_getHubExperiment(0xc0010d4f70, 0x2473820, 0xc0045ad3e0, 0xc001204280, 0xc0010d4fa0, 0x1, 0x1, 0x0, 0x0)
        /gql-server/graph/generated/generated.go:18319 +0x2ba
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query.func21(0x0, 0x0)
        /gql-server/graph/generated/generated.go:27958 +0xa8
github.com/99designs/gqlgen/graphql.(*FieldSet).Dispatch(0xc0000aa960)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/fieldset.go:34 +0x1dd
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Query(0xc0010d4f70, 0x2473820, 0xc0045ad3b0, 0xc0010d4ae0, 0x1, 0x1, 0x203000, 0xc000c9d618)
        /gql-server/graph/generated/generated.go:28042 +0x452
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executableSchema).Exec.func1(0x2473820, 0xc0045ad3b0, 0x30)
        /gql-server/graph/generated/generated.go:3825 +0x7b
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1(0x2473820, 0xc0045ad3b0, 0xc0010d4f80)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:105 +0x43
github.com/99designs/gqlgen/graphql/executor.processExtensions.func2(0x2473820, 0xc0045ad3b0, 0xc0010d4f80, 0x240e420)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:59 +0x3a
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1(0x2473820, 0xc0045ad350, 0xc0045ac510)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:104 +0x12c
github.com/99designs/gqlgen/graphql/handler/transport.POST.Do(0x246f620, 0xc0010fab60, 0xc004053500, 0x2462b10, 0xc0005a8000)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/transport/http_post.go:52 +0x35a
github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP(0xc0000a6120, 0x246f620, 0xc0010fab60, 0xc004053500)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/server.go:115 +0x21b
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/authorization.Middleware.func1(0x246f620, 0xc0010fab60, 0xc004053300)
        /gql-server/pkg/authorization/middleware.go:30 +0x1e7
net/http.HandlerFunc.ServeHTTP(0xc00000c600, 0x246f620, 0xc0010fab60, 0xc004053300)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/rs/cors.(*Cors).Handler.func1(0x246f620, 0xc0010fab60, 0xc004053300)
        /go/pkg/mod/github.com/rs/[email protected]/cors.go:231 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0009dc980, 0x246f620, 0xc0010fab60, 0xc004053300)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0005aa000, 0x246f620, 0xc0010fab60, 0xc004053100)
        /go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0xd3
net/http.serverHandler.ServeHTTP(0xc0008020e0, 0x246f620, 0xc0010fab60, 0xc004053100)
        /usr/local/go/src/net/http/server.go:2868 +0xa3
net/http.(*conn).serve(0xc0036f41e0, 0x2473820, 0xc0003d2a00)
        /usr/local/go/src/net/http/server.go:1933 +0x8cd
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2994 +0x39b
time="2022-06-22T04:28:02Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
time="2022-06-22T04:28:25Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=true
time="2022-06-22T04:28:25Z" level=info msg="Already up-to-date"
2022/06/22 04:29:01 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
2022/06/22 04:29:21 Server endpoint: http://192.168.65.4:32269/query
time="2022-06-22T04:29:21Z" level=info msg="New Agent Registered with ID: 54590371-75cb-4150-a1bc-ba2adf605ff6 PROJECT_ID: 781cbdbb-2689-441d-aa6e-5765b2268e5a"
2022/06/22 04:29:21 Server endpoint: http://192.168.65.4:32269/query
2022/06/22 04:29:38 Cluster Confirmed having ID: 54590371-75cb-4150-a1bc-ba2adf605ff6, PID: 781cbdbb-2689-441d-aa6e-5765b2268e5a
time="2022-06-22T04:29:39Z" level=info msg="NEW CLUSTER CONNECT: 54590371-75cb-4150-a1bc-ba2adf605ff6"
time="2022-06-22T04:29:51Z" level=info msg="Running GitOps DB Sync..."
2022/06/22 04:30:08 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
2022/06/22 04:30:31 Error processing workflow: Workflow name doesn't match
2022/06/22 04:30:31 Acquired LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Release LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Acquired LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Release LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Acquired LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Release LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Acquired LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
2022/06/22 04:30:31 Release LOCK : 781cbdbb-2689-441d-aa6e-5765b2268e5a
runtime error: invalid memory address or nil pointer dereference

goroutine 1059 [running]:
runtime/debug.Stack(0x1, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x25
github.com/99designs/gqlgen/graphql.DefaultRecover(0x2473820, 0xc003ed4b10, 0x1dfb440, 0x317a6a0, 0x18, 0x247b8d8)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/recovery.go:16 +0xaa
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func1(0xc003ed6190, 0xc003ed61c0, 0xc003ed1398)
        /gql-server/graph/generated/generated.go:13973 +0x7e
panic(0x1dfb440, 0x317a6a0)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/chaos-workflow/handler.DeleteChaosWorkflow(0x2473820, 0xc003ed4b10, 0xc0009d6390, 0x24, 0xc003ed61e0, 0x0, 0xc0002b7640, 0x2076f7a, 0x8, 0x0)
        /gql-server/pkg/chaos-workflow/handler/handler.go:92 +0x293
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.(*mutationResolver).DeleteChaosWorkflow(0xc004e5eac8, 0x2473820, 0xc003ed4b10, 0xc0009d6390, 0x24, 0xc003ed61e0, 0x0, 0x1f2b7c0, 0x2165b01, 0xc003ed4b10)
        /gql-server/graph/workflow.resolvers.go:65 +0x145
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func2.1(0x2473820, 0xc003ed4b10, 0x1d54e60, 0x240ff30, 0x1f19140, 0xc003ed49f0)
        /gql-server/graph/generated/generated.go:13995 +0x1e6
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.NewConfig.func1(0x2473820, 0xc003ed4960, 0x0, 0x0, 0xc003ed22e0, 0x20, 0x1eeb400, 0x1, 0xc003ed22e0)
        /gql-server/graph/resolver.go:29 +0x115
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func2.2(0x2473820, 0xc003ed4960, 0xc003ed22c0, 0x20, 0x20, 0x1eeb400)
        /gql-server/graph/generated/generated.go:14001 +0x5d
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func2(0x2473820, 0xc003ed4960, 0x20, 0x1eeb400, 0xc003ed6101, 0xc003ed22c0)
        /gql-server/graph/generated/generated.go:14004 +0xcf
github.com/99designs/gqlgen/graphql/executor.processExtensions.func3(0x2473820, 0xc003ed4960, 0xc003ed22c0, 0xc003ed4990, 0xc003ed49c0, 0x0, 0x0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:62 +0x3a
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow(0xc003ed6190, 0x2473820, 0xc003ed4930, 0xc00070ce80, 0x0, 0x0, 0x0, 0x0, 0x0)
        /gql-server/graph/generated/generated.go:13992 +0x2ba
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation(0xc003ed6190, 0x2473820, 0xc003ed4930, 0xc000197f20, 0x1, 0x1, 0x203001, 0xc003ed1618)
        /gql-server/graph/generated/generated.go:27077 +0x2596
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executableSchema).Exec.func2(0x2473820, 0xc003ed4900, 0x30)
        /gql-server/graph/generated/generated.go:3839 +0x7b
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1(0x2473820, 0xc003ed4900, 0xc003ed61a0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:105 +0x43
github.com/99designs/gqlgen/graphql/executor.processExtensions.func2(0x2473820, 0xc003ed4900, 0xc003ed61a0, 0x240e420)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:59 +0x3a
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1(0x2473820, 0xc003ed48a0, 0xc003ed40c0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:104 +0x12c
github.com/99designs/gqlgen/graphql/handler/transport.POST.Do(0x246f620, 0xc0023020e0, 0xc00363f700, 0x2462b10, 0xc0005a8000)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/transport/http_post.go:52 +0x35a
github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP(0xc0000a6120, 0x246f620, 0xc0023020e0, 0xc00363f700)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/server.go:115 +0x21b
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/authorization.Middleware.func1(0x246f620, 0xc0023020e0, 0xc00363f500)
        /gql-server/pkg/authorization/middleware.go:30 +0x1e7
net/http.HandlerFunc.ServeHTTP(0xc00000c600, 0x246f620, 0xc0023020e0, 0xc00363f500)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/rs/cors.(*Cors).Handler.func1(0x246f620, 0xc0023020e0, 0xc00363f500)
        /go/pkg/mod/github.com/rs/[email protected]/cors.go:231 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc003ed2080, 0x246f620, 0xc0023020e0, 0xc00363f500)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0005aa000, 0x246f620, 0xc0023020e0, 0xc00363f300)
        /go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0xd3
net/http.serverHandler.ServeHTTP(0xc0008020e0, 0x246f620, 0xc0023020e0, 0xc00363f300)
        /usr/local/go/src/net/http/server.go:2868 +0xa3
net/http.(*conn).serve(0xc000648820, 0x2473820, 0xc0040ab340)
        /usr/local/go/src/net/http/server.go:1933 +0x8cd
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2994 +0x39b
time="2022-06-22T04:31:51Z" level=info msg="Running GitOps DB Sync..."
2022/06/22 04:32:45 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
2022/06/22 04:33:04 Server endpoint: http://192.168.65.4:32269/query
time="2022-06-22T04:33:04Z" level=info msg="New Agent Registered with ID: 964befdd-9a43-4eda-a79d-758fbb694d0c PROJECT_ID: 66bf50a1-f49a-448b-a5f9-e4c158dca51b"
2022/06/22 04:33:04 Server endpoint: http://192.168.65.4:32269/query
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
2022/06/22 04:33:48 Cluster Confirmed having ID: 964befdd-9a43-4eda-a79d-758fbb694d0c, PID: 66bf50a1-f49a-448b-a5f9-e4c158dca51b
time="2022-06-22T04:33:50Z" level=info msg="NEW CLUSTER CONNECT: 964befdd-9a43-4eda-a79d-758fbb694d0c"
time="2022-06-22T04:33:51Z" level=info msg="Running GitOps DB Sync..."
2022/06/22 04:34:22 Cloning https://github.com/litmuschaos/chaos-charts
Enumerating objects: 18778, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (149/149), done.
Total 18778 (delta 153), reused 188 (delta 130), pack-reused 18499
2022/06/22 04:34:43 Error processing workflow: Workflow name doesn't match
2022/06/22 04:34:43 Acquired LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:43 Release LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:43 Acquired LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:43 Release LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:44 Acquired LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:44 Release LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:44 Acquired LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
2022/06/22 04:34:44 Release LOCK : 66bf50a1-f49a-448b-a5f9-e4c158dca51b
runtime error: invalid memory address or nil pointer dereference

goroutine 1649 [running]:
runtime/debug.Stack(0x1, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x25
github.com/99designs/gqlgen/graphql.DefaultRecover(0x2473820, 0xc001379740, 0x1dfb440, 0x317a6a0, 0x18, 0x247b8d8)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/recovery.go:16 +0xaa
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func1(0xc003051c90, 0xc003051ce0, 0xc00107b398)
        /gql-server/graph/generated/generated.go:13973 +0x7e
panic(0x1dfb440, 0x317a6a0)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/chaos-workflow/handler.DeleteChaosWorkflow(0x2473820, 0xc001379740, 0xc000756450, 0x24, 0xc003051d10, 0x0, 0xc0002b7640, 0x2076f7a, 0x8, 0x0)
        /gql-server/pkg/chaos-workflow/handler/handler.go:92 +0x293
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.(*mutationResolver).DeleteChaosWorkflow(0xc0050c01e8, 0x2473820, 0xc001379740, 0xc000756450, 0x24, 0xc003051d10, 0x0, 0x1f2b7c0, 0x2165b01, 0xc001379740)
        /gql-server/graph/workflow.resolvers.go:65 +0x145
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func2.1(0x2473820, 0xc001379740, 0x1d54e60, 0x240ff30, 0x1f19140, 0xc001379620)
        /gql-server/graph/generated/generated.go:13995 +0x1e6
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph.NewConfig.func1(0x2473820, 0xc001379590, 0x0, 0x0, 0xc0003aeb80, 0x20, 0x1eeb400, 0x1, 0xc0003aeb80)
        /gql-server/graph/resolver.go:29 +0x115
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func2.2(0x2473820, 0xc001379590, 0xc0003aeb40, 0x20, 0x20, 0x1eeb400)
        /gql-server/graph/generated/generated.go:14001 +0x5d
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow.func2(0x2473820, 0xc001379590, 0x20, 0x1eeb400, 0xc003051d01, 0xc0003aeb40)
        /gql-server/graph/generated/generated.go:14004 +0xcf
github.com/99designs/gqlgen/graphql/executor.processExtensions.func3(0x2473820, 0xc001379590, 0xc0003aeb40, 0xc0013795c0, 0xc0013795f0, 0x0, 0x0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:62 +0x3a
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation_deleteChaosWorkflow(0xc003051c90, 0x2473820, 0xc001379560, 0xc003f85f00, 0x0, 0x0, 0x0, 0x0, 0x0)
        /gql-server/graph/generated/generated.go:13992 +0x2ba
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executionContext)._Mutation(0xc003051c90, 0x2473820, 0xc001379560, 0xc0030519f0, 0x1, 0x1, 0x203000, 0xc00107b618)
        /gql-server/graph/generated/generated.go:27077 +0x2596
github.com/litmuschaos/litmus/litmus-portal/graphql-server/graph/generated.(*executableSchema).Exec.func2(0x2473820, 0xc001379530, 0x30)
        /gql-server/graph/generated/generated.go:3839 +0x7b
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1(0x2473820, 0xc001379530, 0xc003051ca0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:105 +0x43
github.com/99designs/gqlgen/graphql/executor.processExtensions.func2(0x2473820, 0xc001379530, 0xc003051ca0, 0x240e420)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:59 +0x3a
github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1(0x2473820, 0xc0013794d0, 0xc001378cf0)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:104 +0x12c
github.com/99designs/gqlgen/graphql/handler/transport.POST.Do(0x246f620, 0xc00297c1c0, 0xc000a08400, 0x2462b10, 0xc0005a8000)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/transport/http_post.go:52 +0x35a
github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP(0xc0000a6120, 0x246f620, 0xc00297c1c0, 0xc000a08400)
        /go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/server.go:115 +0x21b
github.com/litmuschaos/litmus/litmus-portal/graphql-server/pkg/authorization.Middleware.func1(0x246f620, 0xc00297c1c0, 0xc000a08200)
        /gql-server/pkg/authorization/middleware.go:30 +0x1e7
net/http.HandlerFunc.ServeHTTP(0xc00000c600, 0x246f620, 0xc00297c1c0, 0xc000a08200)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/rs/cors.(*Cors).Handler.func1(0x246f620, 0xc00297c1c0, 0xc000a08200)
        /go/pkg/mod/github.com/rs/[email protected]/cors.go:231 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0003ae8c0, 0x246f620, 0xc00297c1c0, 0xc000a08200)
        /usr/local/go/src/net/http/server.go:2050 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0005aa000, 0x246f620, 0xc00297c1c0, 0xc000a08000)
        /go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0xd3
net/http.serverHandler.ServeHTTP(0xc0008020e0, 0x246f620, 0xc00297c1c0, 0xc000a08000)
        /usr/local/go/src/net/http/server.go:2868 +0xa3
net/http.(*conn).serve(0xc00306a780, 0x2473820, 0xc000388d40)
        /usr/local/go/src/net/http/server.go:1933 +0x8cd
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2994 +0x39b
time="2022-06-22T04:35:51Z" level=info msg="Running GitOps DB Sync..."
time="2022-06-22T04:37:51Z" level=info msg="Running GitOps DB Sync..."

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

No branches or pull requests

3 participants