Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-11-23 06:09:38 +00:00
parent a0ebcf42d2
commit 45205f0db5
10 changed files with 58 additions and 14 deletions

View File

@ -1,5 +1,6 @@
<script>
import { mapActions, mapState } from 'vuex';
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale';
import Terminal from './terminal.vue';
import { isEndingStatus } from '../../stores/modules/terminal/utils';
@ -7,6 +8,7 @@ import { isEndingStatus } from '../../stores/modules/terminal/utils';
export default {
components: {
Terminal,
GlButton,
},
computed: {
...mapState('terminal', ['session']),
@ -14,15 +16,17 @@ export default {
if (isEndingStatus(this.session.status)) {
return {
action: () => this.restartSession(),
variant: 'info',
category: 'primary',
text: __('Restart Terminal'),
class: 'btn-primary',
};
}
return {
action: () => this.stopSession(),
variant: 'danger',
category: 'secondary',
text: __('Stop Terminal'),
class: 'btn-inverted btn-remove',
};
},
},
@ -37,15 +41,13 @@ export default {
<header class="ide-job-header d-flex align-items-center">
<h5>{{ __('Web Terminal') }}</h5>
<div class="ml-auto align-self-center">
<button
<gl-button
v-if="actionButton"
type="button"
class="btn btn-sm"
:class="actionButton.class"
:variant="actionButton.variant"
:category="actionButton.category"
@click="actionButton.action"
>{{ actionButton.text }}</gl-button
>
{{ actionButton.text }}
</button>
</div>
</header>
<terminal :terminal-path="session.terminalPath" :status="session.status" />

View File

@ -0,0 +1,5 @@
---
title: Drop unused feature_filter_type experiment column
merge_request: 48221
author:
type: deprecated

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
class DropFeatureFilterTypeFromUserPreferences < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
with_lock_retries do
remove_column :user_preferences, :feature_filter_type
end
end
def down
with_lock_retries do
add_column :user_preferences, :feature_filter_type, :bigint
end
end
end

View File

@ -0,0 +1 @@
9684403a075bd1ddf3ae9290ad9a39ed24f4624d99498f8b8ed567588c15e082

View File

@ -16907,7 +16907,6 @@ CREATE TABLE user_preferences (
setup_for_company boolean,
render_whitespace_in_code boolean,
tab_width smallint,
feature_filter_type bigint,
experience_level smallint,
view_diffs_file_by_file boolean DEFAULT false NOT NULL,
gitpod_enabled boolean DEFAULT false NOT NULL

View File

@ -128,7 +128,7 @@ always take the latest Secret Detection artifact available.
### Post-processing
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/46390) in GitLab 13.6.
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4639) in GitLab 13.6.
Upon detection of a secret, GitLab supports post processing hooks. These can be used to take actions like notifying the cloud service who issued the secret. The cloud provider can confirm the credentials and take remediation actions like revoking or reissuing a new secret and notifying the creator of the secret. Post-processing workflows vary by supported cloud providers.

View File

@ -98,6 +98,10 @@ module QA
# Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab/issues/4252
options.add_argument("disable-dev-shm-usage") if QA::Runtime::Env.running_in_ci?
# Specify the user-agent to allow challenges to be bypassed
# See https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/11938
options.add_argument("user-agent=#{QA::Runtime::Env.user_agent}") if QA::Runtime::Env.user_agent
end
# Use the same profile on QA runs if CHROME_REUSE_PROFILE is true.

View File

@ -395,6 +395,10 @@ module QA
ENV['DEPLOY_VERSION']
end
def user_agent
ENV['GITLAB_QA_USER_AGENT']
end
private
def remote_grid_credentials

View File

@ -1,4 +1,5 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import Vuex from 'vuex';
import TerminalSession from '~/ide/components/terminal/session.vue';
import Terminal from '~/ide/components/terminal/terminal.vue';
@ -38,6 +39,8 @@ describe('IDE TerminalSession', () => {
});
};
const findButton = () => wrapper.find(GlButton);
beforeEach(() => {
state = {
session: { status: RUNNING, terminalPath: TEST_TERMINAL_PATH },
@ -69,8 +72,8 @@ describe('IDE TerminalSession', () => {
state.session = { status };
factory();
const button = wrapper.find('button');
button.trigger('click');
const button = findButton();
button.vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(button.text()).toEqual('Stop Terminal');
@ -84,8 +87,8 @@ describe('IDE TerminalSession', () => {
state.session = { status };
factory();
const button = wrapper.find('button');
button.trigger('click');
const button = findButton();
button.vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(button.text()).toEqual('Restart Terminal');

View File

@ -143,6 +143,11 @@ RSpec.describe Gitlab::Gpg do
end
it 'keeps track of created and removed keychains in counters' do
# Gitlab::Gpg may be memoizing stale counters if a preceding spec resets the Prometheus registry
# https://gitlab.com/gitlab-org/gitlab/-/issues/286874
described_class.remove_instance_variable(:@tmp_keychains_created)
described_class.remove_instance_variable(:@tmp_keychains_removed)
created = Gitlab::Metrics.counter(:gpg_tmp_keychains_created_total, 'The number of temporary GPG keychains')
removed = Gitlab::Metrics.counter(:gpg_tmp_keychains_removed_total, 'The number of temporary GPG keychains')