Skip to content
Snippets Groups Projects
Commit 00df932c authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@12-8-stable-ee

parent 3455664e
No related branches found
No related tags found
No related merge requests found
Showing
with 143 additions and 21 deletions
<!-- Instructions: Use this template for a proof of concept or when a deeper technical evaluation is required. Please weigh tech evaluation issues and follow the instructions below accordingly. -->
### Topic to Evaluate
<!-- Describe the related issue and challenge we need to establish a proof of concept for-->
* [Link to other Issue](link)
### Tasks to Evaluate
<!-- Outline the tasks with issues that you need evaluate as a part of the implementation issue -->
- [ ] Add task
- [ ] Add task
- [ ] Add task
### Risks and Implementation Considerations
<!-- Idenitfy any risks found in the research, whether this is performance, impacts to other functionality or other bugs -->
### Team
- [ ] Add ~"workflow::planning breakdown" ~feature and the corresponding `~devops::<stage>` and `~group::<group>` labels.
- [ ] Ping the PM and EM.
<script>
import $ from 'jquery';
import '~/behaviors/markdown/render_gfm';
import { GlLink, GlLoadingIcon } from '@gitlab/ui';
import { handleLocationHash } from '~/lib/utils/common_utils';
import getReadmeQuery from '../../queries/getReadme.query.graphql';
 
export default {
Loading
Loading
@@ -30,6 +33,16 @@ export default {
loading: 0,
};
},
watch: {
readme(newVal) {
if (newVal) {
this.$nextTick(() => {
handleLocationHash();
$(this.$refs.readme).renderGFM();
});
}
},
},
};
</script>
 
