Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Handle Endpoint Configuration the same way as in Camunda Modeler #190

Closed
pinussilvestrus opened this issue Mar 30, 2020 · 6 comments · Fixed by #197
Closed

Handle Endpoint Configuration the same way as in Camunda Modeler #190

pinussilvestrus opened this issue Mar 30, 2020 · 6 comments · Fixed by #197
Assignees
Milestone

Comments

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Mar 30, 2020

Is your feature request related to a problem? Please describe.

In every tab, we use the same stored endpoint configuration. Note in the following screencast how the same configuration is filled into the modal, no matter what file we have opened.

Kapture 2020-04-02 at 11 02 20

We store a single endpoint configuration currently:

 "DEPLOYMENT_CONFIG": {
    "audience": "",
    "camundaCloudClientId": "dump",
    "camundaCloudClientSecret": "dump",
    "camundaCloudClusterId": "dump",
    "connectionMethod": "camundaCloud",
    "deploymentName": "simple",
    "oauthClientId": "",
    "oauthClientSecret": "",
    "oauthURL": "",
    "rememberCredentials": true,
    "zeebeContactPointOauth": "",
    "zeebeContactpointSelfHosted": "0.0.0.0:26500"
 }

This does not match with the behavior we have in the Camunda Modeler, where we

  • Diagram specification (deployment name) is saved per file
  • Endpoint configuration is saved globally and referenced per file

Describe the solution you'd like

Align endpoint configuration persistence behavior with Camunda Modeler (details above).

Additional Context

Example Config how we have in the Camunda Modeler:

{
  // ...
  "camundaEngineEndpoints": [
    {
      "authType": "bearer",
      "id": "0u3yvpk",
      "rememberCredentials": true,
      "token": "test",
      "url": "http://localhost:8080/rest"
    }
  ],
  "files": {
    "~/BPMN files/diagram_1.bpmn": {
      "deployment-tool": {
        "deployment": {
          "name": "diagram_1"
        },
        "endpointId": "0u3yvpk"
      }
    }
  }
}
@pinussilvestrus
Copy link
Contributor Author

Okay, removing the local config.json resolved it 🤦🏻‍♂️ Anyway, I'll add a test case to verify it's working at all.

@pinussilvestrus
Copy link
Contributor Author

@oguzeroglu I was able to reproduce it again. Seems like we're not saving the configuration for each file. This is a part of the config.json

 "DEPLOYMENT_CONFIG": {
    "audience": "",
    "camundaCloudClientId": "DCLBoZVGwNiVmrZBb4ELTrMR1AJtvlBx",
    "camundaCloudClientSecret": "bQE9RDrmUvKKhoCHc7LMenE5WIjvbrE6IIwVdNEkpwywOk3HRKtXS7W65jVxxNWf",
    "camundaCloudClusterId": "d5fd3b34-f3b0-4faa-8e2f-ff57b9358a2b",
    "connectionMethod": "camundaCloud",
    "deploymentName": "complex",
    "oauthClientId": "",
    "oauthClientSecret": "",
    "oauthURL": "",
    "rememberCredentials": true,
    "zeebeContactPointOauth": "",
    "zeebeContactpointSelfHosted": "0.0.0.0:26500"
  }

And therefore this config is used for any tab. Is this intended? In Camunda Modeler we save deployment details for any file separately:

"files": {
    "/Users/niklas.kiefer/Documents/BPMN files/diagram_1.bpmn": {
      "deployment-tool": {
        "deployment": {
          "name": "diagram_1"
        },
        "endpointId": "0u3yvpk"
      },
}

But saving endpoints in a different place so we might be able to have configurable, multiple endpoints in the future.

@barmac
Copy link
Contributor

barmac commented Apr 2, 2020

I would expect the last saved endpoint to be a default for a new diagram, but the deployment name should always be set per file only. Also, if I use a different endpoint configurations for different files, the editor should not mix them up.

@nikku
Copy link
Contributor

nikku commented Apr 2, 2020

We should align this with the Camunda Modeler behavior.

@pinussilvestrus pinussilvestrus changed the title Deployment: Default name is not filled correctly Handle Endpoint Configuration the same way as in Camunda Modeler Apr 2, 2020
@nikku nikku added the ready label Apr 2, 2020
@pinussilvestrus pinussilvestrus removed their assignment Apr 2, 2020
@pinussilvestrus pinussilvestrus added this to the Z09 milestone Apr 2, 2020
@pinussilvestrus
Copy link
Contributor Author

I updated the description to match what we discussed.

@barmac
Copy link
Contributor

barmac commented Apr 6, 2020

Closed via #197

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants