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

GitHub connector: naming conflict with common variable names #1379

Open
MaxTru opened this issue Nov 7, 2023 · 5 comments
Open

GitHub connector: naming conflict with common variable names #1379

MaxTru opened this issue Nov 7, 2023 · 5 comments
Labels
kind:bug Something isn't working

Comments

@MaxTru
Copy link
Contributor

MaxTru commented Nov 7, 2023

Describe the Bug

The GitHub Connector internally works with non-namespaced variables. Hence clashes can easily happen, which will create errors when trying to run the process.

Steps to Reproduce

  1. Have a process variable called issueNumber
  2. Use the GitHub Post Issue Comment Connector
  3. Now you will construct the input something like this:
          <zeebe:input source="=string(issueNumber)" target="issueNumber" />
          <zeebe:input source="=baseUrl + &#34;/repos/&#34; + owner + &#34;/&#34; + repo + &#34;/issues/&#34; + issueNumber + &#34;comments&#34;" target="url" />
  1. Now the URL cannot be constructed:
Bildschirmfoto 2023-11-07 um 11 00 11

=> I think if working with namespaced internal variables, the problem might be solved. E.g., use connectors_issueNumber

Expected Behavior

I can use whatever process variable name, and the Connectors still work

Environment

SaaS as of 07.11.

@MaxTru MaxTru added the kind:bug Something isn't working label Nov 7, 2023
@sbuettner
Copy link
Contributor

Yes, this is a known problem and has been experienced before in #1124

@sbuettner
Copy link
Contributor

Here is a related zeebe issue that could solve this issue: camunda/camunda#11163

@MaxTru
Copy link
Contributor Author

MaxTru commented Nov 7, 2023

Here is a related zeebe issue that could solve this issue: camunda/zeebe#11163

This would be super safe.

However, until we have camunda/camunda#11163, Connectors team could simply prefix their internal variables, isn't it? (e.g., use connectorsInternal_issueNumber instead of issueNumber). In theory this could still break, but the likelihood would be super low.

@sbuettner
Copy link
Contributor

Yes, it would reduce the probability but we would have to rewrite all connectors and request models and use underscores in our variables/json mappings.

@sbuettner
Copy link
Contributor

As discussed with the team in the grooming session, we would like to see proper local variable isolation support than introduce prefixes as this might either break existing element templates or wouldnt improvide the situation as the backwards compatibility would suffer from the same issues (input name like "body" could still be used in a different process variable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants