Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

feat: add contributor profile dashboard #25

Merged
merged 21 commits into from
May 6, 2021

Conversation

Mini256
Copy link
Member

@Mini256 Mini256 commented Apr 27, 2021

Prepare

The following steps are to prepare for adding a new metrics:

  • add test scripts
  • add test config file

We can add the new metrics series config in the test/data/test_metrics.yaml file and use test_metric_sync.sh script to test our new metrics, also we can add the new tags config in the test/data/test_tags.yaml file and use test_tags.sh script to test our new tags.

  • add test sql file

The SQL file used for the test can be added to the configs/dev/metrics/shard directory, or the project directory configs/dev/metrics/{project_name} specified in the script file, and the test script will preferentially read the sql in the project directory file.

  • run the test scripts in local

We can execute the script locally, the premise is that the PostgresSQL instance used by devstats already exists locally, and the data have imported from gharchive exists in the database.

Add a new metrics

The following steps indicates how to add a new metrics:

  • copy the SQL file from devstats/metrics/shard or devstats/metrics/kubernetes to the configs/dev/test, if there is SQL with similar functions as the new metrics. (fa9a49e)
  • modify or add the SQL file used by the new metrics

For this PR, I removed the symbol ` in the series field and modify the tags table name tusers to tall_users:

- concat('user;', sub.cuser, '`', sub.repo_group, ';activity,pushes,comments,contributions'),
+ concat('user;', sub.cuser, sub.repo_group, ';activity,pushes,comments,contributions'),
  ...
-  and dup_actor_login in (select users_name from tusers)
+  and dup_actor_login in (select users_name from tall_users)
  • add all_users tags SQL (fa9a49e)
  • add all_users tag config (c0b4d5b)
  • add all_users_activity metrics series config (3582269)
  • add columns config ( add columns to the series table according to the tags table, this PR is not used because the results of multiple columns of calculation metrics are stored in the form of multiple rows, each row has only a single-value column)
  • add "Contributor Profile“ dashboard
  • add link referred to profile dashboard 、activity count and activity sum in the “Developer Activity Counts by Companies” dashboard
  • test in the dev env

Preview

image

image

Related Issue

close #18

todo #26

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 27, 2021
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 27, 2021
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 29, 2021
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 29, 2021
@Mini256 Mini256 changed the title feat: add single contributor dashboard feat: add contributor profile dashboard Apr 30, 2021
@Mini256 Mini256 marked this pull request as ready for review May 6, 2021 04:55
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2021
deployments/helms/dev/values.yaml Outdated Show resolved Hide resolved
deployments/helms/dev/values.yaml Outdated Show resolved Hide resolved
@Rustin170506 Rustin170506 merged commit 52a96aa into ti-community-infra:main May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single contributor view dashboard
3 participants