Spike Research: Explore possible POC for VSA Jira-based stages
Overview
groupoptimize vision is to make GitLab the tool of choice for data-driven DevOps organizations. To achieve this one of our goals is to make Value Stream Analytics (VSA) the single source of truth (SSOT) for DevOps Analytics and to allow users to aggregate multiple data records into one VSA.
Problem to solve
Customers that are using Jira for issue management and GitLab for CI\CD need single source of insight about what's happening within the entire software delivery lifecycle.
Assumption
- GitLab SaaS first with Atlassian cloud.
- PostgreSQL is a blocker for this integration, and a new datastore is needed - Draft: Spike Research: ClickHouse as the Datast... (#367178 - closed)
- Authentication and authorization will be done with API token.
- No support for "mixed" stages - start and stop events on API-based stages can be from the API.
- No bidirectional integration - data flow is Jira--> GL only. VSA will only visualize the Jira data.
- Data refresh will be in
near real-time- updates every 15m. - VSA-Jira integration needs to be compatible with other GitLab-Jira integrations.
- Group-level only.
- About VSA DORA - we will start with only "Deployment Frequency" and "Lead Time for Changes".
- "Tasks by Type" chart is out of scope.
Reference use cases
-
Basic flow for custom VSA stages base on Jira events. :
- Task\issue create in JIRA
- Branch created in GL
- Merge request is merged in GL
- Task\issue closed in JIRA
-
Common flow - TBD
-
Advanced flow - TBD
Research Goals
- Outline a possible POC architecture, major steps, and effort estimation for POC the basic flow.
- Summarize the main gaps in delivering this integration for customers.
Investigation and clarification questions:
- Is it possible to use some of the existing Jira integration technical design?
- Can we mapped the events using the Import Jira tool?
- In the Jira-based stages can we have a link to view Jira issues for deep-dive stage performance investigation?
- Any other tools from Ecosystem:Integrations](https://about.gitlab.com/direction/ecosystem/integrations/) group that can be relevant to solving this problem?
- Can we add filtering to the API?
group,project,label,milestone? - What enhancements need to be done for the VSA stage event schema?
- For Jira-based stages can we display in the Work items table the Jira
issue name,create time,last eventandduration? - Is it possible to calculate all the metrics in the VSA Overview dashboard? -
Lead Time,Cycle Time,New IssuesandDeploys?
Investigation summary
Proposed draft workflow:
Before we start: client must have Maintainer+ access level API token.
- Client creates custom "external" stage with unique start & end event identifiers (e.g. "issue_created" and "issue_closed")
- When stage end event happens customer sends following mutation request to GitLab GraphQL:
addExternalValueStreamAnalyticsEvent(input: inputParams)
with following inputParams
| param | Type | Required? | Description |
|---|---|---|---|
| groupPath | ID | full path of group where you want to see this VSA event | |
| externalId | String | string containing global unique ID of Jira issue | |
| startEventId | String | String from stage configuration. (e.g. "issue_created") | |
| endEventId | String | String from stage configuration. (e.g. "issue_closed") | |
| startEventTimestamp | Timestamp | Timestamp with timezone when start event happened | |
| endEventTimestamp | Timestamp | Timestamp with timezone when end event happened | |
| labels | Array of strings | Issue labels for filtering. Missing labels will be created at GitLab if not found | |
| authorUsername | String | Issue author username. Group member with such username must exist at GitLab | |
| assigneeUsernames | Array of Strings | Issue assignees usernames. Group members with such username must exist at GitLab | |
| milestone | String | ID of associated milestone. Milestone must exist at GitLab | |
| externalUrl | String | ? | String containing URL to Jira issue |
If response is successful then everything is OK and VSA will be refreshed soon to reflect new data.
- More details can be found here
Assumptions, Impact and gaps can be found
- Customers write their custom stage events to GitLab and filter & retrieve it later on. It's on customers shoulders to decide WHEN exactly particular event happened outside of GitLab and safely deliver it to GitLab via API with all required data.
- Users syncing between Jira and GitLab is mandatory requirement for this integration.
- Tasks by Type chart - This chart won't work. The chart requires real native issues to be created and doesn't rely on
_eventstable at all.
-
Approach choice for PoC heavily depends on what clients can do and should be driven by client needs. I'd personally vote for "Alternative workflow" because it's more flexible and easier to use for clients but we should be aware that's its more technically challenging both time wise and performance wise.