Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not showing the statuses of individual jobs in the Message #55

Open
TalhaNaeem101 opened this issue Jan 11, 2023 · 6 comments
Open

Not showing the statuses of individual jobs in the Message #55

TalhaNaeem101 opened this issue Jan 11, 2023 · 6 comments

Comments

@TalhaNaeem101
Copy link

Here is the job I wrote for slack notification for github action:

   if: always()
   name: Post Workflow Status To Slack
   needs: squash-merge
   runs-on: ubuntu-latest
   # actions.read permission is required.
   permissions:
     actions: 'read'
   steps:
     - name: Slack Workflow Notification
       uses: Gamesight/[email protected]
       with:
          # Required Input
         repo_token: ${{secrets.GITHUB_TOKEN}}
         slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
         include_jobs: 'true'
         # Optional Input
         channel: '#dps-cicd-flow'
         name: 'GitHub Action CI Bot'
         icon_emoji: ':squirrel:'
         icon_url: 'https://avatars0.githubusercontent.com/u/1701160?s=96&v=4'

And in the notification message it does not show (tick/cross) for succeeded and failed jobs. I am getting this notification in my slack channel:
image

Ideally, it should show statuses for each individual jobs.
Doc ref: https://github.com/marketplace/actions/slack-workflow-notifications
Ideally, it should show ticks on succeeded jobs and cross on failed jobs like mentioned in their docs:
image

Help is needed on P0, Please do help me achieve this using this workflow ASAP, Thanks

@rsyvarth
Copy link
Member

Hi @TalhaNaeem101 - can you provide a screenshot of the workflow summary page from the github UI for this? From the look of the image you provided it seems that your job ran the changes job and the rest were cancelled (or possibly there was some issue fetching the status of those jobs).

@TalhaNaeem101
Copy link
Author

This is the summary of GitHub action :
image

Basically, the job of the change detects the changes in directories and then builds the images for the services having the changes. And the case is that even if the job for a service (e.g. superset-service) ran but it was not shown on the slack message in the notification. And one thing that is different in my case is that we are using reusable workflow for all jobs other than changes jobs. @rsyvarth Please let me know if any other info/detail is required to understand my use-case.

@TalhaNaeem101
Copy link
Author

@rsyvarth A quick update, it seems like this workflow is not behaving ideal in my use case as I am using reusable workflows within my CI. As I tried creating a dummy job in my main-workflow yaml and it worked like charm; it showed the tick/cross in respective cases.
image
So now such a solution is required which updates the statues of jobs which are using reusable workflows.

@rsyvarth
Copy link
Member

rsyvarth commented Jan 11, 2023

So seems like the request here is to hide skipped jobs - would that solve the issue you are seeing? You are expecting to only see jobs that ran, not those that are skipped in the status report?

@TalhaNaeem101
Copy link
Author

yes ideally it should not show the skipped jobs, plus it should also show the jobs which were failed as cross with their names and the succeeded jobs as tick with their names.
PS: In my main workflow, every job is dependent on changes job. defined like this:

    name: source-salesforce
    needs: changes
    if: ${{ needs.changes.outputs.source-salesforce == 'true' }}
    uses: ./.github/workflows/reusable.yaml
    secrets: inherit
    with: 
      name: source-salesforce
      image_name: source-salesforce
      helm: false
      repo_type: ecr

Mainly wanted to highlight the usage of needs dependency among my jobs, I tried a dummy job without dependency of changes job and it worked fine, and showed the status correctly. Please help me implement some solution for this, as I want to use this workflow in my use case. Would be highly thankful.

@TalhaNaeem101
Copy link
Author

@rsyvarth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants