Skip to main content

Home

Configuring Unravel in Azure DevOps

Configuring Unravel with Azure Devops 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. Perform the configuration steps with the newly created Unravel-Bot account.

Configuration Steps:

Note

You can directly place the azure-pipelines.yml file and the azuredevopsclient.py script in the Repos. However, even after placing these files directly, you'll still need to configure the required variables to enable Unravel insights within your Azure DevOps environment.

  1. Create a New Pipeline.

    1. Go to Pipelines and select New Pipeline.

    2. Choose Azure Repos Git and specify the relevant repository.

  2. Under Configure your Pipeline, click Starter Pipeline to select a starter pipeline.

  3. Open the azure-pipelines.yml file. Clear its content and replace it with the content provided by Unravel.

  4. Define Mandatory Variables.

    1. Click Variables and select New Variable.

    2. Create the following mandatory variables:

      • unravel_url: Enter your Unravel instance's URL

      • unravel_jwt_token: Obtain this token by logging in to Unravel. Click on your user icon and then click Copy Login Token. Paste this as the value for this variable.

      • Personal Access Token (pat): Generate a pat with full access. To do this, navigate to user settings, then personal access tokens. Provide details such as Name, Organization, Expiration (UTC), and select Full Access under Scopes. Click Create to generate the token.

    3. Configure Optional Variables (Slack and Jira).

      Important

      Only unravel_url, unravel_jwt_token, and pat are mandatory for successful configuration. The remaining variables are optional and should only be configured if you wish to enable notifications in those channels.

      • For Slack notifications, configure the following variable:

        • SLACK_WEBHOOK: If you want to receive Slack notifications, provide your Slack webhook URL.

      • For Jira integration, set up the following variables:

        • JIRA_PROJECT_KEY: Enter your Jira project key.

        • JIRA_EMAIL: Add the email ID of your Jira administrator.

        • JIRA_DOMAIN: Specify your Jira domain.

        • JIRA_API_TOKEN: Provide the API token of your Jira administrator.

    4. Save and Apply Variables.

  5. Enable Pipelines.

    Note

    Whenever you create a new pipeline, you must return to the Branch Policies and enable it to ensure Unravel integration.

    • Go to Repos --> Branches, and select your main branch.

    • Access More Options and select Branch Policies.

    • All the pipelines are listed under the Branch Policies. Enable the pipelines that you intend to use.

Unravel is successfully configured in Azure DevOps.

Azure-unravel.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 comprehensive 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-Bot's comment

As part of the code review, the Unravel-Bot post a comment on the pull request, sharing valuable insights. The Unravel Bot will retrieve 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.

AppSummary_Azure.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 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

The comments will present the factual data and provide Unravel's valuable insights associated with the cluster. The insights comment will highlight critical factors such as bottlenecks, application failures, and cost efficiency.

unravel-insights-azure.png

By incorporating these insights into the code review process, the Unravel Bot empowers you to make well-informed decisions. This holistic approach considers technical aspects, performance, cost, and efficiency considerations. This proactive integration of insights fosters a culture of data-driven development, helping you create optimized applications with enhanced performance and reduced costs.

See also