Skip to main content

We had an occurrence where deploying a CDF Function to Cognite failed to deploy subsequently to Azure.

 

Our CI/CD Pipeline is not quite set up for re-runnability, so it required changing the code for us to trigger a re-deployment.

 

Considering the function.status method in the cognite SDK, it seems to reason that deployments could be monitored by the Cognite Back End for Success, and then retried up to maybe 3 times if failed.  There were no logs provided to indicate why the deployment failed, in fact it looked like a bug in the error reporting as it had a newline character after what indicated a status message, but no status as to what happened.

Hi @Jesse Jenken!


Thank you for suggesting this product idea. We will follow the traction this idea gets in the community. You can expect updates on this post if we decide to include this in our future roadmap, or if we require more information.


Thanks, @Everton Colling.  In lieu of implementing the suggested feature, something must be done to prevent the quiet failure we occurred in the UI - if only a re-deploy button to be presented, at minimum.

 

Alternatiovely, when deploying Cognite Functions with the Cognite Toolkit, the toolkit should perhaps not report successful deployment until the cloud deployment occurs.  Everything up to the platform worked and it required re-pushing work that had succeeded, to redeploy, which technically is the wrong approach to resolving the issue we encountered.


Hi @Jesse Jenken, thanks for elaborating on the issue. 

  • We’ll look into the specific bug that you’ve encountered to better understand it.
  • Based on this, we’ll consider the need to make changes to Functions deployment to make it more robust.
  • We’ll also follow up on the CDF Toolkit side to see if it makes sense to improve reporting of deployment status (or if it’s sufficient to resolve it on the Functions side).

I’ll keep you posted and let you know if we need more information.


Hi @Jesse Jenken, to clarify: 

  1. Is it correct to assume that your CI/CD pipeline succeeded, but that the Function deployment eventually failed? 
  2. Was the Function status READY or FAILED in CDF after deployment? 
  3. How did you understand that the Function failed to deploy to Azure? You’re mentioning error reporting, which part of the pipeline does this refer to? 

Hi @Jørgen Lund ,

 

Point 1 is correct.  The deployment using the Cognite Toolkit succeeded and all passed.

It was upon waiting for the function to become ready in CDF that resulted in it showing a Failed state.

Querying the function logs using the SDK were somewhat unhelpful as they appeared to have a truncation bug where the error message was prevented from displaying do to a newline character, \n in the error itself.

 

I am making the assumption that it failed to deploy to the Azure Function purely in that we’re on the Azure Cloud, so I assume you’re deploying to Azure similarly.  Presumably something about deploying the microsoft lambda failed.  Without greater visibility into the CDF Platform logs I don’t have much more information than that, unfortunately.

 

Thanks for your keen interest on this issue!