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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-23 09:09:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-23 09:09:38 +0300
commit45205f0db533235111ac4e14032b395e76b526be (patch)
treeefc32f75692424f5b9228b9135ae916238dccf0f
parenta0ebcf42d29ee1272f2ebcbbde900b4832a241a2 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/ide/components/terminal/session.vue18
-rw-r--r--changelogs/unreleased/270409-experiment-cleanup-drop-feature-filter-type-column.yml5
-rw-r--r--db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb21
-rw-r--r--db/schema_migrations/202011200713031
-rw-r--r--db/structure.sql1
-rw-r--r--doc/user/application_security/secret_detection/index.md2
-rw-r--r--qa/qa/runtime/browser.rb4
-rw-r--r--qa/qa/runtime/env.rb4
-rw-r--r--spec/frontend/ide/components/terminal/session_spec.js11
-rw-r--r--spec/lib/gitlab/gpg_spec.rb5
10 files changed, 58 insertions, 14 deletions
diff --git a/app/assets/javascripts/ide/components/terminal/session.vue b/app/assets/javascripts/ide/components/terminal/session.vue
index a8fe9ea6866..0e67a2ab45f 100644
--- a/app/assets/javascripts/ide/components/terminal/session.vue
+++ b/app/assets/javascripts/ide/components/terminal/session.vue
@@ -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" />
diff --git a/changelogs/unreleased/270409-experiment-cleanup-drop-feature-filter-type-column.yml b/changelogs/unreleased/270409-experiment-cleanup-drop-feature-filter-type-column.yml
new file mode 100644
index 00000000000..b8a6cee8249
--- /dev/null
+++ b/changelogs/unreleased/270409-experiment-cleanup-drop-feature-filter-type-column.yml
@@ -0,0 +1,5 @@
+---
+title: Drop unused feature_filter_type experiment column
+merge_request: 48221
+author:
+type: deprecated
diff --git a/db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb b/db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb
new file mode 100644
index 00000000000..b00ea0aba76
--- /dev/null
+++ b/db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb
@@ -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
diff --git a/db/schema_migrations/20201120071303 b/db/schema_migrations/20201120071303
new file mode 100644
index 00000000000..23d712c9993
--- /dev/null
+++ b/db/schema_migrations/20201120071303
@@ -0,0 +1 @@
+9684403a075bd1ddf3ae9290ad9a39ed24f4624d99498f8b8ed567588c15e082 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 98183be2dd4..51d030cb032 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -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
diff --git a/doc/user/application_security/secret_detection/index.md b/doc/user/application_security/secret_detection/index.md
index 025a37f684d..5eba0fa44ba 100644
--- a/doc/user/application_security/secret_detection/index.md
+++ b/doc/user/application_security/secret_detection/index.md
@@ -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.
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index 2bd0c6ae00e..a3fce8bff88 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -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.
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 4c4dd416093..54b670485eb 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -395,6 +395,10 @@ module QA
ENV['DEPLOY_VERSION']
end
+ def user_agent
+ ENV['GITLAB_QA_USER_AGENT']
+ end
+
private
def remote_grid_credentials
diff --git a/spec/frontend/ide/components/terminal/session_spec.js b/spec/frontend/ide/components/terminal/session_spec.js
index ce61a31691a..3ca37166ac4 100644
--- a/spec/frontend/ide/components/terminal/session_spec.js
+++ b/spec/frontend/ide/components/terminal/session_spec.js
@@ -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');
diff --git a/spec/lib/gitlab/gpg_spec.rb b/spec/lib/gitlab/gpg_spec.rb
index 72c6c8efb5e..66ce2d5cb8a 100644
--- a/spec/lib/gitlab/gpg_spec.rb
+++ b/spec/lib/gitlab/gpg_spec.rb
@@ -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')