GithubHelp home page GithubHelp logo

Comments (4)

bamarch avatar bamarch commented on June 12, 2024

The yaml from the workflow, for extra context

name: PR

on:
  pull_request:
    branches: [ main ]
    types:
      - opened
      - reopened
      - synchronize

env:
  ALPINE_DOTNET_PACKAGE: dotnet6-sdk
  ALPINE_VERSION: v3.16
  DOTNET_SDK_VERSION: 6.0.101
  SRC_DIR: ./src


jobs:

  dotnet-test:
    name: "Dotnet Test"
    concurrency:
      group: ${{ github.workflow }}_dotnet-test # global lock, not scoped to a specific commit
      cancel-in-progress: false
    runs-on: ubuntu-latest
    timeout-minutes: 30
    if: ${{ github.actor != 'dependabot[bot]' }}
    defaults:
      run:
        working-directory: ${{ env.SRC_DIR }}
    steps:
      - uses: actions/checkout@v3

      - name: "Checkout Infrastructure repo"
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
          repository: BondOrigination/infrastructure
          path: infra-repo
          ssh-key: ${{ secrets.DEPLOY_KEY_INFRASTRUCTURE_READ_ONLY }}

      - uses: jirutka/setup-alpine@v1
        with:
          branch: ${{ env.ALPINE_VERSION }}
          packages: >
            ${{ env.ALPINE_DOTNET_PACKAGE }}
            icu-libs
            tzdata

      - name: Build solution in release mode
        run: dotnet build -c Release
        shell: alpine.sh {0}

      - uses: ./infra-repo/.github/actions/vpn-connect
        timeout-minutes: 3
        with:
          open-vpn-config-file-secret: ${{ secrets.VPN_CONFIG_FILE }}
      
      - name: Run Tests
        run: dotnet test --no-build -c Release --logger trx --results-directory "${{github.workspace}}/results" --blame-hang-timeout 2m
        shell: alpine.sh {0}

      - uses: ./infra-repo/.github/actions/vpn-disconnect
        if: always()
      
      - name: Test Report
        uses: dorny/test-reporter@v1
        if: (success() || failure()) && (github.actor != 'dependabot[bot]') # the job requires write access to upload test results artifact
        with:
          name: Tests
          path: "**/*.trx"
          reporter: dotnet-trx

      - name: Upload Test Artifacts
        uses: actions/upload-artifact@v3
        if: failure() # ensures upload even if steps failed
        with:
          name: "System Logs"
          path: ${{ github.workspace }}/**/*.log

      - name: Upload Test Dump Artifacts
        uses: actions/upload-artifact@v3
        if: failure() # ensures upload even if steps failed
        with:
          name: "Test Dumps"
          path: ${{ github.workspace }}/**/*.dmp

and more context for the failure

image

from setup-alpine.

bamarch avatar bamarch commented on June 12, 2024

After some lsof and ps debugging I found that there was a backgrounded dotnet process running that unmount was complaining about.

Inserting a pkill right at the end of the job has prevented the job failures.

      - name: Upload Test Dump Artifacts
        uses: actions/upload-artifact@v3
        if: failure() # ensures upload even if steps failed
        with:
          name: "Test Dumps"
          path: ${{ github.workspace }}/**/*.dmp

      - name: Killed backgrounded dotnet processes # prevent failures from setup-alpine Post Run
        run: pkill -f /usr/lib/dotnet/dotnet
        shell: alpine.sh {0}

What would be the consequences if the action was quiet about errors like this... or didn't do a destroy at the end of the job?

This would be similar to other GHA setup-foo actions, like setup-node. Or could have a flag, destroy=false/true?

Anyway the action is working well for us with this workaround.

Cheers again!

from setup-alpine.

rtrubshaw avatar rtrubshaw commented on June 12, 2024

This has been a thorn in our side for a while.

Thanks @bamarch for the heads up about background processes.

Meanwhile, would issuing the umount with the -l option (lazy unmount) be possible?

Or just ignore the errors? At this point does it really matter?

from setup-alpine.

jirutka avatar jirutka commented on June 12, 2024

Thanks for troubleshooting and sorry it took so long to fix it.

from setup-alpine.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.