fix(etg): Ignore static fields#7143
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Element Template Generator’s reflection-based field discovery to ignore static fields, and regenerates the Microsoft Teams outbound connector templates to drop a previously (incorrectly) generated static-field property.
Changes:
- Filter static fields out of
ReflectionUtil.getAllFields(...)to prevent ETG from turning constants into template inputs. - Remove the generated
data.EXPAND_VALUEproperty from the current Microsoft Teams outbound template and its hybrid variant.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| connectors/microsoft/teams/element-templates/microsoft-teams-outbound-connector.json | Removes the previously generated data.EXPAND_VALUE template property from the current (non-hybrid) Teams template. |
| connectors/microsoft/teams/element-templates/hybrid/microsoft-teams-outbound-connector-hybrid.json | Removes the same property from the hybrid Teams template. |
| connector-commons/connector-utils/src/main/java/io/camunda/connector/util/reflection/ReflectionUtil.java | Updates field collection logic to exclude static fields (affects ETG property extraction). |
…clusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com>
…late properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com>
da93bc0 to
c481391
Compare
9bd9cf4 to
1975b18
Compare
1975b18 to
075c1a7
Compare
|
@ztefanie should we backport this? |
I can backport it sure, but we only run etg on main right? So this should not be needed. |
Can't our customers use it as well? |
|
Yes true 👍 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin stable/8.7
git worktree add -d .worktree/backport-7143-to-stable/8.7 origin/stable/8.7
cd .worktree/backport-7143-to-stable/8.7
git switch --create backport-7143-to-stable/8.7
git cherry-pick -x 292dc7650f25193c87caa43d98860b612b84c157 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin stable/8.8
git worktree add -d .worktree/backport-7143-to-stable/8.8 origin/stable/8.8
cd .worktree/backport-7143-to-stable/8.8
git switch --create backport-7143-to-stable/8.8
git cherry-pick -x 292dc7650f25193c87caa43d98860b612b84c157 |
|
Successfully created backport PR for |
* fix(etg): Ignore static fields * fix(etg): update JavaDoc for getAllFields to document static field exclusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * test(etg): add test to verify static fields are not generated as template properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * Update ReflectionUtil.java --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit 292dc76)
* fix(etg): Ignore static fields * fix(etg): update JavaDoc for getAllFields to document static field exclusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * test(etg): add test to verify static fields are not generated as template properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * Update ReflectionUtil.java --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit 292dc76)
* fix(etg): Ignore static fields * fix(etg): update JavaDoc for getAllFields to document static field exclusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * test(etg): add test to verify static fields are not generated as template properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * Update ReflectionUtil.java --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit 292dc76)
* fix(etg): Ignore static fields * fix(etg): update JavaDoc for getAllFields to document static field exclusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * test(etg): add test to verify static fields are not generated as template properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * Update ReflectionUtil.java --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit 292dc76)
* fix(etg): Ignore static fields * fix(etg): update JavaDoc for getAllFields to document static field exclusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * test(etg): add test to verify static fields are not generated as template properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * Update ReflectionUtil.java --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit 292dc76)
* fix(etg): Ignore static fields * fix(etg): update JavaDoc for getAllFields to document static field exclusion Agent-Logs-Url: https://github.com/camunda/connectors/sessions/e4889c61-820b-44f1-8e39-726a679906b6 Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * test(etg): add test to verify static fields are not generated as template properties Agent-Logs-Url: https://github.com/camunda/connectors/sessions/69104d6f-81e2-4acc-a69a-7987aa2dd56e Co-authored-by: ztefanie <18463686+ztefanie@users.noreply.github.com> * Update ReflectionUtil.java --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Description
Remove static fields from ETG. Only affected connector is microsoft team, which had this one property added, which was never displayed as the condition could not be true (wrong order).
Checklist
release, as this branch will be rebased onto main before the next release. Example backport labels:
backport stable/8.8: for changes that should be included in the next 8.8.x release.backport release-8.8.7: for changes that should be included in the specific release 8.8.7, and thisrelease has already been created. The release branch will be merged back into stable/8.8 later, so the change
will be included in future 8.8.x releases as well.