@W-23111346@ fix: remove erroneous _vN suffix stripping from publish developerName - #310
Conversation
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Nico Pappagianis <n***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
| schemaVersion: '2.0', | ||
| globalConfiguration: { | ||
| developerName: 'test_agent_v1', | ||
| developerName: 'test_agent', |
There was a problem hiding this comment.
This test data is only used by agentPublisher.test.ts and encodes incorrect behavior.
agentPublisher.test.ts tests validated that the developer name's _v<N> was stripped which should not happen. Developer names should not be altered for bundle lookup.
This is likely a misunderstood implementation of versioning as described here, but it is an outright bug.
In other words, testing that we strip _v<N> from developer names is incorrect test behavior.
74fa396 to
560a3fa
Compare
560a3fa to
7bf7d92
Compare
Picks up forcedotcom/agents#310, which removes erroneous _vN suffix stripping from the publish developerName.
What does this PR do?
Removes an erroneous
.replace(/_v\d$/, '')call inScriptAgentPublisher.validateDeveloperName()that was silently stripping a trailing_vNversion suffix from the agent's developerName.The developer name now comes through verbatim from
globalConfiguration.developerName, so the publisher resolves the authoring bundle directory and*.bundle-meta.xmlfile using the agent's actual name. Previously, any agent whose developer name legitimately ended in_vN(e.g.my_agent_v1) had that suffix dropped, causing the bundle lookup to target the wrong name and fail with CannotFindBundle.What issues does this PR fix or reference?
Users with
_v<N>in their agent API name would not be able to have their agent bundles found for publish.