Hello,
We are experiencing a very recent issue with our Ant/Jenkins/Salesforce CI/CD pipeline.
Starting with Salesforce sandbox refreshes just shortly before 3/1/2024, we are unable to successfully poll for deployment validation results through Jenkins. Our Jenkins job correctly triggers a deployment validation in the destination Salesforce sandbox and a deployment id is returned to the Jenkins console output, however, subsequent polling for deployment validation progress and end results fail. Once the deployment id is returned, the Jenkins console output runs endlessly, even though the deployment in the sandbox continues as normal and eventually completes.
Prior to the refresh of the Salesforce sandbox at the end of a jenkins pipeline, our console output for a validation running to the Salesforce sandbox looked like this:
validateLocalTests:
[sf:deploy] [WSC][Launcher.main:113]Please update the client to a JDK version that includes a fix for JDK-8209178.
[sf:deploy] Request for a deploy submitted successfully.
[sf:deploy] Request ID for the current deploy task: 0Af8G00001JvJBtSAN
[sf:deploy] Waiting for server to finish processing the request…
[sf:deploy] Request Status: Pending
[sf:deploy] Request Status: InProgress (225/11268) – Processing Type: ApexPage
[sf:deploy] Request Status: InProgress (350/11268) – Processing Type: Queue
[sf:deploy] Request Status: InProgress (1380/11268) – Processing Type: CustomObject
[sf:deploy] Request Status: InProgress (1380/11268) – Processing Type: CustomObject
[sf:deploy] Request Status: InProgress (6563/11268) – Processing Case.controller Case
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: InProgress (7858/11268) – Processing Type: EmailTemplate
[sf:deploy] Request Status: InProgress (8201/11268) – Processing Type: CustomMetadata
[sf:deploy] Request Status: InProgress (10102/11268) – Processing Type: Flow
[sf:deploy] Request Status: InProgress (10406/11268) – Processing Type: ApexClass
[sf:deploy] Request Status: InProgress (10406/11268) – Processing Type: ApexClass
[sf:deploy] Request Status: InProgress (10406/11268) – Processing Type: ApexClass
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: InProgress (5/1232) – Running Test: AARCreateRelatedRequestsTest.testAutoCreateATOPFromBusRev
Now, after any refresh of a Salesforce sandbox at the end of a Jenkins pipeline, our Jenkins console output for a validation running to the Salesforce sandbox looks like this:
validateLocalTests:
[sf:deploy] [WSC][Launcher.main:113]Please update the client to a JDK version that includes a fix for JDK-8209178.
[sf:deploy] Request for a deploy submitted successfully.
[sf:deploy] Request ID for the current deploy task: 0Af7700000EfWXtCAN
[sf:deploy] Waiting for server to finish processing the request…
[sf:deploy] Request Status: Pending
[sf:deploy] Failed to check the status for request ID=0Af7700000EfWXtCAN. Error: Failed to send request to https://aruplab--dev.sandbox.my.salesforce.com/services/Soap/m/59.0/00D770000000NCK. Retrying…
This continues on and on in the console output.
Clicking on the link in the error log navigates us to an Error 405 page:
HTTP ERROR 405
Problem accessing /services/Soap/m/59.0/00D8D000001MJGt. Reason: Only POST allowed
This is consistent. Every sandbox that we refresh at the end of an Ant/Jenkins pipeline now polls like this. The sandboxes we do not refresh, continue to poll correctly. The Salesforce version Spring '24 between all the boxes. To try to resolve, we have:
- updated Jenkins to the most current version (initially we were on an older version, now we are on the newest version, however the issue still persists). Meaning the issue appears to be Jenkins version agnostic.
- toggled the sandbox at the end of a Jenkins pipeline from a refreshed one to a older, non-refreshed one (same Salesforce version however) and seen that the console output toggles between failed polling for the refreshed sandbox and successful polling for the non-refreshed sandbox, as expected. Meaning the issue appears to be within the refreshed sandbox context.
- ran an Ant validation command outside of the Jenkins context to a refreshed sandbox and that polls correctly. Meaning the issue appears to be within the Jenkins context.
- updated our Ant package to the newest version, 59.0. Meaning the issue appears to be Ant version agnostic.
- reached out to Salesforce to see if anything appears different in their deployment logs between a successful sandbox poll and a refreshed (unsuccessful) sandbox poll (nothing appears different on their end).
Things left to try:
- update Java version to the latest JDK (JDK 17)
- try with a new jenkins installation
In the meantime, has anyone seen/experienced this kind of issue and inconsistency after refreshing sandboxes before?