Skip to content

aspire deploy sometimes fails on GH Actions #14582

@antsok

Description

@antsok

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am using aspire deploy in GH Actions.

And often it produced an error:

Run aspire deploy --non-interactive
🛠  Executing step deploy
❌An error occurred while connecting to the app host. The app host possibly crashed before it was available: AppHost process has exited unexpectedly. Use --debug to see more details...

Expected Behavior

I expect not to see this error.

Steps To Reproduce

jobs:
  deploy:
    name: "Deploy to Azure Container Apps"
    runs-on: ubuntu-latest
    environment: dev
    permissions:
      contents: read
      # Required by bandit-action for uploading results to CodeQL
      security-events: write
      actions: read
      # Required for OIDC token exchange
      id-token: write

    steps:
      - name: Checkout code
        uses: actions/checkout@v5

      - name: Setup .NET SDK
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '10.0.x'

      - name: Install Aspire CLI
        run: curl -sSL https://aspire.dev/install.sh | bash

      - name: Log in to Azure
        uses: azure/login@v2
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

      - name: Deploy with Aspire
        env:
          Azure__SubscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
          Azure__Location: ${{ vars.AZURE_LOCATION }}
          Azure__ResourceGroup: ${{ vars.AZURE_RESOURCE_GROUP }}
          AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
          AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
          AZURE_OPENAI_MODEL: ${{ vars.AZURE_OPENAI_MODEL }}
        run: |
          aspire deploy --non-interactive

Exceptions (if any)

System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'. One or more system calls failed:
mkdir("/tmp/.dotnet/shm/session1827", AllUsers_ReadWriteExecute) == -1; errno == EEXIST;
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, NamedWaitHandleOptionsInternal options, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at NuGet.Common.Migrations.MigrationRunner.Run(String migrationsDirectory, IEnvironmentVariableReader environmentVariableReader)
at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel
aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration
dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements, Boolean skipFirstTimeUseCheck)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[[]] args, TimeSpan startupTime)
at Microsoft.DotNet.Cli.Program.Main(String[[]] args)

.NET Version info

dotnet-install: Installed version is 10.0.103

Anything else?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions