ms-teams-deploy-card icon indicating copy to clipboard operation
ms-teams-deploy-card copied to clipboard

Only seeing "in progress" when running within a matrix

Open dakota-maker-by opened this issue 4 years ago • 13 comments

Hi there,

I am trying to run this action within a workflow that relies on matracies:

  deploy:
    runs-on: ubuntu-latest
    needs: build-deployment-envs
    strategy:
      matrix: ${{ fromJson(needs.build-deployment-envs.outputs.matrix) }}
    
   ...

      - name: Check for failure and set card layout
        if: failure()
        run: echo "CARD_LAYOUT=complete" >> $GITHUB_ENV

      - name: Publish Deployment Card
        uses: toko-bifrost/[email protected]
        if: always()
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          webhook-uri: ${{ webhook URL secret name }}
          environment: ${{ matrix.env }}
          show-on-start: false
          show-on-exit: true
          card-layout-exit: ${{ env.CARD_LAYOUT }}
          view-status-action-text: "View status (${{ matrix.mfeName }})"

but regardless of how the run is going, we are only seeing "In Progress". I made sure to not have job names in place, so I know the known issue #5 is not impacting this, but the next culprit seems to be running within a matrix. Not sure if there was any insight on this but I wanted to report it for visibility if nothing else.

dakota-maker-by avatar Dec 02 '20 20:12 dakota-maker-by

Hey i have the same issue

mombe090 avatar Dec 02 '20 23:12 mombe090

Hey guys, I will look into this.

aldwyn-acn avatar Dec 03 '20 04:12 aldwyn-acn

Have the same issue.

dnepusb2 avatar Dec 09 '20 18:12 dnepusb2

Same here. The completion status is always IN-PROGRESS

mshirman avatar Dec 22 '20 01:12 mshirman

Same here. Any update on this since December?

dmbarry86 avatar Mar 02 '21 10:03 dmbarry86

I am using a work around for this issue, might be useful for someone else.

  notification-job:
    runs-on: ubuntu-latest
    needs: [job-with-matrix]
    if:  "always() && !contains(github.event.head_commit.message, '[skip ci]')"

    steps:
      - name: Checkout branch code
        uses: actions/checkout@v2

      - uses: toko-bifrost/ms-teams-deploy-card@master
        if: always()
        with:
          card-layout-exit: complete
          show-on-start: false

      - name: Build matrix failed
        if: ${{ needs.job-with-matrix.result != 'success' }}
        run: exit 1

      - name: Build matrix succeeded
        if: ${{ needs.job-with-matrix.result == 'success' }}
        run: echo "Targets built and deployed"

The notification won't have the actual error, but it will at least have the right status for the whole workflow.

marcosmesser avatar Mar 02 '21 13:03 marcosmesser

Same here. Any update on the status here? Thanks.

dkbhadeshiya avatar Apr 12 '21 12:04 dkbhadeshiya

In my findings, the same behaviour happens even when we are not running it in matrix.

dkbhadeshiya avatar Apr 14 '21 09:04 dkbhadeshiya

Recently I opened a PR to solve this issue. Take a look

patrickpaulin avatar Apr 26 '21 01:04 patrickpaulin

I was seeing this issue as well and just confirmed your PR did solve it @patrickpaulin, would be nice to get it merged if/when possible. Good job with the fix :+1:

michal-sa avatar Jul 07 '21 08:07 michal-sa

Tks, @michal-sa!

it looks like this repo was "abandoned". Feel free to use my fork, for while:

patrickpaulin/ms-teams-deploy-card@master

patrickpaulin avatar Jul 28 '21 16:07 patrickpaulin

Ditto on this issue with the notification always being "in-progress", even when not using -name for the teams step. Thanks for the fork @patrickpaulin

floptical avatar Oct 20 '21 19:10 floptical

@patrickpaulin Thank you so much!

hubert17 avatar Feb 10 '22 21:02 hubert17