Loading
Loading
@@ -45,7 +58,7 @@ export default {
</div>
<div class="blob-viewer">
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
<div v-else-if="readme" v-html="readme.html"></div>
<div v-else-if="readme" ref="readme" v-html="readme.html"></div>
</div>
</article>
</template>
Loading
Loading
@@ -58,7 +58,7 @@ module IncidentManagement
end
 
def issue_description
horizontal_line = "\n---\n\n"
horizontal_line = "\n\n---\n\n"
 
[
alert_summary,
Loading
Loading
---
title: Time series extends axis options correctly
merge_request: 25399
author:
type: fixed
---
title: Fix "Edit Release" page
merge_request: 25469
author:
type: fixed
---
title: Fix markdown layout of incident issues
merge_request: 25352
author:
type: fixed
---
title: Fix upgrade failure in EE displaying license
merge_request: 25788
author:
type: fixed
Loading
Loading
@@ -10,7 +10,7 @@ Gitlab.ee do
end
 
# Needed to run migration
if Gitlab::Database.cached_table_exists?('licenses')
if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('licenses')
message = LicenseHelper.license_message(signed_in: true, is_admin: true, in_html: false)
if ::License.block_changes? && message.present?
warn "WARNING: #{message}"
Loading
Loading
Loading
Loading
@@ -388,6 +388,11 @@ Each request to view a resource in a private site is authenticated by Pages
using that token. For each request it receives, it makes a request to the GitLab
API to check that the user is authorized to read that site.
 
From [GitLab 12.8](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/3689) onwards,
Access Control parameters for Pages are set in a configuration file, which
by convention is named `gitlab-pages-config`. The configuration file is passed to
pages using the `-config flag` or CONFIG environment variable.
Pages access control is disabled by default. To enable it:
 
1. Modify your `config/gitlab.yml` file:
Loading
Loading
@@ -402,13 +407,14 @@ Pages access control is disabled by default. To enable it:
This should be called `GitLab Pages` and have a `Redirect URL` of
`https://projects.example.io/auth`. It does not need to be a "trusted"
application, but it does need the `api` scope.
1. Start the Pages daemon with the following additional arguments:
1. Start the Pages daemon by passing a configuration file with the following arguments:
 
```shell
-auth-client-secret <OAuth code generated by GitLab> \
-auth-redirect-uri http://projects.example.io/auth \
-auth-secret <40 random hex characters> \
-auth-server <URL of the GitLab instance>
auth-client-id=<OAuth Application ID generated by GitLab>
auth-client-secret=<OAuth code generated by GitLab>
auth-redirect-uri='http://projects.example.io/auth'
auth-secret=<40 random hex characters>
auth-server=<URL of the GitLab instance>
```
 
1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core).
Loading
Loading
doc/user/project/integrations/img/prometheus_dashboard_environments_v12_8.png

7.25 KiB

doc/user/project/integrations/img/prometheus_monitoring_dashboard_v12_8.png

29 KiB

Loading
Loading
@@ -55,6 +55,17 @@ will help you to quickly create a deployment:
1. Navigate to your project's **CI/CD > Pipelines** page, and run a pipeline on any branch.
1. When the pipeline has run successfully, graphs will be available on the **Operations > Metrics** page.
 
![Monitoring Dashboard](img/prometheus_monitoring_dashboard_v12_8.png)
#### Using the Metrics Dashboard
##### Select an environment
The **Environment** dropdown box above the dashboard displays the list of all [environments](#monitoring-cicd-environments).
It enables you to search as you type through all environments and select the one you're looking for.
![Monitoring Dashboard Environments](img/prometheus_dashboard_environments_v12_8.png)
#### About managed Prometheus deployments
 
Prometheus is deployed into the `gitlab-managed-apps` namespace, using the [official Helm chart](https://github.com/helm/charts/tree/master/stable/prometheus). Prometheus is only accessible within the cluster, with GitLab communicating through the [Kubernetes API](https://kubernetes.io/docs/concepts/overview/kubernetes-api/).
Loading
Loading
@@ -198,18 +209,23 @@ supported and will not be available in the UI.
 
#### Duplicating a GitLab-defined dashboard
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/37238) in GitLab 12.7.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/37238) in GitLab 12.7.
> - From [GitLab 12.8 onwards](https://gitlab.com/gitlab-org/gitlab/issues/39505), custom metrics are also duplicated when you duplicate a dashboard.
 
You can save a copy of a GitLab defined dashboard that can be customized and adapted to your project. You can decide to save the dashboard new `.yml` file in the project's **default** branch or in a newly created branch with a name of your choosing.
You can save a complete copy of a GitLab defined dashboard along with all custom metrics added to it.
Resulting `.yml` file can be customized and adapted to your project.
You can decide to save the dashboard `.yml` file in the project's **default** branch or in a
new branch.
 
1. Click on the "Duplicate dashboard" in the dashboard dropdown.
1. Click **Duplicate dashboard** in the dashboard dropdown.
 
NOTE: **Note:**
Only GitLab-defined dashboards can be duplicated.
You can duplicate only GitLab-defined dashboards.
 
1. Input the file name and other information, such as a new commit message, and click on "Duplicate".
1. Enter the file name and other information, such as the new commit's message, and click **Duplicate**.
 
If you select your **default** branch, the new dashboard will become immediately available. If you select another branch, this branch should be merged to your **default** branch first.
If you select your **default** branch, the new dashboard becomes immediately available.
If you select another branch, this branch should be merged to your **default** branch first.
 
#### Dashboard YAML properties
 
Loading
Loading
Loading
Loading
@@ -165,7 +165,7 @@ module Gitlab
helpers :before_script, :script, :stage, :type, :after_script,
:cache, :image, :services, :only, :except, :variables,
:artifacts, :environment, :coverage, :retry, :rules,
:parallel, :needs, :interruptible, :release
:parallel, :needs, :interruptible, :release, :tags
 
attributes :script, :tags, :allow_failure, :when, :dependencies,
:needs, :retry, :parallel, :extends, :start_in, :rules,
Loading
Loading
@@ -242,6 +242,7 @@ module Gitlab
services: services_value,
stage: stage_value,
cache: cache_value,
tags: tags_value,
only: only_value,
except: except_value,
rules: has_rules? ? rules_value : nil,
Loading
Loading
import { shallowMount } from '@vue/test-utils';
import { GlLoadingIcon } from '@gitlab/ui';
import { handleLocationHash } from '~/lib/utils/common_utils';
import Preview from '~/repository/components/preview/index.vue';
 
jest.mock('~/lib/utils/common_utils');
let vm;
let $apollo;
 
Loading
Loading
@@ -38,6 +41,22 @@ describe('Repository file preview component', () => {
});
});
 
it('handles hash after render', () => {
factory({
webUrl: 'http://test.com',
name: 'README.md',
});
vm.setData({ readme: { html: '<div class="blob">test</div>' } });
return vm.vm
.$nextTick()
.then(vm.vm.$nextTick())
.then(() => {
expect(handleLocationHash).toHaveBeenCalled();
});
});
it('renders loading icon', () => {
factory({
webUrl: 'http://test.com',
Loading
Loading
Loading
Loading
@@ -87,6 +87,29 @@ module Gitlab
end
end
 
describe 'tags entry with default values' do
it 'applies default values' do
config = YAML.dump({ default: { tags: %w[A B] },
rspec: { script: "rspec" } })
config_processor = Gitlab::Ci::YamlProcessor.new(config)
expect(config_processor.stage_builds_attributes("test").size).to eq(1)
expect(config_processor.stage_builds_attributes("test").first).to eq({
stage: "test",
stage_idx: 2,
name: "rspec",
only: { refs: %w[branches tags] },
options: { script: ["rspec"] },
scheduling_type: :stage,
tag_list: %w[A B],
allow_failure: false,
when: "on_success",
yaml_variables: []
})
end
end
describe 'interruptible entry' do
describe 'interruptible job' do
let(:config) do
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ require 'spec_helper'
 
describe IncidentManagement::CreateIssueService do
let(:project) { create(:project, :repository, :private) }
let(:user) { User.alert_bot }
let_it_be(:user) { User.alert_bot }
let(:service) { described_class.new(project, alert_payload) }
let(:alert_starts_at) { Time.now }
let(:alert_title) { 'TITLE' }
Loading
Loading
@@ -29,7 +29,6 @@ describe IncidentManagement::CreateIssueService do
 
context 'when create_issue enabled' do
let(:issue) { subject[:issue] }
let(:summary_separator) { "\n---\n\n" }
 
before do
setting.update!(create_issue: true)
Loading
Loading
@@ -42,7 +41,7 @@ describe IncidentManagement::CreateIssueService do
expect(issue.author).to eq(user)
expect(issue.title).to eq(alert_title)
expect(issue.description).to include(alert_presenter.issue_summary_markdown.strip)
expect(separator_count(issue.description)).to eq 0
expect(separator_count(issue.description)).to eq(0)
end
end
 
Loading
Loading
@@ -74,7 +73,7 @@ describe IncidentManagement::CreateIssueService do
expect(subject).to include(status: :success)
 
expect(issue.description).to include(alert_presenter.issue_summary_markdown)
expect(separator_count(issue.description)).to eq 1
expect(separator_count(issue.description)).to eq(1)
expect(issue.description).to include(template_content)
end
end
Loading
Loading
@@ -134,7 +133,7 @@ describe IncidentManagement::CreateIssueService do
expect(issue.description).to include(alert_presenter.issue_summary_markdown)
expect(issue.description).to include(template_content)
expect(issue.description).to include(alt_template)
expect(separator_count(issue.description)).to eq 2
expect(separator_count(issue.description)).to eq(2)
end
end
 
Loading
Loading
@@ -171,7 +170,7 @@ describe IncidentManagement::CreateIssueService do
expect(issue.title).to include(query_title)
expect(issue.title).to include('for 5 minutes')
expect(issue.description).to include(alert_presenter.issue_summary_markdown.strip)
expect(separator_count(issue.description)).to eq 0
expect(separator_count(issue.description)).to eq(0)
end
end
 
Loading
Loading
@@ -306,6 +305,8 @@ describe IncidentManagement::CreateIssueService do
end
 
def separator_count(text)
summary_separator = "\n\n---\n\n"
text.scan(summary_separator).size
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment