diff options
25 files changed, 119 insertions, 373 deletions
diff --git a/.rubocop_todo/gitlab/namespaced_class.yml b/.rubocop_todo/gitlab/namespaced_class.yml index e41736e8b5f..ac5edc05265 100644 --- a/.rubocop_todo/gitlab/namespaced_class.yml +++ b/.rubocop_todo/gitlab/namespaced_class.yml @@ -854,7 +854,6 @@ Gitlab/NamespacedClass: - 'ee/app/controllers/sitemap_controller.rb' - 'ee/app/controllers/smartcard_controller.rb' - 'ee/app/controllers/subscriptions_controller.rb' - - 'ee/app/controllers/survey_responses_controller.rb' - 'ee/app/controllers/trial_registrations_controller.rb' - 'ee/app/controllers/trials_controller.rb' - 'ee/app/finders/audit_event_finder.rb' diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml index 2bd363d8bff..7d2674c34f8 100644 --- a/.rubocop_todo/layout/line_length.yml +++ b/.rubocop_todo/layout/line_length.yml @@ -2691,7 +2691,6 @@ Layout/LineLength: - 'ee/spec/requests/rack_attack_global_spec.rb' - 'ee/spec/requests/repositories/git_http_controller_spec.rb' - 'ee/spec/requests/smartcard_controller_spec.rb' - - 'ee/spec/requests/survey_responses_controller_spec.rb' - 'ee/spec/routing/admin_routing_spec.rb' - 'ee/spec/routing/group_routing_spec.rb' - 'ee/spec/routing/groups/cadences_routing_spec.rb' diff --git a/.rubocop_todo/layout/space_inside_block_braces.yml b/.rubocop_todo/layout/space_inside_block_braces.yml index 509111b9e6d..c084147eb58 100644 --- a/.rubocop_todo/layout/space_inside_block_braces.yml +++ b/.rubocop_todo/layout/space_inside_block_braces.yml @@ -191,7 +191,6 @@ Layout/SpaceInsideBlockBraces: - 'ee/spec/requests/groups/contribution_analytics_spec.rb' - 'ee/spec/requests/lfs_http_spec.rb' - 'ee/spec/requests/projects/security/policies_controller_spec.rb' - - 'ee/spec/requests/survey_responses_controller_spec.rb' - 'ee/spec/serializers/member_user_entity_spec.rb' - 'ee/spec/serializers/merge_request_poll_widget_entity_spec.rb' - 'ee/spec/serializers/vulnerabilities/finding_reports_comparer_entity_spec.rb' diff --git a/.rubocop_todo/layout/space_inside_parens.yml b/.rubocop_todo/layout/space_inside_parens.yml index ffbe68d7d24..301568f0ec4 100644 --- a/.rubocop_todo/layout/space_inside_parens.yml +++ b/.rubocop_todo/layout/space_inside_parens.yml @@ -129,7 +129,6 @@ Layout/SpaceInsideParens: - 'ee/spec/requests/api/ldap_group_links_spec.rb' - 'ee/spec/requests/api/project_milestones_spec.rb' - 'ee/spec/requests/customers_dot/proxy_controller_spec.rb' - - 'ee/spec/requests/survey_responses_controller_spec.rb' - 'ee/spec/serializers/member_user_entity_spec.rb' - 'ee/spec/services/app_sec/dast/profiles/create_service_spec.rb' - 'ee/spec/services/app_sec/dast/site_profile_secret_variables/create_or_update_service_spec.rb' diff --git a/.rubocop_todo/style/percent_literal_delimiters.yml b/.rubocop_todo/style/percent_literal_delimiters.yml index ecf7a5cf05e..16ae8989c97 100644 --- a/.rubocop_todo/style/percent_literal_delimiters.yml +++ b/.rubocop_todo/style/percent_literal_delimiters.yml @@ -140,7 +140,6 @@ Style/PercentLiteralDelimiters: - 'app/models/resource_timebox_event.rb' - 'app/models/user.rb' - 'app/models/user_interacted_project.rb' - - 'app/models/users/in_product_marketing_email.rb' - 'app/policies/identity_provider_policy.rb' - 'app/presenters/dev_ops_report/metric_presenter.rb' - 'app/presenters/search_service_presenter.rb' diff --git a/app/models/users/in_product_marketing_email.rb b/app/models/users/in_product_marketing_email.rb index 82c2e336a09..f220cfd17c5 100644 --- a/app/models/users/in_product_marketing_email.rb +++ b/app/models/users/in_product_marketing_email.rb @@ -41,7 +41,7 @@ module Users # Tracks we don't send emails for (e.g. unsuccessful experiment). These # are kept since we already have DB records that use the enum value. - INACTIVE_TRACK_NAMES = %w(invite_team).freeze + INACTIVE_TRACK_NAMES = %w[invite_team experience].freeze ACTIVE_TRACKS = tracks.except(*INACTIVE_TRACK_NAMES) scope :for_user_with_track_and_series, -> (user, track, series) do diff --git a/app/services/namespaces/in_product_marketing_emails_service.rb b/app/services/namespaces/in_product_marketing_emails_service.rb index 414f253deb8..c139b2e11dd 100644 --- a/app/services/namespaces/in_product_marketing_emails_service.rb +++ b/app/services/namespaces/in_product_marketing_emails_service.rb @@ -37,11 +37,6 @@ module Namespaces interval_days: [1, 5, 10], completed_actions: [:git_write, :pipeline_created, :trial_started], incomplete_actions: [:user_added] - }, - experience: { - interval_days: [30], - completed_actions: [:created, :git_write], - incomplete_actions: [] } }.freeze diff --git a/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml b/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml index 355d77245ae..720b0dde650 100644 --- a/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml +++ b/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml @@ -8,9 +8,11 @@ product_stage: growth product_group: activation product_category: onboarding value_type: number -status: active +status: removed milestone: "13.12" introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61347 +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92280 +milestone_removed: "15.2" time_frame: all data_source: database distribution: diff --git a/config/routes.rb b/config/routes.rb index 97e6983e0bc..dd3095f0a8d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -190,9 +190,6 @@ InitializerConnections.with_disabled_database_connections do scope '/push_from_secondary/:geo_node_id' do draw :git_http end - - # Used for survey responses - resources :survey_responses, only: :index end Gitlab.jh do diff --git a/doc/topics/autodevops/cloud_deployments/img/guide_base_domain_v12_3.png b/doc/topics/autodevops/cloud_deployments/img/guide_base_domain_v12_3.png Binary files differdeleted file mode 100644 index 7d3b6a2f905..00000000000 --- a/doc/topics/autodevops/cloud_deployments/img/guide_base_domain_v12_3.png +++ /dev/null diff --git a/doc/topics/autodevops/cloud_deployments/img/guide_project_landing_page_v12_10.png b/doc/topics/autodevops/cloud_deployments/img/guide_project_landing_page_v12_10.png Binary files differdeleted file mode 100644 index 54e7141dad2..00000000000 --- a/doc/topics/autodevops/cloud_deployments/img/guide_project_landing_page_v12_10.png +++ /dev/null diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md index be98cc36174..83e589a3882 100644 --- a/doc/user/application_security/index.md +++ b/doc/user/application_security/index.md @@ -222,9 +222,9 @@ From the merge request security widget, select **Expand** to unfold the widget, ## View security scan information in the pipeline Security tab -A pipeline's security tab lists all findings in the current branch. It includes new findings introduced by this branch and existing vulnerabilities that were already present when the branch was created. These results likely do not match the findings displayed in the Merge Request security widget as those do not include the existing vulnerabilities (with the exception of showing any existing vulnerabilities that are no longer detected in the feature branch). - -For more details, see [security tab](vulnerability_report/pipeline.md#view-vulnerabilities-in-a-pipeline). +A pipeline's security tab lists all findings in the current branch. It includes new findings introduced by this branch +and existing vulnerabilities already present when you created the branch. These results likely do not match the findings +displayed in the Merge Request security widget, as those do not include the existing vulnerabilities. Refer to [View vulnerabilities in a pipeline](vulnerability_report/pipeline.md) for more information. ## View security scan information in the Security Dashboard diff --git a/doc/user/application_security/vulnerability_report/pipeline.md b/doc/user/application_security/vulnerability_report/pipeline.md index 980bd99f8c8..14c13f74a5e 100644 --- a/doc/user/application_security/vulnerability_report/pipeline.md +++ b/doc/user/application_security/vulnerability_report/pipeline.md @@ -16,27 +16,32 @@ To view vulnerabilities in a pipeline: 1. From the list, select the pipeline you want to check for vulnerabilities. 1. Select the **Security** tab. -**Scan details** shows vulnerabilities introduced by the merge request, in addition to existing vulnerabilities -from the latest successful pipeline in your project's default branch. +A pipeline consists of multiple jobs, which may include security scans. When a job declares and produces security scan +reports using [`artifacts:reports`](../../../ci/yaml/artifacts_reports.md), GitLab parses and ingests the contents of +these reports to create vulnerabilities associated with the project the pipeline belongs to. -A pipeline consists of multiple jobs, such as SAST and DAST scans. If a job fails to finish, -the security dashboard doesn't show SAST scanner output. For example, if the SAST -job finishes but the DAST job fails, the security dashboard doesn't show SAST results. On failure, -the analyzer outputs an [exit code](../../../development/integrations/secure.md#exit-code). +If a job fails to finish, the pipeline vulnerability report doesn't show vulnerability findings detected by this job. +For example, if a pipeline contains DAST and SAST jobs, but the DAST job fails by returning a non-zero +[exit code](../../../development/integrations/secure.md#exit-code), the report doesn't show DAST results. -## View total number of vulnerabilities per scan +The pipeline vulnerability report only shows results contained in the security report artifacts. This report differs from +the [Vulnerability Report](index.md), which contains cumulative results of all successful jobs, and from the merge request +[security widget](../#view-security-scan-information-in-merge-requests), which combines the branch results with +cumulative results. -To view the total number of vulnerabilities per scan: +Before GitLab displays results, the vulnerability findings in all pipeline reports are [deduplicated](#deduplication-process). -1. On the top bar, select **Menu > Projects** and find your project. -1. On the left sidebar, select **CI/CD > Pipelines**. -1. Select the **Status** of a branch. -1. Select the **Security** tab. +## Scan details + +**Scan details** shows a summary of vulnerability findings in the pipeline and the source reports. + +GitLab displays one row of information for each [scan type](../terminology/#scan-type-report-type) artifact present in +the pipeline. -**Scan details** shows vulnerabilities introduced by the merge request, in addition to existing vulnerabilities -from the latest successful pipeline in your project's default branch. +Note that each scan type's total number of vulnerabilities includes dismissed findings. If the number of findings +in the report doesn't match the number in **Scan details**, ensure that **Hide dismissed** is disabled. -## Download security scan outputs +### Download security scan outputs > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3728) in GitLab 13.10. > - [Improved](https://gitlab.com/gitlab-org/gitlab/-/issues/333660) in GitLab 14.2. @@ -48,10 +53,89 @@ Depending on the type of security scanner, you can download: To download a security scan output: -1. On the top bar, select **Menu > Projects** and find your project. -1. On the left sidebar, select **CI/CD > Pipelines**. -1. Select the **Status** of a branch. -1. Select the **Security** tab. 1. In **Scan details**, select **Download results**: - To download a JSON file, select the JSON artifact. - To download a CSV file, select **Download scanned resources**. + +## Scan results + +This shows a list of the combined results for all security report artifacts. The filters work like the +[Vulnerability Report filters](index.md#vulnerability-report-filters), but they are limited to **Severity** and **Tool**, with +the addition of a **Hide dismissed** toggle. + +When you review the vulnerability findings reported in the pipeline, you can select one or more entries for dismissal, +similar to [Dismissing a vulnerability](index.md#dismissing-a-vulnerability) in the Vulnerability Report. + +When you merge the branch corresponding to the pipeline into the default branch, all reported findings are combined into +the [Vulnerability Report](index.md). Scan results in pipelines executed on the default branch are +incorporated once the pipeline finishes. + +| Existing vulnerability status | Dismissed in pipeline? | New vulnerability status | +|:------------------------------|:-----------------------|:-------------------------| +| any | Yes | Dismissed | +| Dismissed | any | Dismissed | +| Confirmed | No | Confirmed | +| Needs triage (Detected) | No | Needs triage (Detected) | +| Resolved | No | Needs triage (Detected) | +| N/A (i.e.: new vulnerability) | No | Needs triage (Detected) | + +## Deduplication process + +When a pipeline contains jobs that produce multiple security reports of the same type, it is possible that the same +vulnerability finding is present in multiple reports. This duplication is common when different scanners are used to +increase coverage. The deduplication process allows you to maximize the vulnerability scanning coverage while reducing +the number of findings you need to manage. + +A finding is considered a duplicate of another finding when their [scan type](../terminology/#scan-type-report-type), +[location](../terminology/#location-fingerprint) and +[identifiers](../../../development/integrations/secure.md#identifiers) are the same. + +The scan type must match because each can have its own definition for the location of a vulnerability. For example, +static analyzers are able to locate a file path and line number, whereas a container scanning analyzer uses the image +name instead. + +When comparing identifiers, GitLab does not compare `CWE` and `WASC` during deduplication because they are +"type identifiers" and are used to classify groups of vulnerabilities. Including these identifiers results in +many findings being incorrectly considered duplicates. + +In a set of duplicated findings, the first occurrence of a finding is kept and the remaining are skipped. Security +reports are processed in alphabetical file path order, and findings are processed sequentially in the order they +appear in a report. + +### Deduplication examples + +- Example 1: matching identifiers and location, mismatching scan type. + - Finding + - Scan type: `sast` + - Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc` + - Identifiers: CVE-2022-25510 + - Other Finding + - Scan type: `secret_detection` + - Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc` + - Identifiers: CVE-2022-25510 + - Deduplication result: not duplicates because the scan type is different. +- Example 2: matching location and scan type, mismatching type identifiers. + - Finding + - Scan type: `sast` + - Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc` + - Identifiers: CWE-259 + - Other Finding + - Scan type: `sast` + - Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc` + - Identifiers: CWE-798 + - Deduplication result: duplicates because `CWE` identifiers are ignored. +- Example 3: matching scan type, location and identifiers. + - Finding + - Scan type: `container_scanning` + - Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc` + - Identifiers: CVE-2022-25510, CWE-259 + - Other Finding + - Scan type: `container_scanning` + - Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc` + - Identifiers: CVE-2022-25510, CWE-798 + - Deduplication result: duplicates because all criteria match, and type identifiers are ignored. + +The examples above don't include the raw location values. Each scan type defines its own +`fingerprint_data`, which is used to generate a `SHA1` hash that is used as the `location_fingerprint`. +You can find definitions for each scan type [`gitlab/lib/gitlab/ci/reports/security/locations`](https://gitlab.com/gitlab-org/gitlab/-/tree/01c69e97340b7c1c7e30c0caec8506910b6503c8/lib/gitlab/ci/reports/security/locations) +and [`gitlab/ee/lib/gitlab/ci/reports/security/locations`](https://gitlab.com/gitlab-org/gitlab/-/tree/01c69e97340b7c1c7e30c0caec8506910b6503c8/ee/lib/gitlab/ci/reports/security/locations). diff --git a/doc/user/project/clusters/img/kubernetes_pod_logs_v12_10.png b/doc/user/project/clusters/img/kubernetes_pod_logs_v12_10.png Binary files differdeleted file mode 100644 index abac22e3f1f..00000000000 --- a/doc/user/project/clusters/img/kubernetes_pod_logs_v12_10.png +++ /dev/null diff --git a/doc/user/project/clusters/img/pod_logs_deploy_board.png b/doc/user/project/clusters/img/pod_logs_deploy_board.png Binary files differdeleted file mode 100644 index 7f83382968b..00000000000 --- a/doc/user/project/clusters/img/pod_logs_deploy_board.png +++ /dev/null diff --git a/doc/user/project/code_owners.md b/doc/user/project/code_owners.md index 197a995952a..adea5dad7b8 100644 --- a/doc/user/project/code_owners.md +++ b/doc/user/project/code_owners.md @@ -85,6 +85,12 @@ Inviting **Subgroup Y** to a parent group of **Project A** [is not supported](https://gitlab.com/gitlab-org/gitlab/-/issues/288851). To set **Subgroup Y** as Code Owners, add this group directly to the project itself. +NOTE: +For approval to be required, groups as Code Owners must have a direct membership +(not inherited membership) in the project. Approval can only be optional for groups +that inherit membership. Members in the Code Owners group also must be direct members, +and not inherit membership from any parent groups. + ### Add a group as a Code Owner To set a group as a Code Owner: diff --git a/lib/gitlab/email/message/in_product_marketing/experience.rb b/lib/gitlab/email/message/in_product_marketing/experience.rb deleted file mode 100644 index 7520de6d2a3..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/experience.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class Experience < Base - include Gitlab::Utils::StrongMemoize - - EASE_SCORE_SURVEY_ID = 1 - - def subject_line - s_('InProductMarketing|Do you have a minute?') - end - - def tagline - end - - def title - s_('InProductMarketing|We want your GitLab experience to be great') - end - - def subtitle - s_('InProductMarketing|Take this 1-question survey!') - end - - def body_line1 - s_('InProductMarketing|%{strong_start}Overall, how difficult or easy was it to get started with GitLab?%{strong_end}').html_safe % strong_options - end - - def body_line2 - s_('InProductMarketing|Click on the number below that corresponds with your answer — 1 being very difficult, 5 being very easy.') - end - - def cta_text - end - - def feedback_link(rating) - params = { - onboarding_progress: onboarding_progress, - response: rating, - show_invite_link: show_invite_link, - survey_id: EASE_SCORE_SURVEY_ID - } - - params[:show_incentive] = true if show_incentive? - - "#{gitlab_com_root_url}/-/survey_responses?#{params.to_query}" - end - - def feedback_ratings(rating) - [ - s_('InProductMarketing|Very difficult'), - s_('InProductMarketing|Difficult'), - s_('InProductMarketing|Neutral'), - s_('InProductMarketing|Easy'), - s_('InProductMarketing|Very easy') - ][rating - 1] - end - - def feedback_thanks - s_('InProductMarketing|Feedback from users like you really improves our product. Thanks for your help!') - end - - private - - def onboarding_progress - strong_memoize(:onboarding_progress) do - group.onboarding_progress.number_of_completed_actions - end - end - - def show_invite_link - strong_memoize(:show_invite_link) do - group.max_member_access_for_user(user) >= GroupMember::DEVELOPER && user.preferred_language == 'en' - end - end - - def show_incentive? - show_invite_link && group.member_count > 1 - end - - def gitlab_com_root_url - return root_url.chomp('/') if Rails.env.development? - - Gitlab::Saas.com_url - end - end - end - end - end -end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index e36ab9f9530..5a085412998 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -19085,12 +19085,6 @@ msgstr "" msgid "Hashed storage can't be disabled anymore for new projects" msgstr "" -msgid "Have a quick chat with us about your experience." -msgstr "" - -msgid "Have more to say about GitLab?" -msgstr "" - msgid "Header logo" msgstr "" @@ -19917,9 +19911,6 @@ msgstr "" msgid "InProductMarketing|%{strong_start}Multiple approval roles%{strong_end} — including code owners and required merge approvals" msgstr "" -msgid "InProductMarketing|%{strong_start}Overall, how difficult or easy was it to get started with GitLab?%{strong_end}" -msgstr "" - msgid "InProductMarketing|*GitLab*, noun: a synonym for efficient teams" msgstr "" @@ -19977,9 +19968,6 @@ msgstr "" msgid "InProductMarketing|By enabling code owners and required merge approvals the right person will review the right MR. This is a win-win: cleaner code and a more efficient review process." msgstr "" -msgid "InProductMarketing|Click on the number below that corresponds with your answer — 1 being very difficult, 5 being very easy." -msgstr "" - msgid "InProductMarketing|Code owners" msgstr "" @@ -20022,9 +20010,6 @@ msgstr "" msgid "InProductMarketing|Did you know teams that use GitLab are far more efficient?" msgstr "" -msgid "InProductMarketing|Difficult" -msgstr "" - msgid "InProductMarketing|Dig in and create a project and a repo" msgstr "" @@ -20034,18 +20019,12 @@ msgstr "" msgid "InProductMarketing|Discover Premium & Ultimate." msgstr "" -msgid "InProductMarketing|Do you have a minute?" -msgstr "" - msgid "InProductMarketing|Do you have a teammate who would be perfect for this task?" msgstr "" msgid "InProductMarketing|Dynamic application security testing" msgstr "" -msgid "InProductMarketing|Easy" -msgstr "" - msgid "InProductMarketing|Epics" msgstr "" @@ -20064,9 +20043,6 @@ msgstr "" msgid "InProductMarketing|Facebook" msgstr "" -msgid "InProductMarketing|Feedback from users like you really improves our product. Thanks for your help!" -msgstr "" - msgid "InProductMarketing|Feel the need for speed?" msgstr "" @@ -20235,9 +20211,6 @@ msgstr "" msgid "InProductMarketing|Need an alternative to importing?" msgstr "" -msgid "InProductMarketing|Neutral" -msgstr "" - msgid "InProductMarketing|No credit card required." msgstr "" @@ -20310,9 +20283,6 @@ msgstr "" msgid "InProductMarketing|Streamline code review, know at a glance who's unavailable, communicate in comments or in email and integrate with Slack so everyone's on the same page." msgstr "" -msgid "InProductMarketing|Take this 1-question survey!" -msgstr "" - msgid "InProductMarketing|Take your first steps with GitLab" msgstr "" @@ -20385,12 +20355,6 @@ msgstr "" msgid "InProductMarketing|Used by more than 100,000 organizations from around the globe:" msgstr "" -msgid "InProductMarketing|Very difficult" -msgstr "" - -msgid "InProductMarketing|Very easy" -msgstr "" - msgid "InProductMarketing|Visualize your epics and milestones in a timeline." msgstr "" @@ -20406,9 +20370,6 @@ msgstr "" msgid "InProductMarketing|We know a thing or two about efficiency and we don't want to keep that to ourselves. Sign up for a free trial of GitLab Ultimate and your teams will be on it from day one." msgstr "" -msgid "InProductMarketing|We want your GitLab experience to be great" -msgstr "" - msgid "InProductMarketing|What does our value stream timeline look like from product to development to review and production?" msgstr "" @@ -23264,9 +23225,6 @@ msgstr "" msgid "Let's Encrypt is a free, automated, and open certificate authority (CA) that gives digital certificates in order to enable HTTPS (SSL/TLS) for websites. Learn more about Let's Encrypt configuration by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}." msgstr "" -msgid "Let's talk!" -msgstr "" - msgid "License Compliance" msgstr "" @@ -31969,12 +31927,6 @@ msgstr "" msgid "Recaptcha verified?" msgstr "" -msgid "Receive a $50 gift card as a thank you for your time." -msgstr "" - -msgid "Receive a %{strongOpen}$50 gift card%{strongClose} as a thank you for your time." -msgstr "" - msgid "Receive any notifications from GitLab." msgstr "" @@ -37991,9 +37943,6 @@ msgstr "" msgid "Support page URL" msgstr "" -msgid "Survey Response" -msgstr "" - msgid "Surveys|Delighted" msgstr "" @@ -38702,9 +38651,6 @@ msgstr "" msgid "Thank you for your business." msgstr "" -msgid "Thank you for your feedback!" -msgstr "" - msgid "Thank you for your report. A GitLab administrator will look into it shortly." msgstr "" @@ -45159,9 +45105,6 @@ msgstr "" msgid "Your requirements will be imported in the background. After it's finished, you'll get a confirmation email." msgstr "" -msgid "Your response has been recorded." -msgstr "" - msgid "Your search didn't match any commits." msgstr "" diff --git a/spec/fixtures/product_intelligence/survey_response_schema.json b/spec/fixtures/product_intelligence/survey_response_schema.json deleted file mode 100644 index 03d2d170137..00000000000 --- a/spec/fixtures/product_intelligence/survey_response_schema.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "description": "Schema for a Gitlab survey_response event", - "self": { - "vendor": "com.gitlab", - "name": "survey_response", - "version": "1-0-1", - "format": "jsonschema" - }, - "type": "object", - "additionalProperties": false, - "required": ["survey_id", "response"], - "properties": { - "survey_id": { - "description": "Survey ID", - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "response": { - "description": "Response", - "type": "string", - "maxLength": 10000 - }, - "instance_id": { - "description": "Instance ID", - "type": ["integer", "null"], - "minimum": 0, - "maximum": 2147483647 - }, - "user_id": { - "description": "User ID", - "type": ["integer", "null"], - "minimum": 0, - "maximum": 2147483647 - }, - "email": { - "description": "Email", - "type": ["string", "null"], - "maxLength": 255 - }, - "name": { - "description": "Name", - "type": ["string", "null"], - "maxLength": 255 - }, - "username": { - "description": "Username", - "type": ["string", "null"], - "maxLength": 255 - }, - "onboarding_progress": { - "description": "Onboarding progress", - "type": ["integer", "null"], - "minimum": 0, - "maximum": 2147483647 - } - } -} diff --git a/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb index dfa18c27d5e..ab6b1cd6171 100644 --- a/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb +++ b/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb @@ -99,7 +99,6 @@ RSpec.describe Gitlab::Email::Message::InProductMarketing::Base do :verify | true :trial | true :team | true - :experience | true end with_them do diff --git a/spec/lib/gitlab/email/message/in_product_marketing/experience_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/experience_spec.rb deleted file mode 100644 index 8cd2345822e..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/experience_spec.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::Experience do - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - subject(:message) { described_class.new(group: group, user: user, series: series)} - - describe 'public methods' do - context 'with series 0' do - let(:series) { 0 } - - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_nil - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_present - expect(message.cta_text).to be_nil - end - - describe 'feedback URL' do - before do - allow(message).to receive(:onboarding_progress).and_return(1) - allow(message).to receive(:show_invite_link).and_return(true) - end - - subject do - message.feedback_link(1) - end - - it { is_expected.to start_with(Gitlab::Saas.com_url) } - - context 'when in development' do - let(:root_url) { 'http://example.com' } - - before do - allow(message).to receive(:root_url).and_return(root_url) - stub_rails_env('development') - end - - it { is_expected.to start_with(root_url) } - end - end - - describe 'feedback URL show_invite_link query param' do - let(:user_access) { GroupMember::DEVELOPER } - let(:preferred_language) { 'en' } - - before do - allow(message).to receive(:onboarding_progress).and_return(1) - allow(group).to receive(:max_member_access_for_user).and_return(user_access) - allow(user).to receive(:preferred_language).and_return(preferred_language) - end - - subject do - uri = URI.parse(message.feedback_link(1)) - Rack::Utils.parse_query(uri.query).with_indifferent_access[:show_invite_link] - end - - it { is_expected.to eq('true') } - - context 'with less than developer access' do - let(:user_access) { GroupMember::GUEST } - - it { is_expected.to eq('false') } - end - - context 'with preferred language other than English' do - let(:preferred_language) { 'nl' } - - it { is_expected.to eq('false') } - end - end - - describe 'feedback URL show_incentive query param' do - let(:show_invite_link) { true } - let(:member_count) { 2 } - let(:query) do - uri = URI.parse(message.feedback_link(1)) - Rack::Utils.parse_query(uri.query).with_indifferent_access - end - - before do - allow(message).to receive(:onboarding_progress).and_return(1) - allow(message).to receive(:show_invite_link).and_return(show_invite_link) - allow(group).to receive(:member_count).and_return(member_count) - end - - subject { query[:show_incentive] } - - it { is_expected.to eq('true') } - - context 'with only one member' do - let(:member_count) { 1 } - - it "is not present" do - expect(query).not_to have_key(:show_incentive) - end - end - - context 'show_invite_link is false' do - let(:show_invite_link) { false } - - it "is not present" do - expect(query).not_to have_key(:show_incentive) - end - end - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing_spec.rb index 40351bef8b9..1c59d9c8208 100644 --- a/spec/lib/gitlab/email/message/in_product_marketing_spec.rb +++ b/spec/lib/gitlab/email/message/in_product_marketing_spec.rb @@ -17,7 +17,6 @@ RSpec.describe Gitlab::Email::Message::InProductMarketing do :verify | described_class::Verify :trial | described_class::Trial :team | described_class::Team - :experience | described_class::Experience end with_them do diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 21b9a1b9455..6eb00053b17 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -1309,8 +1309,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do "in_product_marketing_email_team_1_sent" => -1, "in_product_marketing_email_team_1_cta_clicked" => -1, "in_product_marketing_email_team_2_sent" => -1, - "in_product_marketing_email_team_2_cta_clicked" => -1, - "in_product_marketing_email_experience_0_sent" => -1 + "in_product_marketing_email_team_2_cta_clicked" => -1 } expect(subject).to eq(expected_data) @@ -1355,8 +1354,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do "in_product_marketing_email_team_1_sent" => 0, "in_product_marketing_email_team_1_cta_clicked" => 0, "in_product_marketing_email_team_2_sent" => 0, - "in_product_marketing_email_team_2_cta_clicked" => 0, - "in_product_marketing_email_experience_0_sent" => 0 + "in_product_marketing_email_team_2_cta_clicked" => 0 } expect(subject).to eq(expected_data) diff --git a/spec/mailers/emails/in_product_marketing_spec.rb b/spec/mailers/emails/in_product_marketing_spec.rb index 7f3896a3d51..7c21e161ffe 100644 --- a/spec/mailers/emails/in_product_marketing_spec.rb +++ b/spec/mailers/emails/in_product_marketing_spec.rb @@ -65,7 +65,6 @@ RSpec.describe Emails::InProductMarketing do :team | 0 :team | 1 :team | 2 - :experience | 0 :team_short | 0 :trial_short | 0 :admin_verify | 0 @@ -83,12 +82,7 @@ RSpec.describe Emails::InProductMarketing do is_expected.to have_subject(message.subject_line) is_expected.to have_body_text(message.title) is_expected.to have_body_text(message.subtitle) - - if track == :experience - is_expected.to have_body_text(CGI.unescapeHTML(message.feedback_link(1))) - else - is_expected.to have_body_text(CGI.unescapeHTML(message.cta_link)) - end + is_expected.to have_body_text(CGI.unescapeHTML(message.cta_link)) if track =~ /(create|verify)/ is_expected.to have_body_text(message.invite_text) diff --git a/spec/services/namespaces/in_product_marketing_emails_service_spec.rb b/spec/services/namespaces/in_product_marketing_emails_service_spec.rb index de84666ca1d..b44c256802f 100644 --- a/spec/services/namespaces/in_product_marketing_emails_service_spec.rb +++ b/spec/services/namespaces/in_product_marketing_emails_service_spec.rb @@ -54,7 +54,6 @@ RSpec.describe Namespaces::InProductMarketingEmailsService, '#execute' do :team | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days, pipeline_created_at: frozen_time - 2.days, trial_started_at: frozen_time - 2.days } :team | 5 | { created_at: frozen_time - 6.days, git_write_at: frozen_time - 6.days, pipeline_created_at: frozen_time - 6.days, trial_started_at: frozen_time - 6.days } :team | 10 | { created_at: frozen_time - 11.days, git_write_at: frozen_time - 11.days, pipeline_created_at: frozen_time - 11.days, trial_started_at: frozen_time - 11.days } - :experience | 30 | { created_at: frozen_time - 31.days, git_write_at: frozen_time - 31.days } end with_them do |