Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bot Engine] BotBus.applicationId is confusingly named #1829

Open
Fabilin opened this issue Jan 21, 2025 · 0 comments · May be fixed by #1830
Open

[Bot Engine] BotBus.applicationId is confusingly named #1829

Fabilin opened this issue Jan 21, 2025 · 0 comments · May be fixed by #1830

Comments

@Fabilin
Copy link
Member

Fabilin commented Jan 21, 2025

The issue

The applicationId field of the BotBus interface contains a string used to uniquely identify the connector instance on which a request is being processed. The first issue here is that the word "connector" is nowhere in the name, making it difficult to relate the applicationId field to the "Connector identifier" field in TOCK Studio.

Image

The second issue, and in my experience the largest "footgun" here, is that when working with bots we already have several contenders for "application IDs", none of which matching the BotBus'. For example, TOCK Studio has its own "Applications" menu, which lets you specify a unique name for a bot application:
Image

But there is also the "application" concept for Meta apps, which have a clearly defined "app ID" which developers have to use in order to set up a Messenger/Whatsapp/Instagram connector:

Image

In my experience, this leads to developers believing the applicationId to be the latter, opening the way for subtle bugs to appear. Even us TOCK contributors tend to make that mistake, slowing down development and hindering communication.

Attempted mitigations

#1677 adds KDoc for the offending field. This however appears insufficient, as KDoc is not immediately visible when reading and writing code, meaning it's likely to be read only when a developer is aware of an issue.

Proposed solution

I believe we should rename the applicationId field of the Bus interface to connectorId.

Drawbacks

This would be a major change impacting many bots, which means it would have to go through an adequate deprecation cycle.

Remaining questions

  • What schedule should we follow for the deprecation?
  • Should we eventually remove the old applicationId field?
Fabilin added a commit to Fabilin/tock that referenced this issue Jan 22, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant