Skip to content

fix(etg): Ignore static fields#7143

Merged
ztefanie merged 4 commits into
mainfrom
fix/etg-skip-static-fields
May 12, 2026
Merged

fix(etg): Ignore static fields#7143
ztefanie merged 4 commits into
mainfrom
fix/etg-skip-static-fields

Conversation

@ztefanie
Copy link
Copy Markdown
Collaborator

@ztefanie ztefanie commented May 6, 2026

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

  • Backport labels are added if these code changes should be backported. No backport label is added to the latest
    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.
    • or backport release-8.8.7: for changes that should be included in the specific release 8.8.7, and this
      release 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.
  • Tests/Integration tests for the changes have been added if applicable.
  • If the change requires a documentation update, it has been added to the appropriate section in the documentation.

Copilot AI review requested due to automatic review settings May 6, 2026 11:11
@ztefanie ztefanie requested a review from a team as a code owner May 6, 2026 11:11
@ztefanie ztefanie requested a review from chillleader May 6, 2026 11:11
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 6, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_VALUE property 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).

…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>
@ztefanie ztefanie force-pushed the fix/etg-skip-static-fields branch 2 times, most recently from da93bc0 to c481391 Compare May 7, 2026 10:20
@ztefanie ztefanie marked this pull request as draft May 7, 2026 11:15
@ztefanie ztefanie force-pushed the fix/etg-skip-static-fields branch 3 times, most recently from 9bd9cf4 to 1975b18 Compare May 7, 2026 11:19
@ztefanie ztefanie force-pushed the fix/etg-skip-static-fields branch from 1975b18 to 075c1a7 Compare May 7, 2026 11:22
@ztefanie ztefanie marked this pull request as ready for review May 7, 2026 12:31
@johnBgood
Copy link
Copy Markdown
Collaborator

@ztefanie should we backport this?

@ztefanie
Copy link
Copy Markdown
Collaborator Author

@ztefanie should we backport this?

I can backport it sure, but we only run etg on main right? So this should not be needed.

@johnBgood
Copy link
Copy Markdown
Collaborator

@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?

@ztefanie
Copy link
Copy Markdown
Collaborator Author

Yes true 👍

@ztefanie ztefanie added this pull request to the merge queue May 12, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2026
@ztefanie ztefanie added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 292dc76 May 12, 2026
64 checks passed
@ztefanie ztefanie deleted the fix/etg-skip-static-fields branch May 12, 2026 10:42
@team-connectors-int-automation
Copy link
Copy Markdown
Contributor

Backport failed for stable/8.7, because it was unable to cherry-pick the commit(s).

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

@team-connectors-int-automation
Copy link
Copy Markdown
Contributor

Backport failed for stable/8.8, because it was unable to cherry-pick the commit(s).

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

@team-connectors-int-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for stable/8.9:

ztefanie added a commit that referenced this pull request May 12, 2026
* 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)
ztefanie added a commit that referenced this pull request May 12, 2026
* 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)
ztefanie added a commit that referenced this pull request May 12, 2026
* 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)
ztefanie added a commit that referenced this pull request May 12, 2026
* 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)
ztefanie added a commit that referenced this pull request May 13, 2026
* 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)
shtishiv pushed a commit that referenced this pull request May 14, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants