Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Implementation Details

Workflow

...

Deployment Framework : Serverless

  1. Github webhook pushes incoming comments to Lambda 1
  2. Lambda 1 pushes the request to SQS
  3. SQS then forwards the request to a Lambda 2
  4. Request payload contains info about PR author, comment author
  5. Lambda 2 retrieves token for accessing GitHub API using Secret manager
  6. Call GitHub API to retrieve list of mxnet-committers from teams [using committer’s credentials]
  7. Parse jobs from the input comment
  8. Verify if comment author is authorized [PR author/commiter]
    1. If verified : Trigger CI
      1. If this is the first time triggering the job, the branch needs to be scanned
        1. Using trigger job token (from Secrets manager), scan specific job for the new branch with Multi-branch Scan WebHook Trigger plugin.
      2. Else, trigger the build using Jenkins API
    2. Else comment unauthorized access

...

  1. How to fix issues related to the bot?
    1. First view the logs [Isengard → mxnet-ci-dev / mxnet-ci Prod/Dev account → Cloudwatch Logs]
    2. Check if Lambda functions are getting triggered
      1. /send_to_sqs
      2. /jenkins
    3. Check if comment author is being verified
    4. Check if Jenkins Job is being triggered [Verify on Jenkins URL if needed]
    5. Check if the messages are being posted via Github API
  2. Send To SQS lambda isn’t triggered
    1. Check if GitHub WebHook is working correctly
      1. for Prod account, need Apache Infra team access
      2. for dev account, tested on my personal fork
        1. https://github.com/ChaiBapchya/incubator-mxnet/settings/hooks/187804995
    2. Check on CW Logs for any errors
      1. Dev account : CW → Log Groups → /aws/lambda/mxnet-ci-bot-test-send
  3. Jenkins Lambda isn’t triggered
  4. Problem within Jenkins Lambda function
    1. Check on CW Logs for any errors
      1. Dev account : CW → Log Groups → /aws/lambda/mxnet-ci-bot-test-jenkins