Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e7e74ca4
Commit
e7e74ca4
authored
May 14, 2021
by
Frédéric Caplette
Committed by
Jose Ivan Vargas
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify sentry for big pipeline graph
parent
6450fd5d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue
...ts/pipelines/components/graph/graph_component_wrapper.vue
+10
-8
app/assets/javascripts/pipelines/components/graph/utils.js
app/assets/javascripts/pipelines/components/graph/utils.js
+4
-3
app/assets/javascripts/pipelines/utils.js
app/assets/javascripts/pipelines/utils.js
+9
-0
No files found.
app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue
View file @
e7e74ca4
...
...
@@ -7,7 +7,7 @@ import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import
{
DEFAULT
,
DRAW_FAILURE
,
LOAD_FAILURE
}
from
'
../../constants
'
;
import
DismissPipelineGraphCallout
from
'
../../graphql/mutations/dismiss_pipeline_notification.graphql
'
;
import
getUserCallouts
from
'
../../graphql/queries/get_user_callouts.query.graphql
'
;
import
{
reportToSentry
}
from
'
../../utils
'
;
import
{
reportToSentry
,
reportMessageToSentry
}
from
'
../../utils
'
;
import
{
listByLayers
}
from
'
../parsing_utils
'
;
import
{
IID_FAILURE
,
LAYER_VIEW
,
STAGE_VIEW
,
VIEW_TYPE_KEY
}
from
'
./constants
'
;
import
PipelineGraph
from
'
./graph_component.vue
'
;
...
...
@@ -109,14 +109,16 @@ export default {
},
error
(
err
)
{
this
.
reportFailure
({
type
:
LOAD_FAILURE
,
skipSentry
:
true
});
reportToSentry
(
reportMessageToSentry
(
this
.
$options
.
name
,
`| type:
${
LOAD_FAILURE
}
|
| rawError:
${
JSON
.
stringify
(
err
)}
|
| info:
${
serializeLoadErrors
(
err
)}
|
| graphqlResourceEtag:
${
this
.
graphqlResourceEtag
}
|
| projectPath:
${
this
.
projectPath
}
|
| iid:
${
this
.
pipelineIid
}
|`
,
`| type:
${
LOAD_FAILURE
}
, info:
${
serializeLoadErrors
(
err
)}
`
,
{
projectPath
:
this
.
projectPath
,
pipelineIid
:
this
.
pipelineIid
,
pipelineStages
:
this
.
pipeline
?.
stages
?.
length
||
0
,
nbOfDownstreams
:
this
.
pipeline
?.
downstream
?.
length
||
0
,
},
);
},
result
({
error
})
{
...
...
app/assets/javascripts/pipelines/components/graph/utils.js
View file @
e7e74ca4
import
{
isEmpty
}
from
'
lodash
'
;
import
Visibility
from
'
visibilityjs
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
unwrapStagesWithNeedsAndLookup
}
from
'
../unwrapping_utils
'
;
...
...
@@ -39,15 +40,15 @@ const serializeGqlErr = (gqlError) => {
const
serializeLoadErrors
=
(
errors
)
=>
{
const
{
gqlError
,
graphQLErrors
,
networkError
,
message
}
=
errors
;
if
(
graphQLErrors
)
{
if
(
!
isEmpty
(
graphQLErrors
)
)
{
return
graphQLErrors
.
map
((
err
)
=>
serializeGqlErr
(
err
)).
join
(
'
;
'
);
}
if
(
gqlError
)
{
if
(
!
isEmpty
(
gqlError
)
)
{
return
serializeGqlErr
(
gqlError
);
}
if
(
networkError
)
{
if
(
!
isEmpty
(
networkError
)
)
{
return
`Network error:
${
networkError
.
message
}
`
;
}
...
...
app/assets/javascripts/pipelines/utils.js
View file @
e7e74ca4
...
...
@@ -73,3 +73,12 @@ export const reportToSentry = (component, failureType) => {
Sentry
.
captureException
(
failureType
);
});
};
export
const
reportMessageToSentry
=
(
component
,
message
,
context
)
=>
{
Sentry
.
withScope
((
scope
)
=>
{
// eslint-disable-next-line @gitlab/require-i18n-strings
scope
.
setContext
(
'
Vue data
'
,
context
);
scope
.
setTag
(
'
component
'
,
component
);
Sentry
.
captureMessage
(
message
);
});
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment