diff --git a/changelogs/unreleased/mo-enable-code-coverage-overall-activity.yml b/changelogs/unreleased/mo-enable-code-coverage-overall-activity.yml new file mode 100644 index 0000000000000000000000000000000000000000..54c9a46029b1673a249321251cfa1597468c60a9 --- /dev/null +++ b/changelogs/unreleased/mo-enable-code-coverage-overall-activity.yml @@ -0,0 +1,5 @@ +--- +title: Add code coverage overall activity to group repository analytics +merge_request: 48155 +author: +type: added diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index 63270d5cc4ac594b78165448bf40761fbb4c2791..5f6a58103c13d9f81f8458b459e21f2d807cd333 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -8677,8 +8677,7 @@ type Group { ): BoardConnection """ - Represents the code coverage activity for this group. Available only when - feature flag `group_coverage_data_report_graph` is enabled + Represents the code coverage activity for this group """ codeCoverageActivities( """ diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index 2f4181df554cda0f41a6f0a04c5899375b13921e..7e90dfa2b5132d1a6da0d935d9306204fb8df501 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -24065,7 +24065,7 @@ }, { "name": "codeCoverageActivities", - "description": "Represents the code coverage activity for this group. Available only when feature flag `group_coverage_data_report_graph` is enabled", + "description": "Represents the code coverage activity for this group", "args": [ { "name": "startDate", diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 90c1a5a0ffd02f58018965431c528d436f094132..60a1176d9a51765d38fbe9427eb55c39e7341712 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -1432,7 +1432,7 @@ Autogenerated return type of EpicTreeReorder. | `avatarUrl` | String | Avatar URL of the group | | `board` | Board | A single board of the group | | `boards` | BoardConnection | Boards of the group | -| `codeCoverageActivities` | CodeCoverageActivityConnection | Represents the code coverage activity for this group. Available only when feature flag `group_coverage_data_report_graph` is enabled | +| `codeCoverageActivities` | CodeCoverageActivityConnection | Represents the code coverage activity for this group | | `containerRepositories` | ContainerRepositoryConnection | Container repositories of the project | | `containsLockedProjects` | Boolean! | Includes at least one project where the repository size exceeds the limit | | `customEmoji` | CustomEmojiConnection | Custom emoji within this namespace. Available only when feature flag `custom_emoji` is enabled | diff --git a/doc/user/group/img/group_code_coverage_analytics_v13_7.png b/doc/user/group/img/group_code_coverage_analytics_v13_7.png new file mode 100644 index 0000000000000000000000000000000000000000..fc670ff99e4893368250ba02d0a9e747e734b388 Binary files /dev/null and b/doc/user/group/img/group_code_coverage_analytics_v13_7.png differ diff --git a/doc/user/group/index.md b/doc/user/group/index.md index e09c685147a4ec268e392c4d3b2f9fc52198835c..80b8d1897f0edda408ba522dce3b4247e0adc4c5 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -794,10 +794,21 @@ With [GitLab Issue Analytics](issues_analytics/index.md), you can see a bar char ## Repositories analytics **(PREMIUM)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/215104) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.4. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/263478) in GitLab 13.6. +> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/276003) in GitLab 13.7. With [GitLab Repositories Analytics](repositories_analytics/index.md), you can download a CSV of the latest coverage data for all the projects in your group. +### Check code coverage for all projects + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/263478) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.7. + +See the overall activity of all projects with code coverage with [GitLab Repositories Analytics](repositories_analytics/index.md). + +It displays the current code coverage data available for your projects: + +![Group repositories analytics](img/group_code_coverage_analytics_v13_7.png) + ## Dependency Proxy Use GitLab as a [dependency proxy](../packages/dependency_proxy/index.md) for upstream Docker images. diff --git a/ee/app/assets/javascripts/analytics/repository_analytics/components/group_repository_analytics.vue b/ee/app/assets/javascripts/analytics/repository_analytics/components/group_repository_analytics.vue index ee639d14c5c1219d2c4765b8e1e38992e7dcf816..2721ebffa0f33ae14526e4b2c106031aea3655ad 100644 --- a/ee/app/assets/javascripts/analytics/repository_analytics/components/group_repository_analytics.vue +++ b/ee/app/assets/javascripts/analytics/repository_analytics/components/group_repository_analytics.vue @@ -16,11 +16,6 @@ export default { text: { codeCoverageHeader: s__('RepositoriesAnalytics|Test Code Coverage'), }, - computed: { - shouldShowCoverageSummary() { - return this.glFeatures.groupCoverageDataReportGraph; - }, - }, }; </script> @@ -29,7 +24,7 @@ export default { <h4 data-testid="test-coverage-header"> {{ $options.text.codeCoverageHeader }} </h4> - <test-coverage-summary v-if="shouldShowCoverageSummary" /> + <test-coverage-summary /> <test-coverage-table class="gl-mb-5" /> <download-test-coverage /> </div> diff --git a/ee/app/controllers/groups/analytics/repository_analytics_controller.rb b/ee/app/controllers/groups/analytics/repository_analytics_controller.rb index a2d8a18a0aa38c7369f6c667db8a9783765706d7..759d3797f518f745e3557a5b3458fed2f86ae115 100644 --- a/ee/app/controllers/groups/analytics/repository_analytics_controller.rb +++ b/ee/app/controllers/groups/analytics/repository_analytics_controller.rb @@ -6,7 +6,6 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl before_action :load_group before_action -> { check_feature_availability!(:group_repository_analytics) } before_action -> { authorize_view_by_action!(:read_group_repository_analytics) } - before_action -> { push_frontend_feature_flag(:group_coverage_data_report_graph, @group, default_enabled: false) } def show track_event(pageview_tracker_params) diff --git a/ee/app/graphql/ee/types/group_type.rb b/ee/app/graphql/ee/types/group_type.rb index 2224a8e401c835257e4421ec937867c6dcf3ce1b..eb53546cc5d5ca75dd516387758cb103e84084f5 100644 --- a/ee/app/graphql/ee/types/group_type.rb +++ b/ee/app/graphql/ee/types/group_type.rb @@ -71,8 +71,7 @@ module EE ::Types::Ci::CodeCoverageActivityType.connection_type, null: true, description: 'Represents the code coverage activity for this group', - resolver: ::Resolvers::Ci::CodeCoverageActivitiesResolver, - feature_flag: :group_coverage_data_report_graph + resolver: ::Resolvers::Ci::CodeCoverageActivitiesResolver field :stats, ::Types::GroupStatsType, diff --git a/ee/config/feature_flags/development/group_coverage_data_report_graph.yml b/ee/config/feature_flags/development/group_coverage_data_report_graph.yml deleted file mode 100644 index effdebc623604e8df207c434b0ef012770c1633c..0000000000000000000000000000000000000000 --- a/ee/config/feature_flags/development/group_coverage_data_report_graph.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: group_coverage_data_report_graph -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46698 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/276003 -milestone: '13.6' -type: development -group: group::testing -default_enabled: false diff --git a/ee/spec/graphql/ee/types/group_type_spec.rb b/ee/spec/graphql/ee/types/group_type_spec.rb index b89efd053b9ed530e23f4ba4cbc1937dce87bbf1..7967773ed38f17c55e435408f93dc57e36f7b6d0 100644 --- a/ee/spec/graphql/ee/types/group_type_spec.rb +++ b/ee/spec/graphql/ee/types/group_type_spec.rb @@ -71,35 +71,4 @@ RSpec.describe GitlabSchema.types['Group'] do expect(vulnerabilities.first['severity']).to eq('CRITICAL') end end - - describe 'codeCoverageActivities' do - let(:group) { create(:group) } - let(:user) { create(:user) } - let(:start_date) { 1.day.ago.to_date.to_s } - let(:query) do - %( - query { - group(fullPath: "#{group.full_path}") { - codeCoverageActivities(startDate: "#{start_date}") { - nodes { - averageCoverage - } - } - } - } - ) - end - - context 'when group_coverage_data_report flag is disabled' do - subject { GitlabSchema.execute(query, context: { current_user: user }).as_json } - - it 'returns a graphQL error field does not exist' do - stub_feature_flags(group_coverage_data_report_graph: false) - - expected_message = "Field 'codeCoverageActivities' doesn't exist on type 'Group'" - - expect(subject.dig('errors').first.dig('message')).to eq(expected_message) - end - end - end end