Skip to main content

Home

Configuring Unravel in Github

Configuring Unravel with GitHub enhances collaboration and insights within your development process. This integration promotes efficient code reviews, insights-driven decisions, and optimized application deployment.

Prerequisites

Create a new account named Unravel-bot with an administrator role in Github.

To configure Unravel in Github, follow these steps:

  1. Create GitHub Workflow Directory.

    1. Create a directory named .github in your repository.

    2. Inside the .github directory, create a new directory named Workflows.

  2. Place the github_pipeline.yml file and the unravel_github_client.py script in the Workflows directory. Both these files are provided to you by Unravel.

  3. Configure Secrets and Variables.

    1. Go to your repository's settings, navigate to the Secrets and variables section, and click Actions to manage your repository's secrets.

      Note

      Only the UNRAVEL_JWT_TOKEN and UNRAVEL_URL secrets are mandatory for Unravel integration. The other secrets are necessary to configure additional features such as Slack or Jira updates.

    2. Provide the following Mandatory Secrets GitHub variables:

      Important

      Select Keep this Value a Secret while adding the secrets.

      Item

      Description

      UNRAVEL_URL

      Provide the URL of your Unravel instance.

      UNRAVEL_JWT_TOKEN

      1. Obtain this token by logging in to Unravel. Click on your user icon and then click Copy Login Token.

      2. Paste the token in a text editor and add JWT (all upper case followed by a space) in the beginning of the token. Enclose the token after adding JWT in single quotes as shown here:

        'JWT <Your Token>'
      3. Copy the entire token and paste it in the Value field.

    3. Add the following Optional Secrets for Slack Integration GitHub variables if required:

      Item

      Description

      SLACK_WEBHOOK

      Place the Slack webhook URL here to send notifications to a Slack channel.

    4. Add the following Optional Secrets for Jira Integration GitHub variables if required:

      Item

      Description

      JIRA_PROJECT_KEY

      Enter the Jira project key here.

      JIRA_EMAIL

      Enter the email ID of the Jira administrator.

      JIRA_DOMAIN

      Specify your Jira domain.

      JIRA_API_TOKEN

      Provide the API token of the Jira administrator.

    5. Add the following Optional Secrets for GIT Notification GitHub variables if required:

      Item

      Description

      GIT_TOKEN

      Enter the GIT token here.

  4. Click Save Changes to save the secrets and variables that you have added. Unravel is now successfully configured in GitHub.

    github-cicd.png
Viewing insights in pull requests with Unravel-Bot

When a pull request is raised, the Unravel-Bot account (mentioned as Unravel-Bot) provides insightful comments during the code review process. These comments are aimed at helping you make informed decisions based on real-time data. Here's how you can view the insights provided by the Unravel Bot:

Pull request

  1. Raise a pull request.

  2. Paste the link of your Databricks job run in the PR description.

  3. Unravel-Bot analyzes the changes made in the code and provides recommendations.

Unravel-Bot's comment

As part of the code review, Unravel-Bot posts a comment on the pull request, sharing valuable insights. The Unravel Bot retrieves crucial details from the cluster. This includes Workspace, Run ID, and Job ID. Utilizing the collected information, the Unravel Bot compiles extensive data related to the application.

Unravel-insight.png

The insights the Unravel Bot shares include App ID within Databricks, cluster ID, estimated cost, executor node type, driver node details, applied tags, and auto-scale settings.

Click the required app ID or cluster ID to view more information about the app or cluster. You can also view the Unravel insights and take necessary actions based on the recommendations.

Unravel's Insights

Unravel insights are displayed as comments associated with the cluster. The insights comments highlight critical factors such as bottlenecks, application failures, and cost efficiency.

unravel-insights-1.png

By incorporating these insights into the code review process, the Unravel Bot enables you to make decisions based on real-time data. This helps you to improve performance and reduce costs.

See also