Skip to content

Github Deployment Marked as Successful, But Kudu Logs Show Failure #106

@stevematney

Description

@stevematney

I'm not sure if this is quite the correct place to log this issue, but it seems that the code referenced here is receiving a response from Kudu that is incorrect.

try {
let response = await this._client.beginRequest(httpRequest, null, 'application/octet-stream');
core.debug(`One Deploy response: ${JSON.stringify(response)}`);
if (response.statusCode == 200) {
core.debug('Deployment passed');
return null;
}
else if (response.statusCode == 202) {
let pollableURL: string = response.headers.location;
if (!!pollableURL) {
core.debug(`Polling for One Deploy URL: ${pollableURL}`);
return await this._getDeploymentDetailsFromPollURL(pollableURL);
}
else {
core.debug('One Deploy returned 202 without pollable URL.');
return null;
}
}
else {
throw response;
}
}
catch (error) {
throw Error("Failed to deploy web package using OneDeploy to App Service.\n" + this._getFormattedError(error));
}

The issue we're seeing was reported in March under Azure/webapps-deploy#404, and our results are very, very similar to that.

  1. We run a deploy.
  2. The kudusync command fails where the deployment logs say "Running deployment command..."
  3. The deployment is reported as "Successful"

It's somewhat irrelevant to this issue, since I'm not reporting about the fact that the deployment is failing, but about the fact that the process sees a failed deployment as successful, but here is the output log from that failed kudusync.

Running deployment command...
Command: "C:\home\site\deployments\tools\deploy.cmd"
Handling Basic Web Site deployment.
Creating app_offline.htm
Error: Failed to change file that is currently being used "C:\home\site\wwwroot\logs\log20240927_027.txt"
KuduSync.NET from: 'C:\local\Temp\zipdeploy\extracted' to: 'C:\home\site\wwwroot'
Deleting file: 'logs\log20240927_023.txt'
Deleting file: 'logs\log20240927_024.txt'
Deleting file: 'logs\log20240927_025.txt'
Deleting file: 'logs\log20240927_026.txt'
Deleting file: 'logs\log20240927_027.txt'
Failed exitCode=1, command="kudusync" -v 50 -x -f "C:\local\Temp\zipdeploy\extracted" -t "C:\home\site\wwwroot" -n "C:\local\Temp\tmp1DCE.tmp" -p "C:\local\Temp\tmp1DCE.tmp" -i ".git;.hg;.deployment;deploy.cmd"
An error has occurred during web site deployment.
Error: Failed to change file that is currently being used "C:\home\site\wwwroot\logs\log20240927_027.txt"\r\nC:\Program Files (x86)\SiteExtensions\Kudu\103.100905.001\bin\Scripts\starter.cmd "C:\home\site\deployments\tools\deploy.cmd"

As indicated by exitCode=1, it's not the command itself that is doing the wrong thing. It seems to be whatever Azure service is actually running and processing the deployment that is failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions