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:
Create GitHub Workflow Directory.
Create a directory named .github in your repository.
Inside the .github directory, create a new directory named Workflows.
Place the
github_pipeline.yml
file and theunravel_github_client.py
script in theWorkflows
directory. Both these files are provided to you by Unravel.Configure Secrets and Variables.
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.
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
Obtain this token by logging in to Unravel. Click on your user icon and then click Copy Login Token.
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>'
Copy the entire token and paste it in the Value field.
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.
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.
Add the following Optional Secrets for GIT Notification GitHub variables if required:
Item
Description
GIT_TOKEN
Enter the GIT token here.
Click Save Changes to save the secrets and variables that you have added. Unravel is now successfully configured in GitHub.
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
Raise a pull request.
Paste the link of your Databricks job run in the PR description.
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.
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.
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.