diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 12:07:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 12:07:55 +0000 |
commit | 5e11c9b77cb1b2b77ee29359047b55807afe255d (patch) | |
tree | 40b02dead6acdcaab9cc15efc9ae4710c2ed78a8 /lib | |
parent | 97d4d926630822d0e1a638206909679c962d2f0a (diff) | |
download | gitlab-ce-5e11c9b77cb1b2b77ee29359047b55807afe255d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/pipeline/seed/build.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/error_tracking/detailed_error.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/import_export/import_export.yml | 1 | ||||
-rw-r--r-- | lib/gitlab/import_export/relation_tree_restorer.rb | 2 | ||||
-rw-r--r-- | lib/sentry/client.rb | 10 |
5 files changed, 14 insertions, 2 deletions
diff --git a/lib/gitlab/ci/pipeline/seed/build.rb b/lib/gitlab/ci/pipeline/seed/build.rb index dce56b22666..590c7f4d1dd 100644 --- a/lib/gitlab/ci/pipeline/seed/build.rb +++ b/lib/gitlab/ci/pipeline/seed/build.rb @@ -10,7 +10,7 @@ module Gitlab delegate :dig, to: :@seed_attributes # When the `ci_dag_limit_needs` is enabled it uses the lower limit - LOW_NEEDS_LIMIT = 5 + LOW_NEEDS_LIMIT = 10 HARD_NEEDS_LIMIT = 50 def initialize(pipeline, attributes, previous_stages) diff --git a/lib/gitlab/error_tracking/detailed_error.rb b/lib/gitlab/error_tracking/detailed_error.rb index 8438df2bbf8..169d6c03f12 100644 --- a/lib/gitlab/error_tracking/detailed_error.rb +++ b/lib/gitlab/error_tracking/detailed_error.rb @@ -15,6 +15,7 @@ module Gitlab :first_seen, :frequency, :gitlab_project, + :gitlab_issue, :id, :last_release_last_commit, :last_release_short_version, diff --git a/lib/gitlab/import_export/import_export.yml b/lib/gitlab/import_export/import_export.yml index 64bf40b50c2..b3a1d472e73 100644 --- a/lib/gitlab/import_export/import_export.yml +++ b/lib/gitlab/import_export/import_export.yml @@ -29,6 +29,7 @@ tree: - :priorities - :issue_assignees - :zoom_meetings + - :sentry_issue - snippets: - :award_emoji - notes: diff --git a/lib/gitlab/import_export/relation_tree_restorer.rb b/lib/gitlab/import_export/relation_tree_restorer.rb index 15d1f8a8148..8a2b0cab915 100644 --- a/lib/gitlab/import_export/relation_tree_restorer.rb +++ b/lib/gitlab/import_export/relation_tree_restorer.rb @@ -94,7 +94,7 @@ module Gitlab relation_index: relation_index, exception_class: exception.class.to_s, exception_message: exception.message.truncate(255), - correlation_id_value: Labkit::Correlation::CorrelationId.current_id + correlation_id_value: Labkit::Correlation::CorrelationId.current_or_new_id ) end diff --git a/lib/sentry/client.rb b/lib/sentry/client.rb index 450695aa545..6cbee830b17 100644 --- a/lib/sentry/client.rb +++ b/lib/sentry/client.rb @@ -233,6 +233,15 @@ module Sentry stack_trace_entry.dig('stacktrace', 'frames') end + def parse_gitlab_issue(plugin_issues) + return unless plugin_issues + + gitlab_plugin = plugin_issues.detect { |item| item['id'] == 'gitlab' } + return unless gitlab_plugin + + gitlab_plugin.dig('issue', 'url') + end + def map_to_detailed_error(issue) Gitlab::ErrorTracking::DetailedError.new( id: issue.fetch('id'), @@ -252,6 +261,7 @@ module Sentry project_id: issue.dig('project', 'id'), project_name: issue.dig('project', 'name'), project_slug: issue.dig('project', 'slug'), + gitlab_issue: parse_gitlab_issue(issue.fetch('pluginIssues', nil)), first_release_last_commit: issue.dig('firstRelease', 'lastCommit'), last_release_last_commit: issue.dig('lastRelease', 'lastCommit'), first_release_short_version: issue.dig('firstRelease', 'shortVersion'), |