You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
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:
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?
The text was updated successfully, but these errors were encountered:
Fabilin
added a commit
to Fabilin/tock
that referenced
this issue
Jan 22, 2025
The issue
The
applicationId
field of theBotBus
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 theapplicationId
field to the "Connector identifier" field in TOCK Studio.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:
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:
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 theBus
interface toconnectorId
.Drawbacks
This would be a major change impacting many bots, which means it would have to go through an adequate deprecation cycle.
Remaining questions
applicationId
field?The text was updated successfully, but these errors were encountered: