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

[ci] Enable Slack notifications on daily job status #6746

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

ebeahan
Copy link
Member

@ebeahan ebeahan commented Jun 28, 2023

What does this PR do?

As a minor improvement into the visibility of failures in the daily integration job, attempt to enable Slack notifications.

From digging into the pipeline library, the current config is missing slackComment: true when notifying on the build status.

Related issues

Relates to #6071.

@ebeahan ebeahan added the enhancement New feature or request label Jun 28, 2023
@ebeahan ebeahan requested a review from a team as a code owner June 28, 2023 19:31
@elasticmachine
Copy link

elasticmachine commented Jun 28, 2023

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-07-05T13:27:44.447+0000

  • Duration: 133 min 56 sec

Test stats 🧪

Test Results
Failed 1
Passed 4535
Skipped 6
Total 4542

Test errors 1

Expand to view the tests failures

Check integrations / zeek / zeek: check / system test: splunk – zeek.dpd
    Expand to view the error details

     null 
    

    Expand to view the stacktrace

     one or more errors found in documents stored in logs-zeek.dpd-ep data stream: [0] found error.message in event: [Pipeline processor configured for non-existent pipeline [logs-zeek.dpd-2.10.0-third-party]] 
    

Steps errors 6

Expand to view the steps failures

Test integration: aws
  • Took 45 min 51 sec . View more details here
  • Description: eval "$(../../build/elastic-package stack shellinit)" ../../build/elastic-package test -v --report-format xUnit --report-output file --test-coverage
Boot up the Elastic stack
  • Took 1 min 56 sec . View more details here
  • Description: ../../build/elastic-package stack up -d -v --version 8.10.0-SNAPSHOT
Check integration: fortinet_fortigate
  • Took 0 min 22 sec . View more details here
  • Description: ../../build/elastic-package check -v
Take down the Elastic stack
  • Took 1 min 28 sec . View more details here
  • Description: build/elastic-package stack down -v
Test integration: zeek
  • Took 76 min 3 sec . View more details here
  • Description: eval "$(../../build/elastic-package stack shellinit)" ../../build/elastic-package test -v --report-format xUnit --report-output file --test-coverage
Google Storage Download
  • Took 0 min 0 sec . View more details here

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Jun 28, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (368/368) 💚
Files 97.348% (624/641) 👎 -2.652
Classes 97.348% (624/641) 👎 -2.652
Methods 93.202% (6238/6693) 👍 7.488
Lines 92.084% (138467/150370) 👎 -1.687
Conditionals 100.0% (0/0) 💚

@ebeahan
Copy link
Member Author

ebeahan commented Jul 5, 2023

/test

@@ -59,7 +59,7 @@ pipeline {
}
post {
cleanup {
notifyBuildResult(prComment: false, slackHeader: "Integration job failed ${env.JENKINS_URL}search/?q=${env.INTEGRATION_JOB.replaceAll('/','+')}")
notifyBuildResult(prComment: false, slackComment: true, slackHeader: "Integration job failed ${env.JENKINS_URL}search/?q=${env.INTEGRATION_JOB.replaceAll('/','+')}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should not be needed to add this parameter, since SLACK_CHANNEL environment variable is defined here, according to the notifyBuildResult function

https://github.com/elastic/apm-pipeline-library/blob/a1c0d088ebeaac0741592d77e2fc60157557f854/vars/notifyBuildResult.groovy#L66

Could it be that the slack channel is missing some App?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismiss the previous comment, re-checking the code, indeed, that parameter is needed.

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -59,7 +59,7 @@ pipeline {
}
post {
cleanup {
notifyBuildResult(prComment: false, slackHeader: "Integration job failed ${env.JENKINS_URL}search/?q=${env.INTEGRATION_JOB.replaceAll('/','+')}")
notifyBuildResult(prComment: false, slackComment: true, slackHeader: "Integration job failed ${env.JENKINS_URL}search/?q=${env.INTEGRATION_JOB.replaceAll('/','+')}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismiss the previous comment, re-checking the code, indeed, that parameter is needed.

@ebeahan ebeahan merged commit 3d99b97 into elastic:main Jul 6, 2023
@ebeahan ebeahan deleted the enable-slack-commenting-daily-job branch July 6, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants