diff --git a/.rubocop.yml b/.rubocop.yml index beb4b0afd87..29a0b7617e7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -474,6 +474,14 @@ Naming/PredicateName: Naming/RescuedExceptionsVariableName: Enabled: false +RSpec/AvoidTestProf: + Include: + - 'spec/migrations/**/*.rb' + - 'ee/spec/migrations/**/*.rb' + - 'spec/lib/gitlab/background_migration/**/*.rb' + - 'ee/spec/lib/gitlab/background_migration/**/*.rb' + - 'ee/spec/lib/ee/gitlab/background_migration/**/*.rb' + RSpec/FactoriesInMigrationSpecs: Enabled: true Include: diff --git a/.rubocop_todo/gitlab/strong_memoize_attr.yml b/.rubocop_todo/gitlab/strong_memoize_attr.yml index c1ba066a181..353ab9f721f 100644 --- a/.rubocop_todo/gitlab/strong_memoize_attr.yml +++ b/.rubocop_todo/gitlab/strong_memoize_attr.yml @@ -592,7 +592,6 @@ Gitlab/StrongMemoizeAttr: - 'lib/gitlab/ci/build/auto_retry.rb' - 'lib/gitlab/ci/build/cache.rb' - 'lib/gitlab/ci/build/context/base.rb' - - 'lib/gitlab/ci/build/context/build.rb' - 'lib/gitlab/ci/build/context/global.rb' - 'lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb' - 'lib/gitlab/ci/build/rules/rule/clause/changes.rb' @@ -620,10 +619,8 @@ Gitlab/StrongMemoizeAttr: - 'lib/gitlab/ci/pipeline/logger.rb' - 'lib/gitlab/ci/pipeline/metrics.rb' - 'lib/gitlab/ci/pipeline/quota/deployments.rb' - - 'lib/gitlab/ci/pipeline/seed/build.rb' - 'lib/gitlab/ci/pipeline/seed/pipeline.rb' - 'lib/gitlab/ci/pipeline/seed/processable/resource_group.rb' - - 'lib/gitlab/ci/pipeline/seed/stage.rb' - 'lib/gitlab/ci/project_config/auto_devops.rb' - 'lib/gitlab/ci/project_config/external_project.rb' - 'lib/gitlab/ci/project_config/parameter.rb' diff --git a/Gemfile b/Gemfile index ee53723abcb..a3149288203 100644 --- a/Gemfile +++ b/Gemfile @@ -522,7 +522,7 @@ gem 'grape_logging', '~> 1.8' gem 'gitlab-net-dns', '~> 0.9.1' # Countries list -gem 'countries', '~> 3.0' +gem 'countries', '~> 4.0.0' gem 'retriable', '~> 3.1.2' diff --git a/Gemfile.checksum b/Gemfile.checksum index 4d4d4a61329..252f27adcac 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -86,7 +86,7 @@ {"name":"contracts","version":"0.11.0","platform":"ruby","checksum":"df6e438efa89c31dd3095851c3f7a25dfdae36b35ff1d4547f1d92941b3c7286"}, {"name":"cork","version":"0.3.0","platform":"ruby","checksum":"a0a0ac50e262f8514d1abe0a14e95e71c98b24e3378690e5d044daf0013ad4bc"}, {"name":"cose","version":"1.0.0","platform":"ruby","checksum":"520ebaad97b56d2873de02ff4e2c973f5e77ce2f8edbda454af9ee3073643bc0"}, -{"name":"countries","version":"3.0.0","platform":"ruby","checksum":"ecb4287436f83f4bb098a9462828b145bec3143fa49e7ce5b1714d0ee5454770"}, +{"name":"countries","version":"4.0.1","platform":"ruby","checksum":"d32e8a3c0b22949f1a41ea6d9005f5168ffce226f8fe077d1d6be785fffa81c5"}, {"name":"crack","version":"0.4.3","platform":"ruby","checksum":"5318ba8cd9cf7e0b5feb38948048503ba4b1fdc1b6ff30a39f0a00feb6036b29"}, {"name":"crass","version":"1.0.6","platform":"ruby","checksum":"dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d"}, {"name":"creole","version":"0.5.0","platform":"ruby","checksum":"951701e2d80760f156b1cb2a93471ca97c076289becc067a33b745133ed32c03"}, @@ -283,7 +283,7 @@ {"name":"httparty","version":"0.20.0","platform":"ruby","checksum":"490d2a028a5accc611f1685d479d80ef80b129140d24a93c53c119f578614867"}, {"name":"httpclient","version":"2.8.3","platform":"ruby","checksum":"2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6"}, {"name":"i18n","version":"1.12.0","platform":"ruby","checksum":"91e3cc1b97616d308707eedee413d82ee021d751c918661fb82152793e64aced"}, -{"name":"i18n_data","version":"0.8.0","platform":"ruby","checksum":"92d942cc193dc4a54a95b68f44e52c79e024fa72e09f26a982bc61153b6f0c6c"}, +{"name":"i18n_data","version":"0.13.1","platform":"ruby","checksum":"e5aa99b09a69b463bb0443fc1f9540351a49f3d1541c5e91316bafa035c63f66"}, {"name":"icalendar","version":"2.8.0","platform":"ruby","checksum":"e404f970c7572bdebf6f09f9890970b68aab400ba9e609dc7d46098f28d0ee87"}, {"name":"ice_cube","version":"0.16.4","platform":"ruby","checksum":"da117e5de24bdc33931be629f9b55048641924442c7e9b72fedc05e5592531b7"}, {"name":"imagen","version":"0.1.8","platform":"ruby","checksum":"fde7b727d4fe79c6bb5ac46c1f7184bf87a6d54df54d712ad2be039d2f93a162"}, diff --git a/Gemfile.lock b/Gemfile.lock index 92e3527e871..f8eabba2d94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -290,10 +290,9 @@ GEM cose (1.0.0) cbor (~> 0.5.9) openssl-signature_algorithm (~> 0.4.0) - countries (3.0.0) - i18n_data (~> 0.8.0) + countries (4.0.1) + i18n_data (~> 0.13.0) sixarm_ruby_unaccent (~> 1.1) - unicode_utils (~> 1.4) crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.6) @@ -767,7 +766,7 @@ GEM httpclient (2.8.3) i18n (1.12.0) concurrent-ruby (~> 1.0) - i18n_data (0.8.0) + i18n_data (0.13.1) icalendar (2.8.0) ice_cube (~> 0.16) ice_cube (0.16.4) @@ -1612,7 +1611,7 @@ DEPENDENCIES commonmarker (~> 0.23.6) concurrent-ruby (~> 1.1) connection_pool (~> 2.0) - countries (~> 3.0) + countries (~> 4.0.0) creole (~> 0.5.0) crystalball (~> 0.7.0) cvss-suite (~> 3.0.1) diff --git a/app/assets/images/web-ide-promo-popover.svg b/app/assets/images/web-ide-promo-popover.svg new file mode 100644 index 00000000000..3ced89860da --- /dev/null +++ b/app/assets/images/web-ide-promo-popover.svg @@ -0,0 +1,101 @@ + diff --git a/app/assets/javascripts/ide/constants.js b/app/assets/javascripts/ide/constants.js index bfe4c3ac271..01ce5fa07ee 100644 --- a/app/assets/javascripts/ide/constants.js +++ b/app/assets/javascripts/ide/constants.js @@ -118,3 +118,5 @@ export const DEFAULT_BRANCH = 'main'; // Ping Usage Metrics Keys export const PING_USAGE_PREVIEW_KEY = 'web_ide_clientside_preview'; export const PING_USAGE_PREVIEW_SUCCESS_KEY = 'web_ide_clientside_preview_success'; + +export const GITLAB_WEB_IDE_FEEDBACK_ISSUE = 'https://gitlab.com/gitlab-org/gitlab/-/issues/377367'; diff --git a/app/assets/javascripts/ide/init_gitlab_web_ide.js b/app/assets/javascripts/ide/init_gitlab_web_ide.js index 5d50d2eec17..8a6965b6415 100644 --- a/app/assets/javascripts/ide/init_gitlab_web_ide.js +++ b/app/assets/javascripts/ide/init_gitlab_web_ide.js @@ -5,6 +5,7 @@ import { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_action'; import { createAndSubmitForm } from '~/lib/utils/create_and_submit_form'; import { getBaseConfig } from './lib/gitlab_web_ide/get_base_config'; import { setupRootElement } from './lib/gitlab_web_ide/setup_root_element'; +import { GITLAB_WEB_IDE_FEEDBACK_ISSUE } from './constants'; const buildRemoteIdeURL = (ideRemotePath, remoteHost, remotePathArg) => { const remotePath = cleanLeadingSeparator(remotePathArg); @@ -31,6 +32,10 @@ export const initGitlabWebIDE = async (el) => { nonce, projectPath, ref, + links: { + feedbackIssue: GITLAB_WEB_IDE_FEEDBACK_ISSUE, + userPreferences: el.dataset.userPreferencesPath, + }, async handleStartRemote({ remoteHost, remotePath, connectionToken }) { const confirmed = await confirmAction( __('Are you sure you want to leave the Web IDE? All unsaved changes will be lost.'), diff --git a/app/assets/javascripts/issues/list/components/issues_list_app.vue b/app/assets/javascripts/issues/list/components/issues_list_app.vue index d661ce67d88..cf672737254 100644 --- a/app/assets/javascripts/issues/list/components/issues_list_app.vue +++ b/app/assets/javascripts/issues/list/components/issues_list_app.vue @@ -22,8 +22,6 @@ import { OPERATORS_IS, OPERATORS_IS_NOT, OPERATORS_IS_NOT_OR, - OPTIONS_NONE_ANY, - TOKEN_TITLE_SEARCH_WITHIN, TOKEN_TITLE_ASSIGNEE, TOKEN_TITLE_AUTHOR, TOKEN_TITLE_CONFIDENTIAL, @@ -33,6 +31,7 @@ import { TOKEN_TITLE_MY_REACTION, TOKEN_TITLE_ORGANIZATION, TOKEN_TITLE_RELEASE, + TOKEN_TITLE_SEARCH_WITHIN, TOKEN_TITLE_TYPE, TOKEN_TYPE_ASSIGNEE, TOKEN_TYPE_AUTHOR, @@ -43,8 +42,8 @@ import { TOKEN_TYPE_MY_REACTION, TOKEN_TYPE_ORGANIZATION, TOKEN_TYPE_RELEASE, - TOKEN_TYPE_TYPE, TOKEN_TYPE_SEARCH_WITHIN, + TOKEN_TYPE_TYPE, } from '~/vue_shared/components/filtered_search_bar/constants'; import IssuableList from '~/vue_shared/issuable/list/components/issuable_list_root.vue'; import { IssuableListTabs, IssuableStates } from '~/vue_shared/issuable/list/constants'; @@ -165,7 +164,7 @@ export default { eeIsOkrsEnabled: { type: Boolean, required: false, - default: () => false, + default: false, }, }, data() { @@ -193,10 +192,7 @@ export default { return data[this.namespace]?.issues.nodes ?? []; }, result({ data }) { - if (!data) { - return; - } - this.pageInfo = data[this.namespace]?.issues.pageInfo ?? {}; + this.pageInfo = data?.[this.namespace]?.issues.pageInfo ?? {}; this.exportCsvPathWithQuery = this.getExportCsvPathWithQuery(); }, error(error) { @@ -327,7 +323,6 @@ export default { title: TOKEN_TITLE_AUTHOR, icon: 'pencil', token: AuthorToken, - dataType: 'user', defaultAuthors: [], operators: this.hasOrFeature ? OPERATORS_IS_NOT_OR : OPERATORS_IS_NOT, fetchAuthors: this.fetchUsers, @@ -339,8 +334,6 @@ export default { title: TOKEN_TITLE_ASSIGNEE, icon: 'user', token: AuthorToken, - dataType: 'user', - defaultAuthors: OPTIONS_NONE_ANY, operators: this.hasOrFeature ? OPERATORS_IS_NOT_OR : OPERATORS_IS_NOT, fetchAuthors: this.fetchUsers, recentSuggestionsStorageKey: `${this.fullPath}-issues-recent-tokens-assignee`, @@ -360,7 +353,6 @@ export default { title: TOKEN_TITLE_LABEL, icon: 'labels', token: LabelToken, - defaultLabels: OPTIONS_NONE_ANY, fetchLabels: this.fetchLabels, recentSuggestionsStorageKey: `${this.fullPath}-issues-recent-tokens-label`, }, @@ -417,7 +409,6 @@ export default { token: CrmContactToken, fullPath: this.fullPath, isProject: this.isProject, - defaultContacts: OPTIONS_NONE_ANY, recentSuggestionsStorageKey: `${this.fullPath}-issues-recent-tokens-crm-contacts`, operators: OPERATORS_IS, unique: true, @@ -432,7 +423,6 @@ export default { token: CrmOrganizationToken, fullPath: this.fullPath, isProject: this.isProject, - defaultOrganizations: OPTIONS_NONE_ANY, recentSuggestionsStorageKey: `${this.fullPath}-issues-recent-tokens-crm-organizations`, operators: OPERATORS_IS, unique: true, @@ -505,18 +495,17 @@ export default { eventHub.$off('issuables:toggleBulkEdit', this.toggleBulkEditSidebar); }, methods: { - fetchWithCache(path, cacheName, searchKey, search, wrapData = false) { + fetchWithCache(path, cacheName, searchKey, search) { if (this.cache[cacheName]) { const data = search ? fuzzaldrinPlus.filter(this.cache[cacheName], search, { key: searchKey }) : this.cache[cacheName].slice(0, MAX_LIST_SIZE); - return wrapData ? Promise.resolve({ data }) : Promise.resolve(data); + return Promise.resolve(data); } return axios.get(path).then(({ data }) => { this.cache[cacheName] = data; - const result = data.slice(0, MAX_LIST_SIZE); - return wrapData ? { data: result } : result; + return data.slice(0, MAX_LIST_SIZE); }); }, fetchEmojis(search) { @@ -580,8 +569,7 @@ export default { const bulkUpdateSidebar = await import('~/issuable'); bulkUpdateSidebar.initBulkUpdateSidebar('issuable_'); - const usersSelect = await import('~/users_select'); - const UsersSelect = usersSelect.default; + const UsersSelect = (await import('~/users_select')).default; new UsersSelect(); // eslint-disable-line no-new this.hasInitBulkEdit = true; @@ -594,8 +582,8 @@ export default { return; } - this.pageParams = getInitialPageParams(this.pageSize); this.state = state; + this.pageParams = getInitialPageParams(this.pageSize); this.$router.push({ query: this.urlParams }); }, @@ -604,7 +592,6 @@ export default { }, handleFilter(tokens) { this.setFilterTokens(tokens); - this.pageParams = getInitialPageParams(this.pageSize); this.$router.push({ query: this.urlParams }); @@ -673,8 +660,8 @@ export default { return; } - this.pageParams = getInitialPageParams(this.pageSize); this.sortKey = sortKey; + this.pageParams = getInitialPageParams(this.pageSize); if (this.isSignedIn) { this.saveSortPreference(sortKey); diff --git a/app/assets/javascripts/issues/list/constants.js b/app/assets/javascripts/issues/list/constants.js index 683a5955465..1e9c5810d38 100644 --- a/app/assets/javascripts/issues/list/constants.js +++ b/app/assets/javascripts/issues/list/constants.js @@ -200,9 +200,6 @@ export const filters = { [OPERATOR_IS]: { [NORMAL_FILTER]: 'in', }, - [OPERATOR_NOT]: { - [NORMAL_FILTER]: 'not[in]', - }, }, }, [TOKEN_TYPE_ASSIGNEE]: { diff --git a/app/assets/javascripts/jira_connect/subscriptions/constants.js b/app/assets/javascripts/jira_connect/subscriptions/constants.js index fc365746b54..01bc5dfc66b 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/constants.js +++ b/app/assets/javascripts/jira_connect/subscriptions/constants.js @@ -38,7 +38,7 @@ export const INTEGRATIONS_DOC_LINK = helpPagePath('integration/jira/development_ anchor: 'use-the-integration', }); export const OAUTH_SELF_MANAGED_DOC_LINK = helpPagePath('integration/jira/connect-app', { - anchor: 'install-the-gitlabcom-for-jira-cloud-app-for-self-managed-instances', + anchor: 'connect-the-gitlabcom-for-jira-cloud-app-for-self-managed-instances', }); export const GITLAB_COM_BASE_PATH = 'https://gitlab.com'; diff --git a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue index 5ff75e19425..7c6ff002014 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue @@ -5,10 +5,14 @@ import { s__ } from '~/locale'; import { reloadPage, persistBaseUrl, retrieveBaseUrl } from '~/jira_connect/subscriptions/utils'; import { updateInstallation, setApiBaseURL } from '~/jira_connect/subscriptions/api'; -import { I18N_UPDATE_INSTALLATION_ERROR_MESSAGE } from '~/jira_connect/subscriptions/constants'; +import { + GITLAB_COM_BASE_PATH, + I18N_UPDATE_INSTALLATION_ERROR_MESSAGE, +} from '~/jira_connect/subscriptions/constants'; import { SET_ALERT } from '~/jira_connect/subscriptions/store/mutation_types'; import SignInOauthButton from '../../../components/sign_in_oauth_button.vue'; +import SetupInstructions from './setup_instructions.vue'; import VersionSelectForm from './version_select_form.vue'; export default { @@ -16,12 +20,14 @@ export default { components: { GlButton, SignInOauthButton, + SetupInstructions, VersionSelectForm, }, data() { return { gitlabBasePath: null, loadingVersionSelect: false, + showSetupInstructions: false, }; }, computed: { @@ -37,6 +43,9 @@ export default { mounted() { this.gitlabBasePath = retrieveBaseUrl(); setApiBaseURL(this.gitlabBasePath); + if (this.gitlabBasePath !== GITLAB_COM_BASE_PATH) { + this.showSetupInstructions = true; + } }, methods: { ...mapMutations({ @@ -61,6 +70,9 @@ export default { this.loadingVersionSelect = false; }); }, + onSetupNext() { + this.showSetupInstructions = false; + }, onSignInError() { this.$emit('error'); }, @@ -88,19 +100,23 @@ export default { @submit="onVersionSelect" /> -
+ {{
+ s__(
+ 'JiraService|In order to complete the set up, you’ll need to complete a few steps in GitLab.',
+ )
+ }}
+