Azure / aci-deploy

Enable GitHub developers to deploy to Azure Container Instances using GitHub Actions
MIT License
63 stars 60 forks source link

Error: Encountered an internal server error. The tracking activity id is '...', correlation id is '...' #85

Open PeerChristensen opened 10 months ago

PeerChristensen commented 10 months ago

I'm trying to deploy an ACI with the aci-deploy action, which has always worked until recently. Now I suddenly get this error:

Error: Encountered an internal server error. The tracking activity id is '..., correlation id is '...'

I've tried omitting optional parameters, but nothing seems to work. I've requested support from Microsoft, but wasn't able to resolve the issue.

I'd be grateful if you could help me get it to work again.

Here's my workflow file:

name: Deploy ACI

on: 
  workflow_call:
    inputs:
      environment:
        required: true
        type: string
      resource_group:
        required: true
        type: string
      acr_name:
        required: true
        type: string
      short_name:
        required: true
        type: string
      aci_name:
        required: true
        type: string
      cpu:
        required: true
        type: string
      memory:
        required: true
        type: string

    secrets:
      azure_credentials:
        required: true

jobs:
  deploy-aci:
    name: Deploy ACI
    runs-on: ubuntu-latest
    environment: ${{ inputs.environment }}
    steps:
      - uses: actions/checkout@v2
      - uses: azure/login@v1
        with:
          creds: ${{ secrets.azure_credentials }}
      - run: |
          export username=$(az acr credential show --name ${{ inputs.acr_name }} --resource-group ${{ inputs.resource_group }} --query 'username' --output tsv)
          echo "acr_username=$username" >> $GITHUB_OUTPUT
        name: 'Get ACR username'
        id: acr_username_step  
      - run: |                   
          password=$(az acr credential show --name ${{ inputs.acr_name }} --resource-group ${{ inputs.resource_group }} --query 'passwords[0].value' --output tsv)
          echo "acr_password=$password" >> $GITHUB_OUTPUT
        name: 'Get ACR Password'
        id: acr_password_step
      - name: 'Deploy to Azure Container Instances'
        uses: 'azure/aci-deploy@v1'
        with:
          resource-group: ${{ inputs.resource_group }}
          dns-name-label: ${{ inputs.resource_group }}${{ github.run_number }}
          image: ${{ inputs.acr_name }}.azurecr.io/${{ inputs.short_name }}-${{ inputs.environment }}-image:${{ github.run_number }}
          registry-login-server: '${{ inputs.acr_name }}.azurecr.io'
          registry-username: ${{ steps.acr_username_step.outputs.acr_username }}
          registry-password: ${{ steps.acr_password_step.outputs.acr_password }}
          name: ${{ inputs.aci_name }}
          location: 'west europe'
          cpu: ${{ inputs.cpu }}
          memory: ${{ inputs.memory }}
          restart-policy: 'Never'

    outputs:
      acr_username: ${{ steps.acr_username_step.outputs.acr_username }}
      acr_password: ${{ steps.acr_password_step.outputs.acr_password }}
Schalk1e commented 10 months ago

Experiencing the same. Tried to remove previously cached image in ACR, but no luck.

PeerChristensen commented 10 months ago

I was in contact with an Azure support engineer, who told me it was some sort of security issue that has now been resolved in my case. However, in the meantime, I was able to deploy the ACI to a different resource group.

Schalk1e commented 10 months ago

Noted with thanks. I managed to manually create an ACI in the portal in the existing RG, but the CI still fails. Will create a new RG if the error continues.