Skip to content

[fork CI] feat(dora): per-project DORA isolation for shared Jira boards - #1

Open
kesamba wants to merge 6 commits into
mainfrom
feature/per-project-dora-isolation
Open

kesamba wants to merge 6 commits into
mainfrom
feature/per-project-dora-isolation

Conversation

@kesamba

@kesamba kesamba commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Fork-internal PR to run the upstream CI (incl. test-e2e on MySQL + Postgres) before opening the PR to apache/devlake.

@kesamba
kesamba force-pushed the feature/per-project-dora-isolation branch from 484236a to befc324 Compare October 13, 2026 08:13
kesamba and others added 6 commits October 13, 2026 11:24
Several DevLake projects can share one board and each collect their own
slice of it (e.g. via Jira ExtraJQL). Record which project a board/issue
link belongs to by adding project_name to board_issues. It is part of the
primary key so an issue that falls into two projects' slices can be
linked once per project.

Existing rows and plugins that do not set it get an empty project_name,
which keeps the previous single-project behaviour. The e2e snapshots that
verify board_issues gain the (empty) project_name column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add project_name to _tool_jira_board_issues (part of the primary key) and
ProjectName to JiraApiParams. The issue collector and extractor stamp the
DevLake project the pipeline runs for, so a board shared by several
projects keeps each project's ExtraJQL slice apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The issue convertor used to read every _tool_jira_board_issues row of the
board, so on a shared board one project's run converted (and stamped) the
other projects' issues too. Filter its input by project_name and stamp
the project on the domain board_issues row.

Boards without any per-project stamps (single-project or pre-feature
data) keep converting all of their issues. On a board that has stamps,
unstamped leftover rows are excluded rather than attributed to every
project.

Adds gorm.io/driver/sqlite (already in go.sum) for the in-memory tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The board filter collectors only compared the saved filter JQL to decide
whether a full resync is needed. Fold the rendered ExtraJQL into that key
so changing ExtraJQL also triggers a full resync, and issues that no
longer match are unlinked from the board instead of lingering in
board_issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConvertIssuesToIncidents and ConnectIncidentToDeployment selected
incidents by board-level project_mapping only, so every project sharing a
board got every incident on it. Also filter on board_issues.project_name,
falling back to the whole board when it has no per-project stamps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply the same board_issues.project_name filter to the incident queries
of the DORA dashboards (mysql: DORA, dora-by-team, dora-debug and the
change-failure-rate / failed-deployment-recovery-time /
time-to-restore-service details; postgresql: DORA, dora-by-team), with
the same whole-board fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant