Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 03:09:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 03:09:31 +0300
commite70cf9a65919abc7042672ee544dbf2ccb1e2a9e (patch)
tree81f4092b260250879e7eda0bca10faaa9ec4f338 /app
parent3e308768fd9306a49bb0149ca3636e8e8285485d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue12
-rw-r--r--app/assets/javascripts/pipelines/components/graph_shared/links_inner.vue7
-rw-r--r--app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue4
-rw-r--r--app/assets/stylesheets/vendors/atwho.scss5
-rw-r--r--app/models/ci/build.rb5
-rw-r--r--app/presenters/packages/composer/packages_presenter.rb2
6 files changed, 25 insertions, 10 deletions
diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue b/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue
index f596333237d..afe4dfb9c8d 100644
--- a/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue
+++ b/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue
@@ -2,7 +2,7 @@
import { GlAlert, GlLoadingIcon } from '@gitlab/ui';
import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql';
import { __ } from '~/locale';
-import { DEFAULT, LOAD_FAILURE } from '../../constants';
+import { DEFAULT, DRAW_FAILURE, LOAD_FAILURE } from '../../constants';
import PipelineGraph from './graph_component.vue';
import { unwrapPipelineData, toggleQueryPollingByVisibility, reportToSentry } from './utils';
@@ -29,6 +29,7 @@ export default {
};
},
errorTexts: {
+ [DRAW_FAILURE]: __('An error ocurred while drawing job relationship links.'),
[LOAD_FAILURE]: __('We are currently unable to fetch data for this pipeline.'),
[DEFAULT]: __('An unknown error occurred while loading this graph.'),
},
@@ -53,6 +54,11 @@ export default {
computed: {
alert() {
switch (this.alertType) {
+ case DRAW_FAILURE:
+ return {
+ text: this.$options.errorTexts[DRAW_FAILURE],
+ variant: 'danger',
+ };
case LOAD_FAILURE:
return {
text: this.$options.errorTexts[LOAD_FAILURE],
@@ -88,8 +94,8 @@ export default {
},
reportFailure(type) {
this.showAlert = true;
- this.failureType = type;
- reportToSentry(this.$options.name, this.failureType);
+ this.alertType = type;
+ reportToSentry(this.$options.name, this.alertType);
},
},
};
diff --git a/app/assets/javascripts/pipelines/components/graph_shared/links_inner.vue b/app/assets/javascripts/pipelines/components/graph_shared/links_inner.vue
index 289e04e02c5..a7fad1c57b0 100644
--- a/app/assets/javascripts/pipelines/components/graph_shared/links_inner.vue
+++ b/app/assets/javascripts/pipelines/components/graph_shared/links_inner.vue
@@ -2,6 +2,7 @@
import { isEmpty } from 'lodash';
import { DRAW_FAILURE } from '../../constants';
import { createJobsHash, generateJobNeedsDict } from '../../utils';
+import { reportToSentry } from '../graph/utils';
import { parseData } from '../parsing_utils';
import { generateLinksData } from './drawing_utils';
@@ -87,6 +88,9 @@ export default {
this.$emit('highlightedJobsChange', jobs);
},
},
+ errorCaptured(err, _vm, info) {
+ reportToSentry(this.$options.name, `error: ${err}, info: ${info}`);
+ },
mounted() {
if (!isEmpty(this.pipelineData)) {
this.prepareLinkData();
@@ -101,8 +105,9 @@ export default {
const arrayOfJobs = this.pipelineData.flatMap(({ groups }) => groups);
const parsedData = parseData(arrayOfJobs);
this.links = generateLinksData(parsedData, this.containerId, `-${this.pipelineId}`);
- } catch {
+ } catch (err) {
this.$emit('error', DRAW_FAILURE);
+ reportToSentry(this.$options.name, err);
}
},
getLinkClasses(link) {
diff --git a/app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue b/app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue
index 1c1bc7ecb2a..af3a3f0adff 100644
--- a/app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue
+++ b/app/assets/javascripts/pipelines/components/graph_shared/links_layer.vue
@@ -1,6 +1,7 @@
<script>
import { GlAlert } from '@gitlab/ui';
import { __ } from '~/locale';
+import { reportToSentry } from '../graph/utils';
import LinksInner from './links_inner.vue';
export default {
@@ -50,6 +51,9 @@ export default {
);
},
},
+ errorCaptured(err, _vm, info) {
+ reportToSentry(this.$options.name, `error: ${err}, info: ${info}`);
+ },
methods: {
dismissAlert() {
this.alertDismissed = true;
diff --git a/app/assets/stylesheets/vendors/atwho.scss b/app/assets/stylesheets/vendors/atwho.scss
index f31dbbeafe8..b92331facee 100644
--- a/app/assets/stylesheets/vendors/atwho.scss
+++ b/app/assets/stylesheets/vendors/atwho.scss
@@ -1,6 +1,7 @@
.atwho-view {
overflow-y: auto;
overflow-x: hidden;
+ max-width: calc(100% - 6px);
.name,
small.aliases,
@@ -80,10 +81,6 @@
}
@include media-breakpoint-down(xs) {
- .atwho-view-ul {
- width: 350px;
- }
-
.atwho-view ul li {
overflow: hidden;
text-overflow: ellipsis;
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index db151126caf..d072bced639 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -564,7 +564,10 @@ module Ci
end
def features
- { trace_sections: true }
+ {
+ trace_sections: true,
+ failure_reasons: self.class.failure_reasons.keys
+ }
end
def merge_request
diff --git a/app/presenters/packages/composer/packages_presenter.rb b/app/presenters/packages/composer/packages_presenter.rb
index ed0e9d3b731..381cf2dd2c9 100644
--- a/app/presenters/packages/composer/packages_presenter.rb
+++ b/app/presenters/packages/composer/packages_presenter.rb
@@ -11,7 +11,7 @@ module Packages
end
def root
- path = api_v4_group___packages_composer_package_name_path({ id: @group.id, package_name: '%package%$%hash%', format: '.json' }, true)
+ path = expose_path(api_v4_group___packages_composer_package_name_path({ id: @group.id, package_name: '%package%$%hash%', format: '.json' }, true))
{ 'packages' => [], 'provider-includes' => { 'p/%hash%.json' => { 'sha256' => provider_sha } }, 'providers-url' => path }
end