Skip to content

fix(dora): change lead time calculator #8206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 222 commits into
base: main
Choose a base branch
from

Conversation

kostas-petrakis
Copy link
Contributor

@kostas-petrakis kostas-petrakis commented Nov 20, 2024

Summary

Fixes the issue where the project_pr_metrics link to wrong deployment when prev_success_deployment_commit_id is empty.

Does this close any open issues?

Closes #8188

Screenshots

I builded a local image, and re-run the data collection through my existing project, the results are now correct (compare with data from issue):

{
"project_pr_metrics": [
	{
		"id" : "github:GithubPullRequest:4:1806504909",
		"created_at" : "2024-11-20 17:06:50.350",
		"updated_at" : "2024-11-20 17:06:50.350",
		"_raw_data_params" : "",
		"_raw_data_table" : "",
		"_raw_data_id" : 0,
		"_raw_data_remark" : "",
		"project_name" : "*************",
		"first_commit_sha" : "3726ef9fce54e1f95717ab0fbe695403cbf850ff",
		"pr_coding_time" : 1,
		"first_review_id" : "github:GithubPrReview:4:1979264065",
		"pr_pickup_time" : 4,
		"pr_review_time" : 1429,
		"deployment_commit_id" : "github:GithubRun:4:435823930:8567339272:https:\/\/github.com\/****\/****",
		"pr_deploy_time" : 15,
		"pr_cycle_time" : 1449,
		"first_commit_authored_date" : "2024-04-04 09:07:51",
		"pr_created_date" : "2024-04-04 09:08:03",
		"first_comment_date" : "2024-04-04 09:11:44",
		"pr_merged_date" : "2024-04-05 09:00:16",
		"pr_deployed_date" : "2024-04-05 09:14:22"
	}
]}

sstojak1 and others added 30 commits June 14, 2024 17:26
…pache#7559)

* adding pull_request_id index to  pull_request_commits/comments tables

* change the pull_request_commits primary key columns order

* adding Apache license header

* only run for mysql

* adding support for postgres

---------

Co-authored-by: Josip Stojak <[email protected]>
* feat: gerrit python plugin

Signed-off-by: Ji Bin <[email protected]>

* feat: gerrit plugin support incremental sync

Signed-off-by: Ji Bin <[email protected]>

---------

Signed-off-by: Ji Bin <[email protected]>
Co-authored-by: Lynwee <[email protected]>
…he#7599)

* hudson.maven.MavenModuleSet is now treated as a scope

* refactor: scope is now the default

---------

Co-authored-by: Josip Stojak <[email protected]>
* fix: pr reviewers and assignees script version error

* fix: adapt pg test
* fix: git extractor commit rawdataorigin is empty

* fix: remove debugging print
…lt (apache#7660)

* fix(gitextractor): update database store, set it incremental by default

* fix(gitextractor): add `SetIncrementalMode` to store

* style(gitextractor): fix ci errors
* refactor(framework): add some logs and dispart `Init` from `CreateAndRunApiServer`

* refactor(framework): update initial steps
mintsweet and others added 19 commits October 8, 2024 17:35
* feat(sonarcloud): add org to the connections table

* feat: add sonarqube cloud connection config

* fix: sonarcloud now working

* fix: linting

* fix: copywriting for sonarqube cloud

* feat: added cq_issue_impacts table

* fix: unit test

* fix: adjust sonarqube cloud config

* feat: add sonarcloud dashboard (apache#8140)

Co-authored-by: Startrekzky <[email protected]>

---------

Co-authored-by: mintsweet <[email protected]>
Co-authored-by: Louis.z <[email protected]>
Co-authored-by: Startrekzky <[email protected]>
* feat(api_collector_stateful): handle case were response has records from both before & after createdAfter of last collection

* feat(circleci-plugin): incremental collection for pipelines

* feat(api_collector_stateful): expose Input collector arg for StatefulFinalizableEntity to collect data based on previous collection

* feat(circleci-plugin): incremental data collection for workflows

* feat(circleci-plugin): incremental data collection for jobs

* refactor(circleci-plugin): use common query param function

* refactor(circleci-plugin): use BuildQueryParamsWithPageToken func when collecting unfinished job details
…8136)

* feat: generating new github access token to every gitextractor task

Signed-off-by: Caio Queiroz <[email protected]>

* feat: using DynamicGitUrl interface to implement the git url logic

* refactor: remove unused code

* fix: unit test

* fix: lint

---------

Signed-off-by: Caio Queiroz <[email protected]>
- add env SKIP_SUBTASK_PROGRESS to decide wether skip subtask progress updating to db
* feat(tapd): add more log when converting unicode

* feat(tapd): ignore errors when converting unicode fails
* bug: add missing migration script to register.go

* bug: add missing migration script to register.go - increaseProjectKeyLength

* bug: rename script column name

* increasing id instead of project_key

---------

Co-authored-by: Josip Stojak <[email protected]>
* feat: collect Zentao Story-Repo-Commit from DB

* feat: collect Zentao bug and task related repo commits from DB
…mand (apache#8194)

The go-dep make command was missing a version prefix, causing a dependency resolution issue. This change fixes the command to use the correct version prefix.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug severity/p1 This bug affects functionality or significantly affect ux labels Nov 20, 2024
d4x1 and others added 2 commits November 21, 2024 14:10
…e#8209)

* fix(opsgenie): add AssigneeId and AssigneeName to domain issue

* style(opsgenie): remove blank lines
}
if data.Options.DeploymentPattern != nil || data.Options.ProductionPattern != nil {
bitbucketPipeline.Type = data.RegexEnricher.ReturnNameIfMatched(devops.DEPLOYMENT, bitbucketApiPipeline.Target.RefName)
bitbucketPipeline.Environment = data.RegexEnricher.ReturnNameIfOmittedOrMatched(devops.PRODUCTION, bitbucketApiPipeline.Target.RefName)
Copy link

@passtas passtas Mar 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the issues we are encountering is that it is always assumed that pipeline execution has been performed for Production. Reality is, that likely pipeline has been executed before actual deployment to production, i.e. PR or commit linting, so those pipelines are then counted as actual deployments in DORA dashboards, while such actions are not even considered as a builds.

P.S.: While it wasn't introduced in this specific PR. It may worth starting the discussion around this approach. It may worth creating separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug severity/p1 This bug affects functionality or significantly affect ux size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][DORA-change_lead_time_calculator] Wrong deployment reference