diff options
490 files changed, 2996 insertions, 2367 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 623e5d0acb9..8922c5b4938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,316 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 12.0.0 (2019-06-22) + +### Security (10 changes) + +- Hide confidential issue title on unsubscribe for anonymous users. +- Fix url redaction for issue links. +- Fix confidential issue label disclosure on milestone view. +- Filter relative links in wiki for XSS. +- Prevent XSS injection in note imports. +- Resolve: Milestones leaked via search API. +- Prevent bypass of restriction disabling web password sign in. +- Add extra fields for handling basic auth on import by url page. +- Protect Gitlab::HTTP against DNS rebinding attack. +- Prevent invalid branch for merge request. + +### Removed (5 changes, 1 of them is from the community) + +- Remove ability for group clusters to be automatically configured on creation. !27245 +- Removes support for AUTO_DEVOPS_DOMAIN. !28460 +- Remove the circuit breaker API. !28669 +- Make Kubernetes service templates readonly. !29044 +- Remove Content-Type override for Mattermost OAuth login. (Harrison Healey) + +### Fixed (116 changes, 28 of them are from the community) + +- Fix col-sm-* in forms to keep layout. !24885 (Takuya Noguchi) +- Avoid 500 when rendering users ATOM data. !25408 +- Fix flyout nav on small viewports. !25998 +- Fix proxy support in Container Scanning. !27246 +- preventing blocked users and their PipelineSchdules from creating new Pipelines. !27318 +- Fix yaml linting for GitLab CI inside project (.gitlab/ci) *.yml files and CI template files. !27576 (Will Hall) +- Fix yaml linting for project root *.yml files. !27579 (Will Hall) +- Added a content field to atom feed. !27652 +- Bring secondary button styles up to design standard. !27920 +- Use FindOrCreateService to create labels and check for existing ones. !27987 (Matt Duren) +- Fix "too many loops" error by handling gracefully cron schedules for non existent days. !28002 +- Handle errors in successful notes reply. !28082 +- Fix 500 error when accessing charts with an anonymous user. !28091 (Diego Silva) +- Allow user to set primary email first when 2FA is required. !28097 (Kartikey Tanna) +- Auto-DevOps: allow to disable rollout status check. !28130 (Sergej Nikolaev <kinolaev@gmail.com>) +- Resolved JIRA service: NoMethodError: undefined method 'find' for nil:NilClass. !28206 +- Supports Matomo/Piwik string website ID ("Protect Track ID" plugin). !28214 (DUVERGIER Claude) +- Fix loading.. dropdown at search field. !28275 (Pavel Chausov) +- Remove unintended error message shown when moving issues. !28317 +- Properly clear the merge error upon rebase failure. !28319 +- Upgrade dependencies for node 12 compatibility. !28323 +- Fix. `db:migrate` is failed on MySQL 8. !28351 (sue445) +- Fix an error in projects admin when statistics are missing. !28355 +- Fix emojis URLs. !28371 +- Prevent common name collisions when requesting multiple Let's Encrypt certificates concurrently. !28373 +- Fix issue that causes "Save changes" button in project settings pages to be enabled/disabled incorrectly when changes are made to the form. !28377 +- Fix diff notes and discussion notes being exported as regular notes. !28401 +- Fix padding in MR widget. !28472 +- Updates loading icon in commits page. !28475 +- Fix border radius of discussions. !28490 +- Update broadcast message action icons. !28496 (Jarek Ostrowski @jareko) +- Update icon color to match design system, pass accessibility. !28498 (Jarek Ostrowski @jareko) +- Show data on Cycle Analytics page when value is less than a second. !28507 +- Fix dropdown position when loading remote data. !28526 +- Delete unauthorized Todos when project is made private. !28560 +- Change links in system notes to use relative paths. !28588 (Luke Picciau) +- Update favicon from next. !28601 (Jarek Ostrowski @jareko) +- Open visibility help link in a new tab. !28603 (George Tsiolis) +- Fix issue importing members with owner access. !28636 +- Fix the height of the page headers on issues/merge request/snippets pages. !28650 (Erik van der Gaag) +- Always show "Pipelines must succeed" checkbox. !28651 +- Resolve moving an issue results in broken image links in comments. !28654 +- Fix milestone references containing &, <, or >. !28667 +- Add hover and focus to Attach a file. !28682 +- Correctly word-wrapping project descriptions with very long words. !28695 (Erik van der Gaag) +- Prevent icons from shrinking in User popover when contents exceed container. !28696 +- Allow removal of empty lines via suggestions. !28703 +- Throw an error when formatDate's input is invalid. !28713 +- Fix order dependency with user params during imports. !28719 +- Fix search dropdown not closing on blur if empty. !28730 +- Fixed ignored postgres version that occurs after the first autodevops deploy when specifying custom $POSTGRES_VERSION. !28735 (Brandon Dimcheff) +- Limit milestone dates to before year 9999. !28742 (Luke Picciau) +- Set project default visibility to max allowed. !28754 +- Cancel auto merge when merge request is closed. !28782 +- Fixes Ref link being displayed as raw HTML in the Pipelines page. !28823 +- Fix job name in graph dropdown overflowing. !28824 +- Add style to disable webkit icons for search inputs. !28833 (Jarek Ostrowski @jareko) +- Fix email notifications for user excluded actions. !28835 +- Resolve Tooltip Consistency. !28839 +- Fix Merge Request merge checkbox alignment on mobile view. !28845 +- Add referenced-commands in no overflow list. !28858 +- Fix participants list wrapping. !28873 +- Excludes MR author from Review roulette. !28886 (Jacopo Beschi @jacopo-beschi) +- Give labels consistent weight. !28895 +- Added padding to time window dropdown in monitor dashboard. !28897 +- Move text under p tag. !28901 +- Resolve Position is off when visiting files with anchors. !28913 +- Fix whitespace changes visibility when the related file was initially collapsed. !28950 (Ondřej Budai) +- Fix emoji picker visibility issue. !28984 +- Resolve Merge request discussion text jumps when resolved. !28995 +- Allow lowercase prefix for Youtrack issue ids. !29057 (Matthias Baur) +- Add support to view entirety of long branch name in dropdown instead of it being cut off. !29069 +- Fix inconsistent option dropdown button height to match adjacent button. !29096 +- Improve new user email markup unconsistency between text and html parts. !29111 (Haunui Saint-sevin) +- Eliminate color inconsistencies in metric graphs. !29127 +- Avoid setting Gitlab::Session on sessionless requests and Git HTTP. !29146 +- Use the selected time window for metrics dashboard. !29152 +- Remove build policies from serverless app template. !29253 +- Fix serverless apps deployments by bumping 'tm' version. !29254 +- Include the port in the URLs of the API Link headers. !29267 +- Fix Fogbugz Importer not working. !29383 +- Fix GPG signature verification with recent GnuPG versions. !29388 (David Palubin) +- Cancel Auto Merge when target branch is changed. !29416 +- Fix nil coercion updating storage size on project statistics. !29425 +- Ignore legacy artifact columns in Project Import/Export. !29427 +- Avoid DB timeouts when scheduling migrations. !29437 +- Handle encoding errors for MergeToRefService. !29440 +- Fix UTF-8 conversion issues when resolving conflicts. !29453 +- Enlarge metrics time-window dropdown links. !29458 +- Remove unnecessary decimals on Metrics chart axis. !29468 +- Fix scrolling to top on assignee change. !29500 +- Allow command/control click to open link in new tab on Merge Request tabs. !29506 +- Omit blocked admins from repository check e-mails. !29507 +- Fix diverged branch locals. !29508 +- Process up to 100 commit messages for references when pushing to a new default branch. !29511 (Fabio Papa) +- Allow developer role to delete docker tags via container registry API. !29512 +- Fix "Resolve conflicts" button not appearing for some users. !29535 +- Fix: propagate all documented ENV vars to CI when using SAST. !29564 +- AutoDevops function ensure_namespace() now explicitly tests the namespace. !29567 (Jack Lei) +- Fix sidebar flyout navigation. !29571 +- Fix missing deployment rockets in monitor dashboard. !29574 +- Fix inability to set visibility_level on project via API. !29578 +- Ensure a Kubernetes namespace is not used for deployments if there is no service account token associated with it. !29643 +- Refresh service_account_token for kubernetes_namespaces. !29657 +- Expose all current events properly on services API. !29736 (Zsolt Kovari) +- Move Dropdown to Stick to MR View App Button. !29767 +- Fix IDE commit using latest ref in branch and overriding contents. !29769 +- Revert concurrent pipeline creation for pipeline schedules. !29794 +- Fix layout of group milestone header. +- Fix remote mirrors not updating after tag push. +- Fix padding of unclickable pipeline dropdown items to match links. +- Change resolve button text to mark comment as resolved. +- Align system note within discussion with other notes. +- Fix border radii on diff files and repo files. +- Fixed show whitespace button not refetching diff content. +- Fix pipeline schedules when owner is nil. + +### Changed (35 changes, 13 of them are from the community) + +- Include information if issue was clossed via merge request or commit. !15610 (Michał Zając) +- Removes duplicated members from api/projects/:id/members/all. !24005 (Jacopo Beschi @jacopo-beschi) +- Apply the group setting "require 2FA" across all subgroup members as well when changing the group setting. !24965 (rroger) +- Enable function features for external Knative installations. !27173 +- Remove dind from DAST template. !28083 +- Update registration form to indicate invalid name or username length on input. !28095 (Jiaan Louw) +- Default masked to false for new variables. !28186 +- Better isolated `Docker.gitlab-ci.yml` to avoid interference with other job configurations. !28213 (lrkwz) +- Remove the mr_push_options feature flag. !28278 +- Replace Oxygen-Sans font with Noto Sans. !28322 +- Update new smiley icons, find n replace old names with new ones. !28338 (Jarek Ostrowski) +- Adds a text label to color pickers to improve accessibility. !28343 (Chris Toynbee) +- Prioritize login form on mobile breakpoint. !28360 +- Move some project routes under /-/ scope. !28435 +- I18n for issue closure reason in emails. !28489 (Michał Zając) +- Geo: Remove Gitlab::LfsToken::LegacyRedisDeviseToken implementation and usage. !28546 +- Add check circle filled icon for resolved comments. !28663 +- Update project security dashboard documentation. !28681 +- Remove `docker pull` prefix when copying a tag from the registry. !28757 (Benedikt Franke) +- Adjust milestone completion rate to be based on issues count. !28777 +- Enhance line-height of Activity feed UI. !28856 (Jacopo Beschi @jacopo-beschi) +- Upgrade to Gitaly v1.43.0. !28867 +- Do not display Update app button when saving Knative domain name. !28904 +- Rebrush of flash-warning according to the new design (brighter background and darker font). !28916 (Michel Engelen) +- Added reference, web_path, and relative_position fields to GraphQL Issue. !28998 +- Change logic behind cycle analytics. !29018 +- Add documentation links for confidental and locked discussions. !29073 +- Update GITALY_SERVER_VERSION to 1.45.0. !29109 +- Allow masking if 8 or more characters in base64. !29143 (thomas-nilsson-irfu) +- Replaces sidekiq mtail metrics with ruby instrumentation metrics. !29215 +- Allow references to labels and milestones to contain emoji. !29284 +- changed the styles on `Add List` dropdown to look more like the EE vesion. !29338 (Michel Engelen) +- Hashed Storage is enabled by default on new installations. !29586 +- Upgrade to Gitaly v1.47.0. !29789 +- Default MR checkbox to true in most cases. + +### Performance (11 changes) + +- Improve performance of jobs controller. !28093 +- Upgrade Ruby version to 2.6.3. !28117 +- Make pipeline schedule worker resilient. !28407 +- Fix performance issue with large Markdown content in issue or merge request description. !28597 +- Improve clone performance by using delta islands. !28871 +- Reduce Gitaly calls to improve performance when rendering suggestions. !29027 +- Use Redis for CacheMarkDownField on non AR models. !29054 +- Add index on public_email for users. !29430 +- Speed up commit loads by disabling BatchLoader replace_methods. !29633 +- Add index on invite_email for members. !29768 +- Improve performance of users autocomplete when there are lots of results. + +### Added (47 changes, 12 of them are from the community) + +- Added option to filter jobs by age in the /job/request API endpoint. !1340 (Dmitry Chepurovskiy) +- Add ability to define notification email addresses for groups you belong to. !25299 +- Add wiki size to project statistics. !25321 (Peter Marko) +- 58404 - setup max depth for GraphQL. !25737 (Ken Ding) +- Add auto SSL toggle option to Pages domain settings page. !26438 +- Empty project state for Web IDE. !26556 +- Add support for multiple job parents in GitLab CI YAML. !26801 (Wolphin (Nikita)) +- Pass user's identity and token from JupyterHub to user's Jupyter environment. !27314 (Amit Rathi) +- Add issues_statistics api endpoints and extend issues search api. !27366 +- Validate Kubernetes credentials at cluster creation. !27403 +- Update the merge request widget's "Merge" button to support merge trains. !27594 +- Style the toast component according to design specs. !27734 +- Add API support for committing changes to different projects in same fork network. !27915 +- Add support for && and || to CI Pipeline Expressions. Change CI variable expression matching for Lexeme::Pattern to eagerly return tokens. !27925 (Martin Manelli) +- Added ref querystring parameter to project search API to allow searching on branches/tags other than the default. !28069 (Lee Tickett) +- Add notify_only_default_branch option to PipelinesEmailService. !28271 (Peter Marko) +- Support multiplex GraphQL queries. !28273 +- Add Namespace and ProjectStatistics to GraphQL API. !28277 +- Display classname JUnit attribute in report modal. !28376 +- API: Allow to get and set "masked" attribute for variables. !28381 (Mathieu Parent) +- Add allow_failure attribute to Job API. !28406 +- Add support for AsciiDoc include directive. !28417 (Jakub Jirutka & Guillaume Grossetie) +- Migrate Kubernetes service integration templates to clusters. !28534 +- Allow issue list to be sorted by relative order. !28566 +- Implement borderless discussion design with new reply field. !28580 +- Add expand/collapse to error tracking settings. !28619 +- Adds collapsible sections for job log. !28642 +- Add LFS oid to GraphQL blob type. !28666 +- Allow users to specify a time range on metrics dashboard. !28670 +- Add a New Copy Button That Works in Modals. !28676 +- Add Kubernetes logs to Admin Logs UI. !28685 +- Set up git client in Jupyter installtion. !28783 (Amit Rathi) +- Add task count and completed count to responses of Issue and MR. !28859 +- Add project level git depth CI/CD setting. !28919 +- Use global IDs when exposing GraphQL resources. !29080 +- Expose wiki_size on GraphQL API. !29123 +- Expose notes and discussions in GraphQL. !29212 +- Use to 'gitlabktl' build serverless applications. !29258 +- Adds pagination component for graphql api. !29277 +- Allow switching clusters between managed and unmanaged. !29322 +- Get and edit ci_default_git_depth via project API. !29353 +- Link to an external dashboard from metrics dashboard. !29369 +- Add labels to note event payload. !29384 (Sujay Patel) +- Add Join meeting button to issues with Zoom links. !29454 +- Make task completion status available via GraphQL. +- Add backtraces to Peek performance bar for SQL calls. +- Added diff suggestion feature discovery popover. + +### Other (62 changes, 14 of them are from the community) + +- Unified EE/CS differences in repository/show.html. !13562 +- Remove legacy artifact related code. !26475 +- Backport the EE schema and migrations to CE. !26940 (Yorick Peterse) +- Add dedicated logging for GraphQL queries. !27885 +- i18n: externalize strings from user profile settings. !28088 (Antony Liu) +- Omit max-count for diverging_commit_counts behind feature flag. !28157 +- Fix alignment of resend button in members page. !28202 +- Update indirect dependency fsevents from 1.2.4 to 1.2.9. !28220 (Takuya Noguchi) +- Update get_process_mem to 0.2.3. !28248 +- Add Pool repository to the usage ping. !28267 +- Forbid NULL in project_statistics.packages_size. !28400 +- Update Gitaly to v1.42.1. !28425 +- Upgrade babel to 7.4.4. !28437 (Takuya Noguchi) +- Externalize profiles preferences. !28470 (George Tsiolis) +- Update GitLab Runner Helm Chart to 0.5.0. !28497 +- Change collapse icon size to size of profile picture. !28512 +- Resolve Snippet icon button is misaligned. !28522 +- Bumps Kubernetes in Auto DevOps to 1.11.10. !28525 +- Bump Helm version in Auto-DevOps.gitlab-ci.yml to 2.14.0. !28527 +- Migrate the monitoring dashboard store to vuex. !28555 +- Give New Snippet button green outline. !28559 +- Removes project_auto_devops#domain column. !28574 +- Externalize strings of email page in user profile. !28587 (antony liu) +- Externalize strings of active sessions page in user profile. !28590 (antony liu) +- Refactor and abstract Auto Merge Processes. !28595 +- Add section to dev docs on accessing chatops. !28623 +- Externalize strings of chat page in user profile. !28632 +- Externalize strings of PGP Keys and SSH Keys page in user profile. !28653 (Antony Liu) +- Added the `.extended-height` class to the labels-dropdown. !28659 (Michel Engelen) +- Moved EE/CE code differences for `app/assets/javascripts/gl_dropdown.js` into CE. !28711 (Michel Engelen) +- Update GitLab Runner Helm Chart to 0.5.1. !28720 +- Remove support for using Geo with an installation from source. !28737 +- API: change masked attribute type to Boolean. !28758 +- API: change protected attribute type to Boolean. !28766 +- Add a column header to admin/jobs page. !28837 +- Reset merge status from mergeable MRs. !28843 +- Show tooltip on truncated commit title. !28865 (Timofey Trofimov) +- Added conditional rendering to `app/views/search/_form.html.haml` for CE/EE code base consistency. !28883 (Michel Engelen) +- Change "Report abuse to GitLab" to more generic wording. !28884 (Marc Schwede) +- Update GitLab Pages to v1.6.0. !29048 +- Update GitLab Runner Helm Chart to 0.5.2. !29050 +- User link styling for commits. !29150 +- Fix null source_project_id in pool_repositories. !29157 +- Add deletion protection setting column to application_settings table. !29268 +- Added code differnces from EE in file 'app/assets/javascripts/pages/projects/project.js' to CE. !29271 (Michel Engelen) +- Update to GitLab Shell v9.3.0. !29283 +- Document when milestones and labels links are missing. !29355 +- Make margin between buttons consistent. !29378 +- Changed the 'Created' label to 'Last Updated' on the container registry table to more accurately reflect what the date represents. !29464 +- Update GitLab Pages to v1.6.1. !29559 +- Indent collapsible sections. !29804 +- Group download buttons into a .btn-group. +- Change default color of award emoji button. +- Use blue for activity stream links; use monospace font for commit sha. +- Remove fixed height from MR diff headers. +- Moves the table pagination shared component. +- Add warning that gitlab-secrets isn't included in backup. +- Update merge request tabs so they no longer scroll. +- Reduce height of issue board input to align with buttons. +- Increase height of move issue dropdown. +- Use grid and correct border radius for status badge. +- Moves snowplow to CE repo. + + ## 11.11.3 (2019-06-10) ### Fixed (5 changes) diff --git a/Gemfile.lock b/Gemfile.lock index b03bd58eacc..4881faac0e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -770,7 +770,7 @@ GEM retriable (3.1.2) rinku (2.0.0) rotp (2.1.2) - rouge (3.3.0) + rouge (3.4.1) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) @@ -1 +1 @@ -12.0.0-pre +12.1.0-pre diff --git a/app/assets/javascripts/environments/components/container.vue b/app/assets/javascripts/environments/components/container.vue index f8a637138ad..426bb63d4f7 100644 --- a/app/assets/javascripts/environments/components/container.vue +++ b/app/assets/javascripts/environments/components/container.vue @@ -57,6 +57,7 @@ export default { :user-callouts-path="userCalloutsPath" :lock-promotion-svg-path="lockPromotionSvgPath" :help-canary-deployments-path="helpCanaryDeploymentsPath" + :deploy-boards-help-path="deployBoardsHelpPath" /> <table-pagination diff --git a/app/assets/javascripts/environments/components/environments_app.vue b/app/assets/javascripts/environments/components/environments_app.vue index ec78240217b..81927d18f8b 100644 --- a/app/assets/javascripts/environments/components/environments_app.vue +++ b/app/assets/javascripts/environments/components/environments_app.vue @@ -43,6 +43,11 @@ export default { type: String, required: true, }, + deployBoardsHelpPath: { + type: String, + required: false, + default: '', + }, }, created() { @@ -112,6 +117,7 @@ export default { :user-callouts-path="userCalloutsPath" :lock-promotion-svg-path="lockPromotionSvgPath" :help-canary-deployments-path="helpCanaryDeploymentsPath" + :deploy-boards-help-path="deployBoardsHelpPath" @onChangePage="onChangePage" > <empty-state diff --git a/app/assets/javascripts/environments/components/environments_table.vue b/app/assets/javascripts/environments/components/environments_table.vue index 55613d815ce..4464f5e5578 100644 --- a/app/assets/javascripts/environments/components/environments_table.vue +++ b/app/assets/javascripts/environments/components/environments_table.vue @@ -22,6 +22,11 @@ export default { required: true, default: () => [], }, + deployBoardsHelpPath: { + type: String, + required: false, + default: '', + }, canReadEnvironment: { type: Boolean, required: false, @@ -106,8 +111,10 @@ export default { <div class="deploy-board-container"> <deploy-board :deploy-board-data="model.deployBoardData" + :deploy-boards-help-path="deployBoardsHelpPath" :is-loading="model.isLoadingDeployBoard" :is-empty="model.isEmptyDeployBoard" + :has-legacy-app-label="model.hasLegacyAppLabel" :logs-path="model.logs_path" /> </div> diff --git a/app/assets/javascripts/environments/index.js b/app/assets/javascripts/environments/index.js index b53d42f202b..dcdaf8731f8 100644 --- a/app/assets/javascripts/environments/index.js +++ b/app/assets/javascripts/environments/index.js @@ -20,6 +20,7 @@ export default () => endpoint: environmentsData.environmentsDataEndpoint, newEnvironmentPath: environmentsData.newEnvironmentPath, helpPagePath: environmentsData.helpPagePath, + deployBoardsHelpPath: environmentsData.deployBoardsHelpPath, cssContainerClass: environmentsData.cssClass, canCreateEnvironment: parseBoolean(environmentsData.canCreateEnvironment), canReadEnvironment: parseBoolean(environmentsData.canReadEnvironment), @@ -31,6 +32,7 @@ export default () => endpoint: this.endpoint, newEnvironmentPath: this.newEnvironmentPath, helpPagePath: this.helpPagePath, + deployBoardsHelpPath: this.deployBoardsHelpPath, cssContainerClass: this.cssContainerClass, canCreateEnvironment: this.canCreateEnvironment, canReadEnvironment: this.canReadEnvironment, diff --git a/app/assets/javascripts/environments/mixins/container_mixin.js b/app/assets/javascripts/environments/mixins/container_mixin.js index f2907c120f8..abf7d33be91 100644 --- a/app/assets/javascripts/environments/mixins/container_mixin.js +++ b/app/assets/javascripts/environments/mixins/container_mixin.js @@ -25,5 +25,10 @@ export default { required: false, default: null, }, + deployBoardsHelpPath: { + type: String, + required: false, + default: '', + }, }, }; diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js index 0af9aabd8cf..3b73dd83c9f 100644 --- a/app/assets/javascripts/gfm_auto_complete.js +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -201,9 +201,7 @@ class GfmAutoComplete { const autoCompleteAvatar = m.avatar_url || m.username.charAt(0).toUpperCase(); const rectAvatarClass = m.type === GROUP_TYPE ? 'rect-avatar' : ''; - const imgAvatar = `<img src="${m.avatar_url}" alt="${ - m.username - }" class="avatar ${rectAvatarClass} avatar-inline center s26"/>`; + const imgAvatar = `<img src="${m.avatar_url}" alt="${m.username}" class="avatar ${rectAvatarClass} avatar-inline center s26"/>`; const txtAvatar = `<div class="avatar ${rectAvatarClass} center avatar-inline s26">${autoCompleteAvatar}</div>`; return { diff --git a/app/assets/javascripts/groups_select.js b/app/assets/javascripts/groups_select.js index a1263d1cdab..f1cc6756583 100644 --- a/app/assets/javascripts/groups_select.js +++ b/app/assets/javascripts/groups_select.js @@ -77,9 +77,7 @@ export default function groupsSelect() { } }, formatResult(object) { - return `<div class='group-result'> <div class='group-name'>${ - object.full_name - }</div> <div class='group-path'>${object.full_path}</div> </div>`; + return `<div class='group-result'> <div class='group-name'>${object.full_name}</div> <div class='group-path'>${object.full_path}</div> </div>`; }, formatSelection(object) { return object.full_name; diff --git a/app/assets/javascripts/ide/stores/modules/commit/actions.js b/app/assets/javascripts/ide/stores/modules/commit/actions.js index ff1255ce749..01ca6a6b12f 100644 --- a/app/assets/javascripts/ide/stores/modules/commit/actions.js +++ b/app/assets/javascripts/ide/stores/modules/commit/actions.js @@ -63,9 +63,7 @@ export const setLastCommitMessage = ({ commit, rootGetters }, data) => { const commitMsg = sprintf( __('Your changes have been committed. Commit %{commitId} %{commitStats}'), { - commitId: `<a href="${currentProject.web_url}/commit/${data.short_id}" class="commit-sha">${ - data.short_id - }</a>`, + commitId: `<a href="${currentProject.web_url}/commit/${data.short_id}" class="commit-sha">${data.short_id}</a>`, commitStats, }, false, @@ -215,9 +213,7 @@ export const commitChanges = ({ commit, state, getters, dispatch, rootState, roo if (rootGetters.activeFile) { router.push( - `/project/${rootState.currentProjectId}/blob/${getters.branchName}/-/${ - rootGetters.activeFile.path - }`, + `/project/${rootState.currentProjectId}/blob/${getters.branchName}/-/${rootGetters.activeFile.path}`, ); } } diff --git a/app/assets/javascripts/jobs/components/environments_block.vue b/app/assets/javascripts/jobs/components/environments_block.vue index f7fbb9503a0..132e50e5715 100644 --- a/app/assets/javascripts/jobs/components/environments_block.vue +++ b/app/assets/javascripts/jobs/components/environments_block.vue @@ -86,9 +86,7 @@ export default { return sprintf( '%{startLink}%{name}%{endLink}', { - startLink: `<a href="${ - this.deploymentStatus.environment.environment_path - }" class="js-environment-link">`, + startLink: `<a href="${this.deploymentStatus.environment.environment_path}" class="js-environment-link">`, name: _.escape(this.deploymentStatus.environment.name), endLink: '</a>', }, diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index a7156bd2406..9cc31e26648 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -1284,9 +1284,7 @@ export default class Notes { putConflictEditWarningInPlace(noteEntity, $note) { if ($note.find('.js-conflict-edit-warning').length === 0) { - const open_link = `<a href="#note_${ - noteEntity.id - }" target="_blank" rel="noopener noreferrer">`; + const open_link = `<a href="#note_${noteEntity.id}" target="_blank" rel="noopener noreferrer">`; const $alert = $(`<div class="js-conflict-edit-warning alert alert-danger"> ${sprintf( s__( diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index b95835ed10a..54c242b2fda 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -7,6 +7,8 @@ import { GlSkeletonLoading } from '@gitlab/ui'; import { getDiffMode } from '~/diffs/store/utils'; import { diffViewerModes } from '~/ide/constants'; +const FIRST_CHAR_REGEX = /^(\+|-| )/; + export default { components: { DiffFileHeader, @@ -59,6 +61,9 @@ export default { this.error = true; }); }, + trimChar(line) { + return line.replace(FIRST_CHAR_REGEX, ''); + }, }, userColorSchemeClass: window.gon.user_color_scheme, }; @@ -83,7 +88,7 @@ export default { > <td :class="line.type" class="diff-line-num old_line">{{ line.old_line }}</td> <td :class="line.type" class="diff-line-num new_line">{{ line.new_line }}</td> - <td :class="line.type" class="line_content" v-html="line.rich_text"></td> + <td :class="line.type" class="line_content" v-html="trimChar(line.rich_text)"></td> </tr> </template> <tr v-if="!hasTruncatedDiffLines" class="line_holder line-holder-placeholder"> diff --git a/app/assets/javascripts/pages/profiles/two_factor_auths/index.js b/app/assets/javascripts/pages/profiles/two_factor_auths/index.js index 10cd8ecfbc9..820f0f7f12d 100644 --- a/app/assets/javascripts/pages/profiles/two_factor_auths/index.js +++ b/app/assets/javascripts/pages/profiles/two_factor_auths/index.js @@ -6,9 +6,7 @@ document.addEventListener('DOMContentLoaded', () => { const twoFactorNode = document.querySelector('.js-two-factor-auth'); const skippable = parseBoolean(twoFactorNode.dataset.twoFactorSkippable); if (skippable) { - const button = `<a class="btn btn-sm btn-warning float-right" data-method="patch" href="${ - twoFactorNode.dataset.two_factor_skip_url - }">Configure it later</a>`; + const button = `<a class="btn btn-sm btn-warning float-right" data-method="patch" href="${twoFactorNode.dataset.two_factor_skip_url}">Configure it later</a>`; const flashAlert = document.querySelector('.flash-alert .container-fluid'); if (flashAlert) flashAlert.insertAdjacentHTML('beforeend', button); } diff --git a/app/assets/javascripts/pages/projects/pages_domains/form.js b/app/assets/javascripts/pages/projects/pages_domains/form.js index 1d0dbfe0406..cef8e92610c 100644 --- a/app/assets/javascripts/pages/projects/pages_domains/form.js +++ b/app/assets/javascripts/pages/projects/pages_domains/form.js @@ -5,14 +5,6 @@ export default () => { if (toggleContainer) { const onToggleButtonClicked = isAutoSslEnabled => { - Array.from(document.querySelectorAll('.js-shown-if-auto-ssl')).forEach(el => { - if (isAutoSslEnabled) { - el.classList.remove('d-none'); - } else { - el.classList.add('d-none'); - } - }); - Array.from(document.querySelectorAll('.js-shown-unless-auto-ssl')).forEach(el => { if (isAutoSslEnabled) { el.classList.add('d-none'); @@ -21,14 +13,6 @@ export default () => { } }); - Array.from(document.querySelectorAll('.js-enabled-if-auto-ssl')).forEach(el => { - if (isAutoSslEnabled) { - el.removeAttribute('disabled'); - } else { - el.setAttribute('disabled', 'disabled'); - } - }); - Array.from(document.querySelectorAll('.js-enabled-unless-auto-ssl')).forEach(el => { if (isAutoSslEnabled) { el.setAttribute('disabled', 'disabled'); diff --git a/app/assets/javascripts/registry/components/app.vue b/app/assets/javascripts/registry/components/app.vue index 9af5660f764..ee973017387 100644 --- a/app/assets/javascripts/registry/components/app.vue +++ b/app/assets/javascripts/registry/components/app.vue @@ -33,7 +33,7 @@ export default { </script> <template> <div> - <gl-loading-icon v-if="isLoading" :size="3" /> + <gl-loading-icon v-if="isLoading" size="md" /> <collapsible-container v-for="item in repos" @@ -45,7 +45,7 @@ export default { <p v-else-if="!isLoading && !repos.length"> {{ __(`No container images stored for this project. -Add one by following the instructions above.`) + Add one by following the instructions above.`) }} </p> </div> diff --git a/app/assets/javascripts/registry/components/collapsible_container.vue b/app/assets/javascripts/registry/components/collapsible_container.vue index 5451c61026c..1e266dd4ced 100644 --- a/app/assets/javascripts/registry/components/collapsible_container.vue +++ b/app/assets/javascripts/registry/components/collapsible_container.vue @@ -1,6 +1,6 @@ <script> import { mapActions } from 'vuex'; -import { GlLoadingIcon, GlButton, GlTooltipDirective } from '@gitlab/ui'; +import { GlLoadingIcon, GlButton, GlTooltipDirective, GlModal, GlModalDirective } from '@gitlab/ui'; import createFlash from '../../flash'; import ClipboardButton from '../../vue_shared/components/clipboard_button.vue'; import Icon from '../../vue_shared/components/icon.vue'; @@ -16,9 +16,11 @@ export default { GlLoadingIcon, GlButton, Icon, + GlModal, }, directives: { GlTooltip: GlTooltipDirective, + GlModal: GlModalDirective, }, props: { repo: { @@ -37,7 +39,7 @@ export default { }, }, methods: { - ...mapActions(['fetchRepos', 'fetchList', 'deleteRepo']), + ...mapActions(['fetchRepos', 'fetchList', 'deleteItem']), toggleRepo() { this.isOpen = !this.isOpen; @@ -46,7 +48,7 @@ export default { } }, handleDeleteRepository() { - this.deleteRepo(this.repo) + this.deleteItem(this.repo) .then(() => { createFlash(__('This container registry has been scheduled for deletion.'), 'notice'); this.fetchRepos(); @@ -78,18 +80,18 @@ export default { <gl-button v-if="repo.canDelete" v-gl-tooltip + v-gl-modal="'confirm-repo-deletion-modal'" :title="s__('ContainerRegistry|Remove repository')" :aria-label="s__('ContainerRegistry|Remove repository')" class="js-remove-repo" variant="danger" - @click="handleDeleteRepository" > <icon name="remove" /> </gl-button> </div> </div> - <gl-loading-icon v-if="repo.isLoading" :size="2" class="append-bottom-20" /> + <gl-loading-icon v-if="repo.isLoading" size="md" class="append-bottom-20" /> <div v-else-if="!repo.isLoading && isOpen" class="container-image-tags"> <table-registry v-if="repo.list.length" :repo="repo" /> @@ -98,5 +100,24 @@ export default { {{ s__('ContainerRegistry|No tags in Container Registry for this container image.') }} </div> </div> + + <gl-modal + modal-id="confirm-repo-deletion-modal" + ok-variant="danger" + @ok="handleDeleteRepository" + > + <template v-slot:modal-title>{{ s__('ContainerRegistry|Remove repository') }}</template> + <p + v-html=" + sprintf( + s__( + 'ContainerRegistry|You are about to remove repository <b>%{title}</b>. Once you confirm, this repository will be permanently deleted.', + ), + { title: repo.name }, + ) + " + ></p> + <template v-slot:modal-ok>{{ __('Remove') }}</template> + </gl-modal> </div> </template> diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue index f535b2ae9f2..0ec5e2c7a87 100644 --- a/app/assets/javascripts/registry/components/table_registry.vue +++ b/app/assets/javascripts/registry/components/table_registry.vue @@ -1,6 +1,6 @@ <script> import { mapActions } from 'vuex'; -import { GlButton, GlTooltipDirective } from '@gitlab/ui'; +import { GlButton, GlTooltipDirective, GlModal, GlModalDirective } from '@gitlab/ui'; import { n__ } from '../../locale'; import createFlash from '../../flash'; import ClipboardButton from '../../vue_shared/components/clipboard_button.vue'; @@ -16,9 +16,11 @@ export default { TablePagination, GlButton, Icon, + GlModal, }, directives: { GlTooltip: GlTooltipDirective, + GlModal: GlModalDirective, }, mixins: [timeagoMixin], props: { @@ -27,21 +29,31 @@ export default { required: true, }, }, + data() { + return { + itemToBeDeleted: null, + }; + }, computed: { shouldRenderPagination() { return this.repo.pagination.total > this.repo.pagination.perPage; }, }, methods: { - ...mapActions(['fetchList', 'deleteRegistry']), + ...mapActions(['fetchList', 'deleteItem']), layers(item) { return item.layers ? n__('%d layer', '%d layers', item.layers) : ''; }, formatSize(size) { return numberToHumanSize(size); }, - handleDeleteRegistry(registry) { - this.deleteRegistry(registry) + setItemToBeDeleted(item) { + this.itemToBeDeleted = item; + }, + handleDeleteRegistry() { + const { itemToBeDeleted } = this; + this.itemToBeDeleted = null; + this.deleteItem(itemToBeDeleted) .then(() => this.fetchList({ repo: this.repo })) .catch(() => this.showError(errorMessagesTypes.DELETE_REGISTRY)); }, @@ -80,9 +92,9 @@ export default { /> </td> <td> - <span v-gl-tooltip.bottom class="monospace" :title="item.revision">{{ - item.shortRevision - }}</span> + <span v-gl-tooltip.bottom class="monospace" :title="item.revision"> + {{ item.shortRevision }} + </span> </td> <td> {{ formatSize(item.size) }} @@ -93,20 +105,21 @@ export default { </td> <td> - <span v-gl-tooltip.bottom :title="tooltipTitle(item.createdAt)">{{ - timeFormated(item.createdAt) - }}</span> + <span v-gl-tooltip.bottom :title="tooltipTitle(item.createdAt)"> + {{ timeFormated(item.createdAt) }} + </span> </td> <td class="content"> <gl-button v-if="item.canDelete" v-gl-tooltip - :title="s__('ContainerRegistry|Remove tag')" - :aria-label="s__('ContainerRegistry|Remove tag')" + v-gl-modal="'confirm-image-deletion-modal'" + :title="s__('ContainerRegistry|Remove image')" + :aria-label="s__('ContainerRegistry|Remove image')" variant="danger" class="js-delete-registry d-none d-sm-block float-right" - @click="handleDeleteRegistry(item)" + @click="setItemToBeDeleted(item)" > <icon name="remove" /> </gl-button> @@ -120,5 +133,24 @@ export default { :change="onPageChange" :page-info="repo.pagination" /> + + <gl-modal + modal-id="confirm-image-deletion-modal" + ok-variant="danger" + @ok="handleDeleteRegistry" + > + <template v-slot:modal-title>{{ s__('ContainerRegistry|Remove image') }}</template> + <template v-slot:modal-ok>{{ s__('ContainerRegistry|Remove image and tags') }}</template> + <p + v-html=" + sprintf( + s__( + 'ContainerRegistry|You are about to delete the image <b>%{title}</b>. This will delete the image and all tags pointing to this image.', + ), + { title: repo.name }, + ) + " + ></p> + </gl-modal> </div> </template> diff --git a/app/assets/javascripts/registry/stores/actions.js b/app/assets/javascripts/registry/stores/actions.js index 51d057c62c1..0f5e9cc73a0 100644 --- a/app/assets/javascripts/registry/stores/actions.js +++ b/app/assets/javascripts/registry/stores/actions.js @@ -35,11 +35,7 @@ export const fetchList = ({ commit }, { repo, page }) => { }); }; -// eslint-disable-next-line no-unused-vars -export const deleteRepo = ({ commit }, repo) => axios.delete(repo.destroyPath); - -// eslint-disable-next-line no-unused-vars -export const deleteRegistry = ({ commit }, image) => axios.delete(image.destroyPath); +export const deleteItem = (_, item) => axios.delete(item.destroyPath); export const setMainEndpoint = ({ commit }, data) => commit(types.SET_MAIN_ENDPOINT, data); export const toggleLoading = ({ commit }) => commit(types.TOGGLE_MAIN_LOADING); diff --git a/app/assets/javascripts/releases/components/release_block.vue b/app/assets/javascripts/releases/components/release_block.vue index 0958b9fa926..f510b905a2e 100644 --- a/app/assets/javascripts/releases/components/release_block.vue +++ b/app/assets/javascripts/releases/components/release_block.vue @@ -1,6 +1,6 @@ <script> import _ from 'underscore'; -import { GlTooltipDirective, GlLink } from '@gitlab/ui'; +import { GlTooltipDirective, GlLink, GlBadge } from '@gitlab/ui'; import Icon from '~/vue_shared/components/icon.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import timeagoMixin from '~/vue_shared/mixins/timeago'; @@ -10,6 +10,7 @@ export default { name: 'ReleaseBlock', components: { GlLink, + GlBadge, Icon, UserAvatarLink, }, @@ -53,7 +54,12 @@ export default { <template> <div class="card"> <div class="card-body"> - <h2 class="card-title mt-0">{{ release.name }}</h2> + <h2 class="card-title mt-0"> + {{ release.name }} + <gl-badge v-if="release.pre_release" variant="warning" class="align-middle">{{ + __('Pre-release') + }}</gl-badge> + </h2> <div class="card-subtitle d-flex flex-wrap text-secondary"> <div class="append-right-8"> @@ -68,9 +74,9 @@ export default { <div class="append-right-4"> • - <span v-gl-tooltip.bottom :title="tooltipTitle(release.created_at)">{{ - releasedTimeAgo - }}</span> + <span v-gl-tooltip.bottom :title="tooltipTitle(release.created_at)"> + {{ releasedTimeAgo }} + </span> </div> <div v-if="hasAuthor" class="d-flex"> @@ -98,7 +104,8 @@ export default { <li v-for="link in assets.links" :key="link.name" class="append-bottom-8"> <gl-link v-gl-tooltip.bottom :title="__('Download asset')" :href="link.url"> <icon name="package" class="align-middle append-right-4 align-text-bottom" /> - {{ link.name }} <span v-if="link.external"> {{ __('(external source)') }}</span> + {{ link.name }} + <span v-if="link.external">{{ __('(external source)') }}</span> </gl-link> </li> </ul> @@ -111,7 +118,8 @@ export default { aria-haspopup="true" aria-expanded="false" > - <icon name="doc-code" class="align-top append-right-4" /> {{ __('Source code') }} + <icon name="doc-code" class="align-top append-right-4" /> + {{ __('Source code') }} <icon name="arrow-down" /> </button> @@ -123,7 +131,9 @@ export default { </div> </div> - <div class="card-text prepend-top-default"><div v-html="release.description_html"></div></div> + <div class="card-text prepend-top-default"> + <div v-html="release.description_html"></div> + </div> </div> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/modal_copy_button.vue b/app/assets/javascripts/vue_shared/components/modal_copy_button.vue index bf59a6abf3f..edbeab9c600 100644 --- a/app/assets/javascripts/vue_shared/components/modal_copy_button.vue +++ b/app/assets/javascripts/vue_shared/components/modal_copy_button.vue @@ -26,6 +26,11 @@ export default { required: false, default: '', }, + cssClasses: { + type: String, + required: false, + default: '', + }, modalId: { type: String, required: false, @@ -110,6 +115,7 @@ export default { <template> <gl-button v-gl-tooltip="{ placement: tooltipPlacement, container: tooltipContainer }" + :class="cssClasses" :data-clipboard-target="target" :data-clipboard-text="text" :title="title" diff --git a/app/assets/javascripts/vue_shared/components/paginated_list.vue b/app/assets/javascripts/vue_shared/components/paginated_list.vue new file mode 100644 index 00000000000..e19b8510399 --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/paginated_list.vue @@ -0,0 +1,35 @@ +<script> +import { GlPaginatedList } from '@gitlab/ui'; +import { PREV, NEXT } from '~/vue_shared/components/pagination/constants'; + +export default { + components: { + GlPaginatedList, + }, + labels: { + prev: PREV, + next: NEXT, + }, +}; +</script> + +<template> + <gl-paginated-list + v-bind="$attrs" + :prev-text="$options.labels.prev" + :next-text="$options.labels.next" + > + <!-- proxy the slots --> + <template #header> + <slot name="header"></slot> + </template> + + <template #subheader> + <slot name="subheader"></slot> + </template> + + <template #default="{ listItem, query }"> + <slot :listItem="listItem" :query="query"></slot> + </template> + </gl-paginated-list> +</template> diff --git a/app/assets/javascripts/vue_shared/components/pagination/constants.js b/app/assets/javascripts/vue_shared/components/pagination/constants.js index 748ad178c70..229132c0e33 100644 --- a/app/assets/javascripts/vue_shared/components/pagination/constants.js +++ b/app/assets/javascripts/vue_shared/components/pagination/constants.js @@ -3,8 +3,8 @@ import { s__ } from '~/locale'; export const PAGINATION_UI_BUTTON_LIMIT = 4; export const UI_LIMIT = 6; export const SPREAD = '...'; -export const PREV = s__('Pagination|Prev'); -export const NEXT = s__('Pagination|Next'); +export const PREV = s__('Pagination|‹ Prev'); +export const NEXT = s__('Pagination|Next ›'); export const FIRST = s__('Pagination|« First'); export const LAST = s__('Pagination|Last »'); export const LABEL_FIRST_PAGE = s__('Pagination|Go to first page'); diff --git a/app/assets/javascripts/vue_shared/components/project_avatar/image.vue b/app/assets/javascripts/vue_shared/components/project_avatar/image.vue index e77b9ddc7ba..b9311d65360 100644 --- a/app/assets/javascripts/vue_shared/components/project_avatar/image.vue +++ b/app/assets/javascripts/vue_shared/components/project_avatar/image.vue @@ -17,13 +17,9 @@ import defaultAvatarUrl from 'images/no_avatar.png'; import { placeholderImage } from '../../../lazy_loader'; -import tooltip from '../../directives/tooltip'; export default { name: 'ProjectAvatarImage', - directives: { - tooltip, - }, props: { lazy: { type: Boolean, @@ -50,16 +46,6 @@ export default { required: false, default: 20, }, - tooltipText: { - type: String, - required: false, - default: '', - }, - tooltipPlacement: { - type: String, - required: false, - default: 'top', - }, }, computed: { // API response sends null when gravatar is disabled and @@ -71,9 +57,6 @@ export default { resultantSrcAttribute() { return this.lazy ? placeholderImage : this.sanitizedSource; }, - tooltipContainer() { - return this.tooltipText ? 'body' : null; - }, avatarSizeClass() { return `s${this.size}`; }, @@ -83,7 +66,6 @@ export default { <template> <img - v-tooltip :class="{ lazy: lazy, [avatarSizeClass]: true, @@ -94,9 +76,6 @@ export default { :height="size" :alt="imgAlt" :data-src="sanitizedSource" - :data-container="tooltipContainer" - :data-placement="tooltipPlacement" - :title="tooltipText" class="avatar" /> </template> diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index b4d89db20c5..b16f3dd9d82 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -33,7 +33,7 @@ class Projects::IssuesController < Projects::ApplicationController before_action :authorize_create_issue!, only: [:new, :create] # Allow modify issue - before_action :authorize_update_issuable!, only: [:edit, :update, :move] + before_action :authorize_update_issuable!, only: [:edit, :update, :move, :reorder] # Allow create a new branch and empty WIP merge request from current issue before_action :authorize_create_merge_request_from!, only: [:create_merge_request] @@ -132,6 +132,16 @@ class Projects::IssuesController < Projects::ApplicationController render_conflict_response end + def reorder + service = Issues::ReorderService.new(project, current_user, reorder_params) + + if service.execute(issue) + head :ok + else + head :unprocessable_entity + end + end + def related_branches @related_branches = Issues::RelatedBranchesService.new(project, current_user).execute(issue) @@ -239,6 +249,10 @@ class Projects::IssuesController < Projects::ApplicationController ] + [{ label_ids: [], assignee_ids: [], update_task: [:index, :checked, :line_number, :line_source] }] end + def reorder_params + params.permit(:move_before_id, :move_after_id, :group_full_path) + end + def store_uri if request.get? && !request.xhr? store_location_for :user, request.fullpath diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 58b1f0196fa..fc37ce1dbc4 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -16,7 +16,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo before_action :authenticate_user!, only: [:assign_related_issues] before_action :check_user_can_push_to_source_branch!, only: [:rebase] - around_action :allow_gitaly_ref_name_caching, only: [:index, :show] + around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions] def index @merge_requests = @issuables diff --git a/app/controllers/projects/pages_domains_controller.rb b/app/controllers/projects/pages_domains_controller.rb index 89f21d8dadb..c287e440db0 100644 --- a/app/controllers/projects/pages_domains_controller.rb +++ b/app/controllers/projects/pages_domains_controller.rb @@ -65,16 +65,14 @@ class Projects::PagesDomainsController < Projects::ApplicationController private def create_params - params.require(:pages_domain).permit(:key, :certificate, :domain, :auto_ssl_enabled) + params.require(:pages_domain).permit(:user_provided_key, :user_provided_certificate, :domain, :auto_ssl_enabled) end def update_params - params.require(:pages_domain).permit(:key, :certificate, :auto_ssl_enabled) + params.require(:pages_domain).permit(:user_provided_key, :user_provided_certificate, :auto_ssl_enabled) end - # rubocop: disable CodeReuse/ActiveRecord def domain - @domain ||= @project.pages_domains.find_by!(domain: params[:id].to_s) + @domain ||= @project.pages_domains.find_by_domain!(params[:id].to_s) end - # rubocop: enable CodeReuse/ActiveRecord end diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb index c0db9910143..6b43d52c775 100644 --- a/app/helpers/appearances_helper.rb +++ b/app/helpers/appearances_helper.rb @@ -2,6 +2,7 @@ module AppearancesHelper include MarkupHelper + include Gitlab::Utils::StrongMemoize def brand_title current_appearance&.title.presence || default_brand_title @@ -25,7 +26,9 @@ module AppearancesHelper end def current_appearance - @appearance ||= Appearance.current + strong_memoize(:current_appearance) do + Appearance.current + end end def brand_header_logo diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 9a12db258d5..150f24a5d5b 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -74,7 +74,7 @@ module IssuablesHelper end end - def serialize_issuable(issuable, serializer: nil) + def serialize_issuable(issuable, opts = {}) serializer_klass = case issuable when Issue IssueSerializer @@ -84,7 +84,7 @@ module IssuablesHelper serializer_klass .new(current_user: current_user, project: issuable.project) - .represent(issuable, serializer: serializer) + .represent(issuable, opts) .to_json end diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb index 70d296fe3b8..506c8d251b7 100644 --- a/app/mailers/emails/notes.rb +++ b/app/mailers/emails/notes.rb @@ -60,7 +60,7 @@ module Emails # `note_id` is a `Note` when originating in `NotifyPreview` @note = note_id.is_a?(Note) ? note_id : Note.find(note_id) @project = @note.project - @group = @note.noteable.try(:group) + @group = @project.try(:group) || @note.noteable.try(:group) if (@project || @group) && @note.persisted? @sent_notification = SentNotification.record_note(@note, recipient_id, reply_key) diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index 272861cacf0..5afb193cf86 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -47,7 +47,6 @@ module Clusters validate :prevent_modification, on: :update after_save :clear_reactive_cache! - after_update :update_kubernetes_namespace alias_attribute :ca_pem, :ca_cert @@ -91,19 +90,6 @@ module Clusters elsif kubernetes_namespace = cluster.kubernetes_namespaces.has_service_account_token.find_by(project: project) variables.concat(kubernetes_namespace.predefined_variables) - elsif cluster.project_type? - # As of 11.11 a user can create a cluster that they manage themselves, - # which replicates the existing project-level cluster behaviour. - # Once we have marked all project-level clusters that make use of this - # behaviour as "unmanaged", we can remove the `cluster.project_type?` - # check here. - project_namespace = cluster.kubernetes_namespace_for(project) - - variables - .append(key: 'KUBE_URL', value: api_url) - .append(key: 'KUBE_TOKEN', value: token, public: false, masked: true) - .append(key: 'KUBE_NAMESPACE', value: project_namespace) - .append(key: 'KUBECONFIG', value: kubeconfig(project_namespace), public: false, file: true) end variables.concat(cluster.predefined_variables) @@ -223,14 +209,6 @@ module Clusters true end - - def update_kubernetes_namespace - return unless saved_change_to_namespace? - - run_after_commit do - ClusterConfigureWorker.perform_async(cluster_id) - end - end end end end diff --git a/app/models/concerns/deployment_platform.rb b/app/models/concerns/deployment_platform.rb index 9ac0d612db3..1bd8a799f0d 100644 --- a/app/models/concerns/deployment_platform.rb +++ b/app/models/concerns/deployment_platform.rb @@ -14,9 +14,7 @@ module DeploymentPlatform def find_deployment_platform(environment) find_cluster_platform_kubernetes(environment: environment) || find_group_cluster_platform_kubernetes_with_feature_guard(environment: environment) || - find_instance_cluster_platform_kubernetes_with_feature_guard(environment: environment) || - find_kubernetes_service_integration || - build_cluster_and_deployment_platform + find_instance_cluster_platform_kubernetes_with_feature_guard(environment: environment) end # EE would override this and utilize environment argument @@ -48,39 +46,4 @@ module DeploymentPlatform Clusters::Instance.new.clusters.enabled.default_environment .first&.platform_kubernetes end - - def find_kubernetes_service_integration - services.deployment.reorder(nil).find_by(active: true) - end - - def build_cluster_and_deployment_platform - return unless kubernetes_service_template - - cluster = ::Clusters::Cluster.create(cluster_attributes_from_service_template) - cluster.platform_kubernetes if cluster.persisted? - end - - def kubernetes_service_template - @kubernetes_service_template ||= KubernetesService.active.find_by_template - end - - def cluster_attributes_from_service_template - { - name: 'kubernetes-template', - projects: [self], - cluster_type: :project_type, - provider_type: :user, - platform_type: :kubernetes, - platform_kubernetes_attributes: platform_kubernetes_attributes_from_service_template - } - end - - def platform_kubernetes_attributes_from_service_template - { - api_url: kubernetes_service_template.api_url, - ca_pem: kubernetes_service_template.ca_pem, - token: kubernetes_service_template.token, - namespace: kubernetes_service_template.namespace - } - end end diff --git a/app/models/concerns/service_push_data_validations.rb b/app/models/concerns/service_push_data_validations.rb new file mode 100644 index 00000000000..defc5794142 --- /dev/null +++ b/app/models/concerns/service_push_data_validations.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This concern is used by registerd services such as TeamCityService and +# DroneCiService and add methods to perform validations on the received +# data. + +module ServicePushDataValidations + extend ActiveSupport::Concern + + def merge_request_valid?(data) + data.dig(:object_attributes, :state) == 'opened' && merge_request_unchecked?(data) + end + + def push_valid?(data) + data[:total_commits_count] > 0 && + !branch_removed?(data) && + # prefer merge request trigger over push to avoid double builds + !opened_merge_requests?(data) + end + + def tag_push_valid?(data) + data[:total_commits_count] > 0 && !branch_removed?(data) + end + + private + + def branch_removed?(data) + Gitlab::Git.blank_ref?(data[:after]) + end + + def opened_merge_requests?(data) + project.merge_requests + .opened + .from_project(project) + .from_source_branches(Gitlab::Git.ref_name(data[:ref])) + .exists? + end + + def merge_request_unchecked?(data) + MergeRequest.state_machines[:merge_status] + .check_state?(data.dig(:object_attributes, :merge_status)) + end +end diff --git a/app/models/deployment.rb b/app/models/deployment.rb index 92c7311014a..ee6e830d3ec 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -179,7 +179,7 @@ class Deployment < ApplicationRecord end def has_metrics? - prometheus_adapter&.can_query? && success? + success? && prometheus_adapter&.can_query? end def metrics diff --git a/app/models/environment.rb b/app/models/environment.rb index aff20dae09b..1f7e8815c8e 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -155,7 +155,7 @@ class Environment < ApplicationRecord end def has_terminals? - deployment_platform.present? && available? && last_deployment.present? + available? && deployment_platform.present? && last_deployment.present? end def terminals @@ -163,7 +163,7 @@ class Environment < ApplicationRecord end def has_metrics? - prometheus_adapter&.can_query? && available? + available? && prometheus_adapter&.can_query? end def metrics diff --git a/app/models/note.rb b/app/models/note.rb index 15271c68a9e..b55af7d9b5e 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -457,7 +457,7 @@ class Note < ApplicationRecord end def banzai_render_context(field) - super.merge(noteable: noteable) + super.merge(noteable: noteable, system_note: system?) end def retrieve_upload(_identifier, paths) diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb index 524df30289e..07195c0bfd3 100644 --- a/app/models/pages_domain.rb +++ b/app/models/pages_domain.rb @@ -4,6 +4,8 @@ class PagesDomain < ApplicationRecord VERIFICATION_KEY = 'gitlab-pages-verification-code'.freeze VERIFICATION_THRESHOLD = 3.days.freeze + enum certificate_source: { user_provided: 0, gitlab_provided: 1 }, _prefix: :certificate + belongs_to :project has_many :acme_orders, class_name: "PagesDomainAcmeOrder" @@ -143,6 +145,34 @@ class PagesDomain < ApplicationRecord self.certificate_valid_not_after = x509&.not_after end + def user_provided_key + key if certificate_user_provided? + end + + def user_provided_key=(key) + self.key = key + self.certificate_source = 'user_provided' if key_changed? + end + + def user_provided_certificate + certificate if certificate_user_provided? + end + + def user_provided_certificate=(certificate) + self.certificate = certificate + self.certificate_source = 'user_provided' if certificate_changed? + end + + def gitlab_provided_certificate=(certificate) + self.certificate = certificate + self.certificate_source = 'gitlab_provided' if certificate_changed? + end + + def gitlab_provided_key=(key) + self.key = key + self.certificate_source = 'gitlab_provided' if key_changed? + end + private def set_verification_code diff --git a/app/models/project.rb b/app/models/project.rb index 7851f37116c..351d08eaf63 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -55,6 +55,8 @@ class Project < ApplicationRecord VALID_MIRROR_PORTS = [22, 80, 443].freeze VALID_MIRROR_PROTOCOLS = %w(http https ssh git).freeze + ignore_column :import_status, :import_jid, :import_error + cache_markdown_field :description, pipeline: :description delegate :feature_available?, :builds_enabled?, :wiki_enabled?, diff --git a/app/models/project_services/drone_ci_service.rb b/app/models/project_services/drone_ci_service.rb index 5ccc2f019cb..dbdc8345c93 100644 --- a/app/models/project_services/drone_ci_service.rb +++ b/app/models/project_services/drone_ci_service.rb @@ -2,6 +2,7 @@ class DroneCiService < CiService include ReactiveService + include ServicePushDataValidations prop_accessor :drone_url, :token boolean_accessor :enable_ssl_verification @@ -96,23 +97,4 @@ class DroneCiService < CiService { type: 'checkbox', name: 'enable_ssl_verification', title: "Enable SSL verification" } ] end - - private - - def tag_push_valid?(data) - data[:total_commits_count] > 0 && !Gitlab::Git.blank_ref?(data[:after]) - end - - def push_valid?(data) - opened_merge_requests = project.merge_requests.opened.where(source_project_id: project.id, - source_branch: Gitlab::Git.ref_name(data[:ref])) - - opened_merge_requests.empty? && data[:total_commits_count] > 0 && - !Gitlab::Git.blank_ref?(data[:after]) - end - - def merge_request_valid?(data) - data[:object_attributes][:state] == 'opened' && - MergeRequest.state_machines[:merge_status].check_state?(data[:object_attributes][:merge_status]) - end end diff --git a/app/models/project_services/kubernetes_service.rb b/app/models/project_services/kubernetes_service.rb index edf7e886e77..27b7827d55e 100644 --- a/app/models/project_services/kubernetes_service.rb +++ b/app/models/project_services/kubernetes_service.rb @@ -170,12 +170,11 @@ class KubernetesService < Service def deprecation_message content = if project - _("Kubernetes service integration has been deprecated. %{deprecated_message_content} your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page") % { - deprecated_message_content: deprecated_message_content, + _("Kubernetes service integration has been disabled. Fields on this page are not used by GitLab, you can configure your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page") % { url: Gitlab::Routing.url_helpers.project_clusters_path(project) } else - _("The instance-level Kubernetes service integration is deprecated. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>.") % { + _("The instance-level Kubernetes service integration is disabled. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>.") % { url: Gitlab::Routing.url_helpers.admin_clusters_path } end @@ -260,8 +259,4 @@ class KubernetesService < Service errors[:base] << deprecation_message end end - - def deprecated_message_content - _("Fields on this page are now uneditable, you can configure") - end end diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index 3245cd22e73..68c07fa37f2 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -2,6 +2,7 @@ class TeamcityService < CiService include ReactiveService + include ServicePushDataValidations prop_accessor :teamcity_url, :build_type, :username, :password @@ -19,6 +20,25 @@ class TeamcityService < CiService after_save :compose_service_hook, if: :activated? before_update :reset_password + class << self + def to_param + 'teamcity' + end + + def supported_events + %w(push merge_request) + end + + def event_description(event) + case event + when 'push', 'push_events' + 'TeamCity CI will be triggered after every push to the repository except branch delete' + when 'merge_request', 'merge_request_events' + 'TeamCity CI will be triggered after a merge request has been created or updated' + end + end + end + def compose_service_hook hook = service_hook || build_service_hook hook.save @@ -43,10 +63,6 @@ class TeamcityService < CiService 'requests build, that setting is in the vsc root advanced settings.' end - def self.to_param - 'teamcity' - end - def fields [ { type: 'text', name: 'teamcity_url', @@ -74,26 +90,25 @@ class TeamcityService < CiService end def execute(data) - return unless supported_events.include?(data[:object_kind]) + case data[:object_kind] + when 'push' + execute_push(data) + when 'merge_request' + execute_merge_request(data) + end + end - auth = { - username: username, - password: password - } + private + def execute_push(data) branch = Gitlab::Git.ref_name(data[:ref]) - - Gitlab::HTTP.post( - build_url('httpAuth/app/rest/buildQueue'), - body: "<build branchName=\"#{branch}\">"\ - "<buildType id=\"#{build_type}\"/>"\ - '</build>', - headers: { 'Content-type' => 'application/xml' }, - basic_auth: auth - ) + post_to_build_queue(data, branch) if push_valid?(data) end - private + def execute_merge_request(data) + branch = data[:object_attributes][:source_branch] + post_to_build_queue(data, branch) if merge_request_valid?(data) + end def read_build_page(response) if response.code != 200 @@ -134,10 +149,21 @@ class TeamcityService < CiService end def get_path(path) - Gitlab::HTTP.get(build_url(path), verify: false, - basic_auth: { - username: username, - password: password - }) + Gitlab::HTTP.get(build_url(path), verify: false, basic_auth: basic_auth) + end + + def post_to_build_queue(data, branch) + Gitlab::HTTP.post( + build_url('httpAuth/app/rest/buildQueue'), + body: "<build branchName=#{branch.encode(xml: :attr)}>"\ + "<buildType id=#{build_type.encode(xml: :attr)}/>"\ + '</build>', + headers: { 'Content-type' => 'application/xml' }, + basic_auth: basic_auth + ) + end + + def basic_auth + { username: username, password: password } end end diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb index a428930dbbf..43aced598a9 100644 --- a/app/serializers/merge_request_widget_entity.rb +++ b/app/serializers/merge_request_widget_entity.rb @@ -114,7 +114,10 @@ class MergeRequestWidgetEntity < IssuableEntity presenter(merge_request).ci_status end - expose :issues_links do + # Rendering and redacting Markdown can be expensive. These links are + # just nice to have in the merge request widget, so only + # include them if they are explicitly requested on first load. + expose :issues_links, if: -> (_, opts) { opts[:issues_links] } do expose :assign_to_closing do |merge_request| presenter(merge_request).assign_to_closing_issues_link end diff --git a/app/services/boards/issues/move_service.rb b/app/services/boards/issues/move_service.rb index 834baeb9643..e27d34dbcab 100644 --- a/app/services/boards/issues/move_service.rb +++ b/app/services/boards/issues/move_service.rb @@ -79,9 +79,11 @@ module Boards # rubocop: enable CodeReuse/ActiveRecord def move_between_ids - return unless params[:move_after_id] || params[:move_before_id] + ids = [params[:move_after_id], params[:move_before_id]] + .map(&:to_i) + .map { |m| m.positive? ? m : nil } - [params[:move_after_id], params[:move_before_id]] + ids.any? ? ids : nil end end end diff --git a/app/services/clusters/gcp/finalize_creation_service.rb b/app/services/clusters/gcp/finalize_creation_service.rb index 5525c1b9b7f..2f3c1df7651 100644 --- a/app/services/clusters/gcp/finalize_creation_service.rb +++ b/app/services/clusters/gcp/finalize_creation_service.rb @@ -12,9 +12,6 @@ module Clusters create_gitlab_service_account! configure_kubernetes cluster.save! - - ClusterConfigureWorker.perform_async(cluster.id) - rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e log_service_error(e.class.name, provider.id, e.message) provider.make_errored!(s_('ClusterIntegration|Failed to request to Google Cloud Platform: %{message}') % { message: e.message }) diff --git a/app/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service.rb b/app/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service.rb index 4ad04ab801e..5d9bdc52d37 100644 --- a/app/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service.rb +++ b/app/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service.rb @@ -4,17 +4,30 @@ module Clusters module Gcp module Kubernetes class FetchKubernetesTokenService + DEFAULT_TOKEN_RETRY_DELAY = 5.seconds + TOKEN_RETRY_LIMIT = 5 + attr_reader :kubeclient, :service_account_token_name, :namespace - def initialize(kubeclient, service_account_token_name, namespace) + def initialize(kubeclient, service_account_token_name, namespace, token_retry_delay: DEFAULT_TOKEN_RETRY_DELAY) @kubeclient = kubeclient @service_account_token_name = service_account_token_name @namespace = namespace + @token_retry_delay = token_retry_delay end def execute - token_base64 = get_secret&.dig('data', 'token') - Base64.decode64(token_base64) if token_base64 + # Kubernetes will create the Secret and set the token asynchronously + # so it is necessary to retry + # https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#token-controller + TOKEN_RETRY_LIMIT.times do + token_base64 = get_secret&.dig('data', 'token') + return Base64.decode64(token_base64) if token_base64 + + sleep @token_retry_delay + end + + nil end private diff --git a/app/services/issues/reorder_service.rb b/app/services/issues/reorder_service.rb new file mode 100644 index 00000000000..02c18d31b5e --- /dev/null +++ b/app/services/issues/reorder_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +module Issues + class ReorderService < Issues::BaseService + def execute(issue) + return false unless can?(current_user, :update_issue, issue) + return false if group && !can?(current_user, :read_group, group) + + attrs = issue_params(group) + return false if attrs.empty? + + update(issue, attrs) + end + + private + + def group + return unless params[:group_full_path] + + @group ||= Group.find_by_full_path(params[:group_full_path]) + end + + def update(issue, attrs) + ::Issues::UpdateService.new(project, current_user, attrs).execute(issue) + rescue ActiveRecord::RecordNotFound + false + end + + def issue_params(group) + attrs = {} + + if move_between_ids + attrs[:move_between_ids] = move_between_ids + attrs[:board_group_id] = group&.id + end + + attrs + end + + def move_between_ids + ids = [params[:move_after_id], params[:move_before_id]] + .map(&:to_i) + .map { |m| m.positive? ? m : nil } + + ids.any? ? ids : nil + end + end +end diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb index cb2337d29d4..6b9f23f24cd 100644 --- a/app/services/issues/update_service.rb +++ b/app/services/issues/update_service.rb @@ -76,6 +76,7 @@ module Issues issue_before = get_issue_if_allowed(before_id, board_group_id) issue_after = get_issue_if_allowed(after_id, board_group_id) + raise ActiveRecord::RecordNotFound unless issue_before || issue_after issue.move_between(issue_before, issue_after) end diff --git a/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb b/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb index 2dfe1a3d8ca..3413a9e4612 100644 --- a/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb +++ b/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb @@ -35,7 +35,7 @@ module PagesDomains def save_certificate(private_key, api_order) certificate = api_order.certificate - pages_domain.update!(key: private_key, certificate: certificate) + pages_domain.update!(gitlab_provided_key: private_key, gitlab_provided_certificate: certificate) end end end diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index dcd6f7c8078..5c6131db37d 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -32,11 +32,12 @@ %li %span.light Email: %strong - = mail_to @user.email + = render partial: 'shared/email_with_badge', locals: { email: mail_to(@user.email), verified: @user.confirmed? } - @user.emails.each do |email| %li %span.light Secondary email: - %strong= email.email + %strong + = render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? } = link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn-sm btn btn-remove float-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do %i.fa.fa-times %li diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index 0fc5ebbea7e..4b5ccc33716 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -45,7 +45,6 @@ = _('Contribution Analytics') = render_if_exists 'layouts/nav/group_insights_link' - = render_if_exists 'groups/sidebar/dependency_proxy' # EE-specific = render_if_exists "layouts/nav/ee/epic_link", group: @group @@ -119,6 +118,8 @@ %strong.fly-out-top-item-name = _('Kubernetes') + = render_if_exists 'groups/sidebar/packages' # EE-specific + - if group_sidebar_link?(:group_members) = nav_link(path: 'group_members#index') do = link_to group_group_members_path(@group) do diff --git a/app/views/notify/_note_email.html.haml b/app/views/notify/_note_email.html.haml index 83c7f548975..dc5529b489b 100644 --- a/app/views/notify/_note_email.html.haml +++ b/app/views/notify/_note_email.html.haml @@ -5,27 +5,21 @@ - discussion = note.discussion if note.part_of_discussion? -- if discussion - %p{ style: "color: #777777;" } - = succeed ':' do - = link_to note.author_name, user_url(note.author) +%p{ style: "color: #777777;" } + = succeed ':' do + = link_to note.author_name, user_url(note.author) + - if discussion.nil? + commented + - else + - if discussion.new_discussion? + started a new + - else + commented on a - if discussion&.diff_discussion? - - if discussion.new_discussion? - started a new discussion - - else - commented on a discussion - - on #{link_to discussion.file_path, target_url} + discussion on #{link_to(discussion.file_path, target_url)} - else - - if discussion.new_discussion? - started a new discussion - - else - commented on a #{link_to 'discussion', target_url} - -- elsif Gitlab::CurrentSettings.email_author_in_body - %p.details - #{link_to note.author_name, user_url(note.author)} commented: + = link_to 'discussion', target_url - if discussion&.diff_discussion? && discussion.on_text? = content_for :head do diff --git a/app/views/notify/_note_email.text.erb b/app/views/notify/_note_email.text.erb index fae8fa3ccf3..a25daad8458 100644 --- a/app/views/notify/_note_email.text.erb +++ b/app/views/notify/_note_email.text.erb @@ -1,29 +1,25 @@ <% note = local_assigns.fetch(:note, @note) -%> <% diff_limit = local_assigns.fetch(:diff_limit, nil) -%> <% target_url = local_assigns.fetch(:target_url, @target_url) -%> +<% discussion = note.discussion if note.part_of_discussion? -%> -<% discussion = note.discussion if note.part_of_discussion? -%> -<% if discussion && !discussion.individual_note? -%> -<%= sanitize_name(note.author_name) -%> +<%= sanitize_name(note.author_name) -%> +<% if discussion.nil? -%> + <%= 'commented' -%>: +<% else -%> <% if discussion.new_discussion? -%> -<%= " started a new discussion" -%> + <%= 'started a new discussion' -%> <% else -%> -<%= " commented on a discussion" -%> + <%= 'commented on a discussion' -%> <% end -%> <% if discussion.diff_discussion? -%> -<%= " on #{discussion.file_path}" -%> + <%= "on #{discussion.file_path}" -%> <% end -%> -<%= ":" -%> -<% if discussion.diff_discussion? || !discussion.new_discussion? -%> -<%= " #{target_url}" -%> -<% end -%> - - -<% elsif Gitlab::CurrentSettings.email_author_in_body -%> -<%= "#{sanitize_name(note.author_name)} commented:" -%> +<%= ':' -%> +<%= " #{target_url}" -%> +<% end -%> -<% end -%> <% if discussion&.diff_discussion? && discussion.on_text? -%> <% discussion.truncated_diff_lines(highlight: false, diff_limit: diff_limit).each do |line| -%> <%= "> #{line.text}\n" -%> diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index 8aa7939dd0b..78afb42c9cf 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,6 +1,5 @@ -- if Gitlab::CurrentSettings.email_author_in_body - %p.details - #{link_to @issue.author_name, user_url(@issue.author)} created an issue: +%p.details + #{link_to @issue.author_name, user_url(@issue.author)} created an issue: - if @issue.assignees.any? %p diff --git a/app/views/notify/new_issue_email.text.erb b/app/views/notify/new_issue_email.text.erb index ff258711b48..b93d95ef02f 100644 --- a/app/views/notify/new_issue_email.text.erb +++ b/app/views/notify/new_issue_email.text.erb @@ -1,7 +1,9 @@ -New Issue was created. +<%= sanitize_name(@issue.author_name) %> <%= 'created an issue:' %> -Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> -Author: <%= sanitize_name(@issue.author_name) %> -<%= assignees_label(@issue) %> +<% if @issue.assignees.any? -%> + <%= assignees_label(@issue) %> +<% end %> -<%= @issue.description %> +<% if @issue.description -%> + <%= @issue.description %> +<% end %> diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 9ab648e2a64..2ddea0b9f16 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -1,15 +1,15 @@ -- if Gitlab::CurrentSettings.email_author_in_body - %p.details - #{link_to @merge_request.author_name, user_url(@merge_request.author)} created a merge request: - %p.details - = merge_path_description(@merge_request, '→') + #{link_to @merge_request.author_name, user_url(@merge_request.author)} created a merge request: -- if @merge_request.assignees.any? - %p +%p + .branch + = merge_path_description(@merge_request, 'to') + .author + Author #{@merge_request.author_name} + .assignee = assignees_label(@merge_request) - -= render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter + .approvers + = render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter - if @merge_request.description %div diff --git a/app/views/notify/new_merge_request_email.text.erb b/app/views/notify/new_merge_request_email.text.erb index e6c42f1cf5f..c3f2902c78a 100644 --- a/app/views/notify/new_merge_request_email.text.erb +++ b/app/views/notify/new_merge_request_email.text.erb @@ -1,9 +1,7 @@ -New Merge Request <%= @merge_request.to_reference %> - -<%= url_for(project_merge_request_url(@merge_request.target_project, @merge_request)) %> +<%= @merge_request.author_name %> <%= 'created a merge request:' %> <%= url_for(project_merge_request_url(@merge_request.target_project, @merge_request)) %> <%= merge_path_description(@merge_request, 'to') %> -Author: <%= @merge_request.author_name %> +<%= 'Author' %>: <%= @merge_request.author_name %> <%= assignees_label(@merge_request) %> <%= render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter %> diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 99cbbc11acd..3ec92676cde 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -6,4 +6,5 @@ "can-create-environment" => can?(current_user, :create_environment, @project).to_s, "new-environment-path" => new_project_environment_path(@project), "help-page-path" => help_page_path("ci/environments"), + "deploy-boards-help-path" => help_page_path("user/project/deploy_boards", anchor: "enabling-deploy-boards"), "css-class" => container_class } } diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index f593f4e049e..2084ca6f905 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -19,7 +19,7 @@ -# haml-lint:disable InlineJavaScript :javascript window.gl = window.gl || {}; - window.gl.mrWidgetData = #{serialize_issuable(@merge_request, serializer: 'widget')} + window.gl.mrWidgetData = #{serialize_issuable(@merge_request, serializer: 'widget', issues_links: true)} window.gl.mrWidgetData.squash_before_merge_help_path = '#{help_page_path("user/project/merge_requests/squash_and_merge")}'; window.gl.mrWidgetData.troubleshooting_docs_path = '#{help_page_path('user/project/merge_requests/index.md', anchor: 'troubleshooting')}'; diff --git a/app/views/projects/pages_domains/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml index 33f2166480b..e7edb93f05b 100644 --- a/app/views/projects/pages_domains/_form.html.haml +++ b/app/views/projects/pages_domains/_form.html.haml @@ -11,7 +11,7 @@ - if Gitlab.config.pages.external_https - - auto_ssl_available = Feature.enabled?(:pages_auto_ssl) + - auto_ssl_available = ::Gitlab::LetsEncrypt::Client.new.enabled? - auto_ssl_enabled = @domain.auto_ssl_enabled? - auto_ssl_available_and_enabled = auto_ssl_available && auto_ssl_enabled @@ -38,40 +38,24 @@ - docs_link_end = "</a>".html_safe = _("Let's Encrypt is a free, automated, and open certificate authority (CA) that gives digital certificates in order to enable HTTPS (SSL/TLS) for websites. Learn more about Let's Encrypt configuration by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}.").html_safe % { docs_link_url: docs_link_url, docs_link_start: docs_link_start, docs_link_end: docs_link_end } - .js-shown-if-auto-ssl{ class: ("d-none" unless auto_ssl_available_and_enabled) } - .form-group.row - .col-sm-2.col-form-label - = f.label :certificate, _("Certificate (PEM)") - .col-sm-10 - - if auto_ssl_available_and_enabled && !@domain.certificate.empty? - = f.text_area :certificate, - rows: 5, - class: "form-control", - disabled: true - %span.help-inline.text-muted= _("This certificate is automatically managed by Let's Encrypt") - - else - %p.text-secondary.form-control-plaintext= _("The certificate will be shown here once it has been obtained from Let's Encrypt. This process may take up to an hour to complete.") - .js-shown-unless-auto-ssl{ class: ("d-none" if auto_ssl_available_and_enabled) } .form-group.row .col-sm-2.col-form-label - = f.label :certificate, _("Certificate (PEM)") + = f.label :user_provided_certificate, _("Certificate (PEM)") .col-sm-10 - = f.text_area :certificate, + = f.text_area :user_provided_certificate, rows: 5, class: "form-control js-enabled-unless-auto-ssl", - value: (@domain.certificate unless auto_ssl_available_and_enabled), disabled: auto_ssl_available_and_enabled %span.help-inline.text-muted= _("Upload a certificate for your domain with all intermediates") .form-group.row .col-sm-2.col-form-label - = f.label :key, _("Key (PEM)") + = f.label :user_provided_key, _("Key (PEM)") .col-sm-10 - = f.text_area :key, + = f.text_area :user_provided_key, rows: 5, class: "form-control js-enabled-unless-auto-ssl", - value: (@domain.key unless auto_ssl_available_and_enabled), disabled: auto_ssl_available_and_enabled %span.help-inline.text-muted= _("Upload a private key for your certificate") diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index aa30ebdc3b8..de1b95692d6 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -4,7 +4,7 @@ = @service.title = boolean_to_icon @service.activated? - %p= @service.description + %p= #{@service.description}. - if @service.respond_to?(:detailed_description) %p= @service.detailed_description diff --git a/app/workers/build_success_worker.rb b/app/workers/build_success_worker.rb index 9a865fea621..ac947f3cf38 100644 --- a/app/workers/build_success_worker.rb +++ b/app/workers/build_success_worker.rb @@ -9,7 +9,6 @@ class BuildSuccessWorker # rubocop: disable CodeReuse/ActiveRecord def perform(build_id) Ci::Build.find_by(id: build_id).try do |build| - create_deployment(build) if build.has_environment? stop_environment(build) if build.stops_environment? end end @@ -18,17 +17,6 @@ class BuildSuccessWorker private ## - # Deprecated: - # As of 11.5, we started creating a deployment record when ci_builds record is created. - # Therefore we no longer need to create a deployment, after a build succeeded. - # We're leaving this code for the transition period, but we can remove this code in 11.6. - def create_deployment(build) - build.create_deployment.try do |deployment| - deployment.succeed - end - end - - ## # TODO: This should be processed in DeploymentSuccessWorker once we started storing `action` value in `deployments` records def stop_environment(build) build.persisted_environment.fire_state_event(:stop) diff --git a/app/workers/cluster_provision_worker.rb b/app/workers/cluster_provision_worker.rb index 926ae2b7286..59de7903c1c 100644 --- a/app/workers/cluster_provision_worker.rb +++ b/app/workers/cluster_provision_worker.rb @@ -9,8 +9,6 @@ class ClusterProvisionWorker cluster.provider.try do |provider| Clusters::Gcp::ProvisionService.new.execute(provider) if cluster.gcp? end - - ClusterConfigureWorker.perform_async(cluster.id) if cluster.user? end end end diff --git a/changelogs/unreleased/10088-move-code-differences-EE-to-CE.yml b/changelogs/unreleased/10088-move-code-differences-EE-to-CE.yml deleted file mode 100644 index 1297e9712fa..00000000000 --- a/changelogs/unreleased/10088-move-code-differences-EE-to-CE.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Added code differnces from EE in file 'app/assets/javascripts/pages/projects/project.js' to CE" -merge_request: 29271 -author: Michel Engelen -type: other diff --git a/changelogs/unreleased/10795-add-epic-tree-BE-CE-epic-graphql-support.yml b/changelogs/unreleased/10795-add-epic-tree-BE-CE-epic-graphql-support.yml deleted file mode 100644 index 4c85d4f9acb..00000000000 --- a/changelogs/unreleased/10795-add-epic-tree-BE-CE-epic-graphql-support.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added reference, web_path, and relative_position fields to GraphQL Issue -merge_request: 28998 -author: -type: changed diff --git a/changelogs/unreleased/10798-remove-dind-req-for-dast.yml b/changelogs/unreleased/10798-remove-dind-req-for-dast.yml deleted file mode 100644 index 33545fc7cfd..00000000000 --- a/changelogs/unreleased/10798-remove-dind-req-for-dast.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove dind from DAST template -merge_request: 28083 -author: -type: changed diff --git a/changelogs/unreleased/10842-add-missing-environments-variable-to-the-sast-analyzer-docker-container.yml b/changelogs/unreleased/10842-add-missing-environments-variable-to-the-sast-analyzer-docker-container.yml deleted file mode 100644 index 112b472aa3b..00000000000 --- a/changelogs/unreleased/10842-add-missing-environments-variable-to-the-sast-analyzer-docker-container.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Fix: propagate all documented ENV vars to CI when using SAST' -merge_request: 29564 -author: -type: fixed diff --git a/changelogs/unreleased/11105-fix-cs-with-proxy.yml b/changelogs/unreleased/11105-fix-cs-with-proxy.yml deleted file mode 100644 index ee32427d20e..00000000000 --- a/changelogs/unreleased/11105-fix-cs-with-proxy.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix proxy support in Container Scanning -merge_request: 27246 -author: -type: fixed diff --git a/changelogs/unreleased/11204-turn-off-mask-by-default.yml b/changelogs/unreleased/11204-turn-off-mask-by-default.yml deleted file mode 100644 index 5c554e04d45..00000000000 --- a/changelogs/unreleased/11204-turn-off-mask-by-default.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Default masked to false for new variables -merge_request: 28186 -author: -type: changed diff --git a/changelogs/unreleased/11609-geo-remove-support-for-using-geo-with-an-installation-from-source-docs.yml b/changelogs/unreleased/11609-geo-remove-support-for-using-geo-with-an-installation-from-source-docs.yml deleted file mode 100644 index 6570cb3e2a3..00000000000 --- a/changelogs/unreleased/11609-geo-remove-support-for-using-geo-with-an-installation-from-source-docs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove support for using Geo with an installation from source -merge_request: 28737 -author: -type: other diff --git a/changelogs/unreleased/12106-sp-ce.yml b/changelogs/unreleased/12106-sp-ce.yml deleted file mode 100644 index 2d073401b45..00000000000 --- a/changelogs/unreleased/12106-sp-ce.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Moves snowplow to CE repo -merge_request: -author: -type: other diff --git a/changelogs/unreleased/1340-request-job-with-age.yml b/changelogs/unreleased/1340-request-job-with-age.yml deleted file mode 100644 index 766ac008c2e..00000000000 --- a/changelogs/unreleased/1340-request-job-with-age.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Added option to filter jobs by age in the /job/request API endpoint." -merge_request: 1340 -author: Dmitry Chepurovskiy -type: added diff --git a/changelogs/unreleased/13453_minimal_atom_fix.yml b/changelogs/unreleased/13453_minimal_atom_fix.yml deleted file mode 100644 index e0c18de3b1f..00000000000 --- a/changelogs/unreleased/13453_minimal_atom_fix.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added a content field to atom feed -merge_request: 27652 -author: -type: fixed diff --git a/changelogs/unreleased/17690-Protect-TeamCity-builds-for-triggering-when-a-branch-is-deleted-And-add-MR-option.yml b/changelogs/unreleased/17690-Protect-TeamCity-builds-for-triggering-when-a-branch-is-deleted-And-add-MR-option.yml new file mode 100644 index 00000000000..741a0faf469 --- /dev/null +++ b/changelogs/unreleased/17690-Protect-TeamCity-builds-for-triggering-when-a-branch-is-deleted-And-add-MR-option.yml @@ -0,0 +1,5 @@ +--- +title: Protect TeamCity builds from triggering when a branch has been deleted. And a MR-option +merge_request: 29836 +author: Nikolay Novikov, Raphael Tweitmann +type: fixed diff --git a/changelogs/unreleased/19569-include-information-if-issue-was-closed-via-mr.yml b/changelogs/unreleased/19569-include-information-if-issue-was-closed-via-mr.yml deleted file mode 100644 index bb2fc9af2a1..00000000000 --- a/changelogs/unreleased/19569-include-information-if-issue-was-closed-via-mr.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Include information if issue was clossed via merge request or commit -merge_request: 15610 -author: Michał Zając -type: changed diff --git a/changelogs/unreleased/237-style-toast-component.yml b/changelogs/unreleased/237-style-toast-component.yml deleted file mode 100644 index 2420df0ee55..00000000000 --- a/changelogs/unreleased/237-style-toast-component.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Style the toast component according to design specs. -merge_request: 27734 -author: -type: added diff --git a/changelogs/unreleased/27987-use-findorcreateservice-to-create-labels.yml b/changelogs/unreleased/27987-use-findorcreateservice-to-create-labels.yml deleted file mode 100644 index 8d3501e0171..00000000000 --- a/changelogs/unreleased/27987-use-findorcreateservice-to-create-labels.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use FindOrCreateService to create labels and check for existing ones -merge_request: 27987 -author: Matt Duren -type: fixed diff --git a/changelogs/unreleased/28757-remove-docker-pull-prefix-when-copying-a-tag-from-the-registry.yml b/changelogs/unreleased/28757-remove-docker-pull-prefix-when-copying-a-tag-from-the-registry.yml deleted file mode 100644 index e954b97f05b..00000000000 --- a/changelogs/unreleased/28757-remove-docker-pull-prefix-when-copying-a-tag-from-the-registry.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove `docker pull` prefix when copying a tag from the registry -merge_request: 28757 -author: Benedikt Franke -type: changed diff --git a/changelogs/unreleased/28996-create-mvc-ui-in-haml.yml b/changelogs/unreleased/28996-create-mvc-ui-in-haml.yml deleted file mode 100644 index 9c6897babb4..00000000000 --- a/changelogs/unreleased/28996-create-mvc-ui-in-haml.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add auto SSL toggle option to Pages domain settings page -merge_request: 26438 -author: -type: added diff --git a/changelogs/unreleased/30138-display-cycle-analytics-issue-logic-fixes.yml b/changelogs/unreleased/30138-display-cycle-analytics-issue-logic-fixes.yml deleted file mode 100644 index 574995f20fa..00000000000 --- a/changelogs/unreleased/30138-display-cycle-analytics-issue-logic-fixes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change logic behind cycle analytics -merge_request: 29018 -author: -type: changed diff --git a/changelogs/unreleased/30138-display-cycle-analytics-issue.yml b/changelogs/unreleased/30138-display-cycle-analytics-issue.yml deleted file mode 100644 index c7faa0480bd..00000000000 --- a/changelogs/unreleased/30138-display-cycle-analytics-issue.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show data on Cycle Analytics page when value is less than a second -merge_request: 28507 -author: -type: fixed diff --git a/changelogs/unreleased/33064-add-labels-to-note-event-payload.yml b/changelogs/unreleased/33064-add-labels-to-note-event-payload.yml deleted file mode 100644 index e0a6253e1ef..00000000000 --- a/changelogs/unreleased/33064-add-labels-to-note-event-payload.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add labels to note event payload -merge_request: 29384 -author: Sujay Patel -type: added diff --git a/changelogs/unreleased/35428-docker-registry-date-not-accurate.yml b/changelogs/unreleased/35428-docker-registry-date-not-accurate.yml deleted file mode 100644 index f51ecdf83a6..00000000000 --- a/changelogs/unreleased/35428-docker-registry-date-not-accurate.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Changed the 'Created' label to 'Last Updated' on the container registry table - to more accurately reflect what the date represents. -merge_request: 29464 -author: -type: other diff --git a/changelogs/unreleased/37495.yml b/changelogs/unreleased/37495.yml deleted file mode 100644 index f6d421fc45b..00000000000 --- a/changelogs/unreleased/37495.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add documentation links for confidental and locked discussions -merge_request: 29073 -author: -type: changed diff --git a/changelogs/unreleased/38105-pre-release-tag.yml b/changelogs/unreleased/38105-pre-release-tag.yml new file mode 100644 index 00000000000..d4c5dcacd19 --- /dev/null +++ b/changelogs/unreleased/38105-pre-release-tag.yml @@ -0,0 +1,5 @@ +--- +title: Renders a pre-release tag for releases +merge_request: 29797 +author: +type: changed diff --git a/changelogs/unreleased/38561-border-radii.yml b/changelogs/unreleased/38561-border-radii.yml deleted file mode 100644 index 510af18d651..00000000000 --- a/changelogs/unreleased/38561-border-radii.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix border radii on diff files and repo files -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/39304-broadcast-message-buttons.yml b/changelogs/unreleased/39304-broadcast-message-buttons.yml deleted file mode 100644 index 7eb289fca1f..00000000000 --- a/changelogs/unreleased/39304-broadcast-message-buttons.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update broadcast message action icons -merge_request: 28496 -author: Jarek Ostrowski @jareko -type: fixed diff --git a/changelogs/unreleased/42399-registry-confirm-deletion.yml b/changelogs/unreleased/42399-registry-confirm-deletion.yml new file mode 100644 index 00000000000..4d720e16721 --- /dev/null +++ b/changelogs/unreleased/42399-registry-confirm-deletion.yml @@ -0,0 +1,5 @@ +--- +title: Add confirmation for registry image deletion +merge_request: 29505 +author: +type: added diff --git a/changelogs/unreleased/45687-web-ide-empty-state.yml b/changelogs/unreleased/45687-web-ide-empty-state.yml deleted file mode 100644 index 9ef148275ab..00000000000 --- a/changelogs/unreleased/45687-web-ide-empty-state.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Empty project state for Web IDE -merge_request: 26556 -author: -type: added diff --git a/changelogs/unreleased/47846-position-is-off-when-visiting-files-with-anchors.yml b/changelogs/unreleased/47846-position-is-off-when-visiting-files-with-anchors.yml deleted file mode 100644 index 21dc170f1ca..00000000000 --- a/changelogs/unreleased/47846-position-is-off-when-visiting-files-with-anchors.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve Position is off when visiting files with anchors -merge_request: 28913 -author: -type: fixed diff --git a/changelogs/unreleased/49041-issue-board-input-height.yml b/changelogs/unreleased/49041-issue-board-input-height.yml deleted file mode 100644 index de3fbb2ee11..00000000000 --- a/changelogs/unreleased/49041-issue-board-input-height.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reduce height of issue board input to align with buttons -merge_request: -author: -type: other diff --git a/changelogs/unreleased/49517-fix-notes-import-export.yml b/changelogs/unreleased/49517-fix-notes-import-export.yml deleted file mode 100644 index a9f4d736e0b..00000000000 --- a/changelogs/unreleased/49517-fix-notes-import-export.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix diff notes and discussion notes being exported as regular notes -merge_request: 28401 -author: -type: fixed diff --git a/changelogs/unreleased/49814-display-in-admin-area-if-emails-are-verified-or-not.yml b/changelogs/unreleased/49814-display-in-admin-area-if-emails-are-verified-or-not.yml new file mode 100644 index 00000000000..db1391edd73 --- /dev/null +++ b/changelogs/unreleased/49814-display-in-admin-area-if-emails-are-verified-or-not.yml @@ -0,0 +1,5 @@ +--- +title: Add a verified pill next to email addresses under the admin users section. +merge_request: 29669 +author: +type: added diff --git a/changelogs/unreleased/49915-fix-error-500-admin-projects-nil-storage.yml b/changelogs/unreleased/49915-fix-error-500-admin-projects-nil-storage.yml deleted file mode 100644 index 307c2bfb49d..00000000000 --- a/changelogs/unreleased/49915-fix-error-500-admin-projects-nil-storage.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix an error in projects admin when statistics are missing -merge_request: 28355 -author: -type: fixed diff --git a/changelogs/unreleased/50106-hide-whitespace-changes.yml b/changelogs/unreleased/50106-hide-whitespace-changes.yml deleted file mode 100644 index e95953c8665..00000000000 --- a/changelogs/unreleased/50106-hide-whitespace-changes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix whitespace changes visibility when the related file was initially collapsed -merge_request: 28950 -author: Ondřej Budai -type: fixed diff --git a/changelogs/unreleased/50850-kerrizor-extend-api-to-accept-start_project-option.yml b/changelogs/unreleased/50850-kerrizor-extend-api-to-accept-start_project-option.yml deleted file mode 100644 index 45770e1012c..00000000000 --- a/changelogs/unreleased/50850-kerrizor-extend-api-to-accept-start_project-option.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add API support for committing changes to different projects in same fork network -merge_request: 27915 -author: -type: added diff --git a/changelogs/unreleased/51022-added-extended-height-to-labels-dropdown.yml b/changelogs/unreleased/51022-added-extended-height-to-labels-dropdown.yml deleted file mode 100644 index 07bf8b04bbe..00000000000 --- a/changelogs/unreleased/51022-added-extended-height-to-labels-dropdown.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Added the `.extended-height` class to the labels-dropdown" -merge_request: 28659 -author: Michel Engelen -type: other diff --git a/changelogs/unreleased/51636-task-list-api-pderichs.yml b/changelogs/unreleased/51636-task-list-api-pderichs.yml deleted file mode 100644 index f18a0936ab2..00000000000 --- a/changelogs/unreleased/51636-task-list-api-pderichs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add task count and completed count to responses of Issue and MR -merge_request: 28859 -author: -type: added diff --git a/changelogs/unreleased/51854-api-to-get-all-project-group-members-returns-duplicates.yml b/changelogs/unreleased/51854-api-to-get-all-project-group-members-returns-duplicates.yml deleted file mode 100644 index 4e16b95ec11..00000000000 --- a/changelogs/unreleased/51854-api-to-get-all-project-group-members-returns-duplicates.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Removes duplicated members from api/projects/:id/members/all -merge_request: 24005 -author: Jacopo Beschi @jacopo-beschi -type: changed diff --git a/changelogs/unreleased/53134-multiple-extendes-for-a-job.yml b/changelogs/unreleased/53134-multiple-extendes-for-a-job.yml deleted file mode 100644 index e09de8ac8fc..00000000000 --- a/changelogs/unreleased/53134-multiple-extendes-for-a-job.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add support for multiple job parents in GitLab CI YAML. -merge_request: 26801 -author: Wolphin (Nikita) -type: added diff --git a/changelogs/unreleased/54140-non-ar-cache-commit-markdown.yml b/changelogs/unreleased/54140-non-ar-cache-commit-markdown.yml deleted file mode 100644 index efda07380a4..00000000000 --- a/changelogs/unreleased/54140-non-ar-cache-commit-markdown.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use Redis for CacheMarkDownField on non AR models -merge_request: 29054 -author: -type: performance diff --git a/changelogs/unreleased/54169-flash-warning-rebrush.yml b/changelogs/unreleased/54169-flash-warning-rebrush.yml deleted file mode 100644 index 420cc26a8cc..00000000000 --- a/changelogs/unreleased/54169-flash-warning-rebrush.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Rebrush of flash-warning according to the new design (brighter background and darker font)" -merge_request: 28916 -author: Michel Engelen -type: changed diff --git a/changelogs/unreleased/55033-discussion-system-note-alignment.yml b/changelogs/unreleased/55033-discussion-system-note-alignment.yml deleted file mode 100644 index 27072ec7e12..00000000000 --- a/changelogs/unreleased/55033-discussion-system-note-alignment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Align system note within discussion with other notes -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/55125-mr-tab-scrolling.yml b/changelogs/unreleased/55125-mr-tab-scrolling.yml deleted file mode 100644 index e03ff6c5060..00000000000 --- a/changelogs/unreleased/55125-mr-tab-scrolling.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update merge request tabs so they no longer scroll -merge_request: -author: -type: other diff --git a/changelogs/unreleased/55253-activity-feed-ui-enhance-line-height.yml b/changelogs/unreleased/55253-activity-feed-ui-enhance-line-height.yml deleted file mode 100644 index f7dd8c59a7c..00000000000 --- a/changelogs/unreleased/55253-activity-feed-ui-enhance-line-height.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enhance line-height of Activity feed UI -merge_request: 28856 -author: Jacopo Beschi @jacopo-beschi -type: changed diff --git a/changelogs/unreleased/55362-refresh-blank-service-account-token.yml b/changelogs/unreleased/55362-refresh-blank-service-account-token.yml deleted file mode 100644 index 3189de97e8b..00000000000 --- a/changelogs/unreleased/55362-refresh-blank-service-account-token.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Refresh service_account_token for kubernetes_namespaces -merge_request: 29657 -author: -type: fixed diff --git a/changelogs/unreleased/55447-validate-k8s-credentials.yml b/changelogs/unreleased/55447-validate-k8s-credentials.yml deleted file mode 100644 index 81f0efdb325..00000000000 --- a/changelogs/unreleased/55447-validate-k8s-credentials.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Validate Kubernetes credentials at cluster creation -merge_request: 27403 -author: -type: added diff --git a/changelogs/unreleased/5615-non-admins-only-archieve-ce.yml b/changelogs/unreleased/5615-non-admins-only-archieve-ce.yml deleted file mode 100644 index ac1aa249b82..00000000000 --- a/changelogs/unreleased/5615-non-admins-only-archieve-ce.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add deletion protection setting column to application_settings table -merge_request: 29268 -author: -type: other diff --git a/changelogs/unreleased/56737-commits-and-mr-events-on-jira-api.yml b/changelogs/unreleased/56737-commits-and-mr-events-on-jira-api.yml deleted file mode 100644 index ee2ce8acaeb..00000000000 --- a/changelogs/unreleased/56737-commits-and-mr-events-on-jira-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Expose all current events properly on services API -merge_request: 29736 -author: Zsolt Kovari -type: fixed diff --git a/changelogs/unreleased/56959-drop-project_auto_devops_domain.yml b/changelogs/unreleased/56959-drop-project_auto_devops_domain.yml deleted file mode 100644 index c529749670d..00000000000 --- a/changelogs/unreleased/56959-drop-project_auto_devops_domain.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Removes project_auto_devops#domain column -merge_request: 28574 -author: -type: other diff --git a/changelogs/unreleased/56959-remove-auto-devops-domain-ci-variable.yml b/changelogs/unreleased/56959-remove-auto-devops-domain-ci-variable.yml deleted file mode 100644 index c1c1708f935..00000000000 --- a/changelogs/unreleased/56959-remove-auto-devops-domain-ci-variable.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Removes support for AUTO_DEVOPS_DOMAIN -merge_request: 28460 -author: -type: removed diff --git a/changelogs/unreleased/57037-fix-mr-checkboxes-mobile-alignment.yml b/changelogs/unreleased/57037-fix-mr-checkboxes-mobile-alignment.yml deleted file mode 100644 index a2de6cd6d45..00000000000 --- a/changelogs/unreleased/57037-fix-mr-checkboxes-mobile-alignment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix Merge Request merge checkbox alignment on mobile view -merge_request: 28845 -author: -type: fixed diff --git a/changelogs/unreleased/57189-css-label-in-forms-with-bootstrap4.yml b/changelogs/unreleased/57189-css-label-in-forms-with-bootstrap4.yml deleted file mode 100644 index 86b6bb20253..00000000000 --- a/changelogs/unreleased/57189-css-label-in-forms-with-bootstrap4.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix col-sm-* in forms to keep layout -merge_request: 24885 -author: Takuya Noguchi -type: fixed diff --git a/changelogs/unreleased/57813-merge-request-tabs-do-not-handle-ctrl-click-correctly.yml b/changelogs/unreleased/57813-merge-request-tabs-do-not-handle-ctrl-click-correctly.yml deleted file mode 100644 index 272faa67fcf..00000000000 --- a/changelogs/unreleased/57813-merge-request-tabs-do-not-handle-ctrl-click-correctly.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow command/control click to open link in new tab on Merge Request tabs -merge_request: 29506 -author: -type: fixed diff --git a/changelogs/unreleased/57825-moving-an-issue-results-in-broken-image-links-in-comments.yml b/changelogs/unreleased/57825-moving-an-issue-results-in-broken-image-links-in-comments.yml deleted file mode 100644 index faa1784ea21..00000000000 --- a/changelogs/unreleased/57825-moving-an-issue-results-in-broken-image-links-in-comments.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve moving an issue results in broken image links in comments -merge_request: 28654 -author: -type: fixed diff --git a/changelogs/unreleased/58065-uniform-html-txt-email.yml b/changelogs/unreleased/58065-uniform-html-txt-email.yml new file mode 100644 index 00000000000..be34e93ff83 --- /dev/null +++ b/changelogs/unreleased/58065-uniform-html-txt-email.yml @@ -0,0 +1,5 @@ +--- +title: Always shows author of created issue/started discussion/comment in HTML body and text of email +merge_request: 29886 +author: Frank van Rest +type: fixed diff --git a/changelogs/unreleased/58269-separate-update-patch.yml b/changelogs/unreleased/58269-separate-update-patch.yml deleted file mode 100644 index e9b44257b07..00000000000 --- a/changelogs/unreleased/58269-separate-update-patch.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Do not display Update app button when saving Knative domain name -merge_request: 28904 -author: -type: changed diff --git a/changelogs/unreleased/58297-remove-extraneous-gitaly-calls-from-md-rendering.yml b/changelogs/unreleased/58297-remove-extraneous-gitaly-calls-from-md-rendering.yml deleted file mode 100644 index 25cc973159f..00000000000 --- a/changelogs/unreleased/58297-remove-extraneous-gitaly-calls-from-md-rendering.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reduce Gitaly calls to improve performance when rendering suggestions -merge_request: 29027 -author: -type: performance diff --git a/changelogs/unreleased/58404-set-default-max-depth-for-GraphQL.yml b/changelogs/unreleased/58404-set-default-max-depth-for-GraphQL.yml deleted file mode 100644 index 7e95158a0e0..00000000000 --- a/changelogs/unreleased/58404-set-default-max-depth-for-GraphQL.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 58404 - setup max depth for GraphQL -merge_request: 25737 -author: Ken Ding -type: added diff --git a/changelogs/unreleased/58433-email-notifications-do-not-work-properly-issue-due-date.yml b/changelogs/unreleased/58433-email-notifications-do-not-work-properly-issue-due-date.yml deleted file mode 100644 index 4579721446a..00000000000 --- a/changelogs/unreleased/58433-email-notifications-do-not-work-properly-issue-due-date.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix email notifications for user excluded actions -merge_request: 28835 -author: -type: fixed diff --git a/changelogs/unreleased/58538-discussion-top-radius.yml b/changelogs/unreleased/58538-discussion-top-radius.yml deleted file mode 100644 index 0fb16055623..00000000000 --- a/changelogs/unreleased/58538-discussion-top-radius.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix border radius of discussions -merge_request: 28490 -author: -type: fixed diff --git a/changelogs/unreleased/58632-fix-mr-widget-padding.yml b/changelogs/unreleased/58632-fix-mr-widget-padding.yml deleted file mode 100644 index fb4e1791359..00000000000 --- a/changelogs/unreleased/58632-fix-mr-widget-padding.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix padding in MR widget -merge_request: 28472 -author: -type: fixed diff --git a/changelogs/unreleased/58941-use-gitlab-serverless-with-existing-knative-installation.yml b/changelogs/unreleased/58941-use-gitlab-serverless-with-existing-knative-installation.yml deleted file mode 100644 index 53be008816d..00000000000 --- a/changelogs/unreleased/58941-use-gitlab-serverless-with-existing-knative-installation.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enable function features for external Knative installations -merge_request: 27173 -author: -type: changed diff --git a/changelogs/unreleased/58984-doc-missing-milestones-and-labels-links.yml b/changelogs/unreleased/58984-doc-missing-milestones-and-labels-links.yml deleted file mode 100644 index 6b74303c16e..00000000000 --- a/changelogs/unreleased/58984-doc-missing-milestones-and-labels-links.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Document when milestones and labels links are missing -merge_request: 29355 -author: -type: other diff --git a/changelogs/unreleased/59023-fix-web-ide-creating-branches-off-new-commits.yml b/changelogs/unreleased/59023-fix-web-ide-creating-branches-off-new-commits.yml deleted file mode 100644 index f7e0ee333aa..00000000000 --- a/changelogs/unreleased/59023-fix-web-ide-creating-branches-off-new-commits.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix IDE commit using latest ref in branch and overriding contents -merge_request: 29769 -author: -type: fixed diff --git a/changelogs/unreleased/59026-replace-favicon.yml b/changelogs/unreleased/59026-replace-favicon.yml deleted file mode 100644 index 34228bb8438..00000000000 --- a/changelogs/unreleased/59026-replace-favicon.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update favicon from next -merge_request: 28601 -author: Jarek Ostrowski @jareko -type: fixed diff --git a/changelogs/unreleased/59028-fix-extra-plus-in-diffs.yml b/changelogs/unreleased/59028-fix-extra-plus-in-diffs.yml new file mode 100644 index 00000000000..0786f4dbc10 --- /dev/null +++ b/changelogs/unreleased/59028-fix-extra-plus-in-diffs.yml @@ -0,0 +1,5 @@ +--- +title: Remove duplicate trailing +/- char in merge request discussions +merge_request: 29518 +author: +type: fixed diff --git a/changelogs/unreleased/59105-padding-unclickable-pipeline-job.yml b/changelogs/unreleased/59105-padding-unclickable-pipeline-job.yml deleted file mode 100644 index 95f08af3cb1..00000000000 --- a/changelogs/unreleased/59105-padding-unclickable-pipeline-job.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix padding of unclickable pipeline dropdown items to match links -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/59376-Report-abuse-to-GitLab-should-be-Report-abuse-in-non-gitlab-com-instances.yml b/changelogs/unreleased/59376-Report-abuse-to-GitLab-should-be-Report-abuse-in-non-gitlab-com-instances.yml deleted file mode 100644 index 0904f788b6f..00000000000 --- a/changelogs/unreleased/59376-Report-abuse-to-GitLab-should-be-Report-abuse-in-non-gitlab-com-instances.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change "Report abuse to GitLab" to more generic wording -merge_request: 28884 -author: Marc Schwede -type: other diff --git a/changelogs/unreleased/59587-add-graphql-logging.yml b/changelogs/unreleased/59587-add-graphql-logging.yml deleted file mode 100644 index 74c2a734f37..00000000000 --- a/changelogs/unreleased/59587-add-graphql-logging.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add dedicated logging for GraphQL queries -merge_request: 27885 -author: -type: other diff --git a/changelogs/unreleased/59651-remove-unnecessary-decimal-places-on-chart-axes.yml b/changelogs/unreleased/59651-remove-unnecessary-decimal-places-on-chart-axes.yml deleted file mode 100644 index fea34099135..00000000000 --- a/changelogs/unreleased/59651-remove-unnecessary-decimal-places-on-chart-axes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove unnecessary decimals on Metrics chart axis -merge_request: 29468 -author: -type: fixed diff --git a/changelogs/unreleased/59987-move-sign-in-2fa-on-users-sign_in-above-intro-content-on-mobile.yml b/changelogs/unreleased/59987-move-sign-in-2fa-on-users-sign_in-above-intro-content-on-mobile.yml deleted file mode 100644 index 7863f1f7bbe..00000000000 --- a/changelogs/unreleased/59987-move-sign-in-2fa-on-users-sign_in-above-intro-content-on-mobile.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prioritize login form on mobile breakpoint -merge_request: 28360 -author: -type: changed diff --git a/changelogs/unreleased/60034-default-web-ide-s-merge-request-checkbox-to-true.yml b/changelogs/unreleased/60034-default-web-ide-s-merge-request-checkbox-to-true.yml deleted file mode 100644 index fdf80c660f7..00000000000 --- a/changelogs/unreleased/60034-default-web-ide-s-merge-request-checkbox-to-true.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Default MR checkbox to true in most cases -merge_request: !28665 -author: -type: changed diff --git a/changelogs/unreleased/60180-jira-service-fix-nil-on-find-call.yml b/changelogs/unreleased/60180-jira-service-fix-nil-on-find-call.yml deleted file mode 100644 index 6891a9ca83c..00000000000 --- a/changelogs/unreleased/60180-jira-service-fix-nil-on-find-call.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Resolved JIRA service: NoMethodError: undefined method ''find'' for nil:NilClass' -merge_request: 28206 -author: -type: fixed diff --git a/changelogs/unreleased/60250-remove-mr_push_options-flag.yml b/changelogs/unreleased/60250-remove-mr_push_options-flag.yml deleted file mode 100644 index b429d83dcc7..00000000000 --- a/changelogs/unreleased/60250-remove-mr_push_options-flag.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove the mr_push_options feature flag -merge_request: 28278 -author: -type: changed diff --git a/changelogs/unreleased/60303-replace-sidekiq-mtail-metrics.yml b/changelogs/unreleased/60303-replace-sidekiq-mtail-metrics.yml deleted file mode 100644 index 90b72ec05c7..00000000000 --- a/changelogs/unreleased/60303-replace-sidekiq-mtail-metrics.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Replaces sidekiq mtail metrics with ruby instrumentation metrics -merge_request: 29215 -author: -type: changed diff --git a/changelogs/unreleased/60323-inline-validation-for-users-name-and-username-length.yml b/changelogs/unreleased/60323-inline-validation-for-users-name-and-username-length.yml deleted file mode 100644 index 83b7bd3433e..00000000000 --- a/changelogs/unreleased/60323-inline-validation-for-users-name-and-username-length.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update registration form to indicate invalid name or username length on input -merge_request: 28095 -author: Jiaan Louw -type: changed diff --git a/changelogs/unreleased/60379-remove-ci-preparing-state-feature-flag.yml b/changelogs/unreleased/60379-remove-ci-preparing-state-feature-flag.yml deleted file mode 100644 index a9b7aeb3024..00000000000 --- a/changelogs/unreleased/60379-remove-ci-preparing-state-feature-flag.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove ability for group clusters to be automatically configured on creation -merge_request: 27245 -author: -type: removed diff --git a/changelogs/unreleased/60425-fix-500-when-accessing-charts-with-anonymous-user.yml b/changelogs/unreleased/60425-fix-500-when-accessing-charts-with-anonymous-user.yml deleted file mode 100644 index 4274dc5918c..00000000000 --- a/changelogs/unreleased/60425-fix-500-when-accessing-charts-with-anonymous-user.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Fix 500 error when accessing charts with an anonymous user" -merge_request: 28091 -author: Diego Silva -type: fixed diff --git a/changelogs/unreleased/60617-allow-switching-from-gitlab-managed-to-unmanaged-clusters.yml b/changelogs/unreleased/60617-allow-switching-from-gitlab-managed-to-unmanaged-clusters.yml deleted file mode 100644 index 1127dde4fcf..00000000000 --- a/changelogs/unreleased/60617-allow-switching-from-gitlab-managed-to-unmanaged-clusters.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow switching clusters between managed and unmanaged -merge_request: 29322 -author: -type: added diff --git a/changelogs/unreleased/60617-enable-project-cluster-jit.yml b/changelogs/unreleased/60617-enable-project-cluster-jit.yml new file mode 100644 index 00000000000..b7d745d4385 --- /dev/null +++ b/changelogs/unreleased/60617-enable-project-cluster-jit.yml @@ -0,0 +1,5 @@ +--- +title: Enable just-in-time Kubernetes resource creation for project-level clusters +merge_request: 29515 +author: +type: changed diff --git a/changelogs/unreleased/60750-milestone-header.yml b/changelogs/unreleased/60750-milestone-header.yml deleted file mode 100644 index 62cfdaf6ea7..00000000000 --- a/changelogs/unreleased/60750-milestone-header.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix layout of group milestone header -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/60818_yamllint_project_root.yml b/changelogs/unreleased/60818_yamllint_project_root.yml deleted file mode 100644 index b34a50e6a9c..00000000000 --- a/changelogs/unreleased/60818_yamllint_project_root.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix yaml linting for project root *.yml files -merge_request: 27579 -author: Will Hall -type: fixed diff --git a/changelogs/unreleased/60819_yamllint_gitlabci.yml b/changelogs/unreleased/60819_yamllint_gitlabci.yml deleted file mode 100644 index aba3b206f7e..00000000000 --- a/changelogs/unreleased/60819_yamllint_gitlabci.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix yaml linting for GitLab CI inside project (.gitlab/ci) *.yml files and CI template files -merge_request: 27576 -author: Will Hall -type: fixed diff --git a/changelogs/unreleased/609120-ref-link.yml b/changelogs/unreleased/609120-ref-link.yml deleted file mode 100644 index 97c93b7ff53..00000000000 --- a/changelogs/unreleased/609120-ref-link.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixes Ref link being displayed as raw HTML in the Pipelines page -merge_request: 28823 -author: -type: fixed diff --git a/changelogs/unreleased/60987-emoji-picker-popup.yml b/changelogs/unreleased/60987-emoji-picker-popup.yml deleted file mode 100644 index 3bccec8e164..00000000000 --- a/changelogs/unreleased/60987-emoji-picker-popup.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix emoji picker visibility issue -merge_request: 28984 -author: -type: fixed diff --git a/changelogs/unreleased/61024-update-resolved-icon.yml b/changelogs/unreleased/61024-update-resolved-icon.yml deleted file mode 100644 index 4a4de9eb13a..00000000000 --- a/changelogs/unreleased/61024-update-resolved-icon.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add check circle filled icon for resolved comments -merge_request: 28663 -author: -type: changed diff --git a/changelogs/unreleased/6104-ee-ce-difference.yml b/changelogs/unreleased/6104-ee-ce-difference.yml deleted file mode 100644 index 59d31daf0eb..00000000000 --- a/changelogs/unreleased/6104-ee-ce-difference.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Unified EE/CS differences in repository/show.html -merge_request: 13562 -author: -type: other diff --git a/changelogs/unreleased/61045-charts-with-many-overlapping-series-display-incorrectly.yml b/changelogs/unreleased/61045-charts-with-many-overlapping-series-display-incorrectly.yml deleted file mode 100644 index 53cc0a15417..00000000000 --- a/changelogs/unreleased/61045-charts-with-many-overlapping-series-display-incorrectly.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Eliminate color inconsistencies in metric graphs -merge_request: 29127 -author: -type: fixed diff --git a/changelogs/unreleased/61049-links-activity-stream.yml b/changelogs/unreleased/61049-links-activity-stream.yml deleted file mode 100644 index 3aac84adc31..00000000000 --- a/changelogs/unreleased/61049-links-activity-stream.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use blue for activity stream links; use monospace font for commit sha -merge_request: -author: -type: other diff --git a/changelogs/unreleased/61072-link-to-user-profile-not-distinguishable-on-latest-commit-widget.yml b/changelogs/unreleased/61072-link-to-user-profile-not-distinguishable-on-latest-commit-widget.yml deleted file mode 100644 index 5285ac767cc..00000000000 --- a/changelogs/unreleased/61072-link-to-user-profile-not-distinguishable-on-latest-commit-widget.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: User link styling for commits -merge_request: 29150 -author: -type: other diff --git a/changelogs/unreleased/61144-style-secondary-button-type-to-be-aligned-with-pattern-library.yml b/changelogs/unreleased/61144-style-secondary-button-type-to-be-aligned-with-pattern-library.yml deleted file mode 100644 index ed4cf0507c7..00000000000 --- a/changelogs/unreleased/61144-style-secondary-button-type-to-be-aligned-with-pattern-library.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bring secondary button styles up to design standard -merge_request: 27920 -author: -type: fixed diff --git a/changelogs/unreleased/61157-reviewer-roulette-shouldn-t-include-the-author-as-a-possibility.yml b/changelogs/unreleased/61157-reviewer-roulette-shouldn-t-include-the-author-as-a-possibility.yml deleted file mode 100644 index 8d1a38b3db5..00000000000 --- a/changelogs/unreleased/61157-reviewer-roulette-shouldn-t-include-the-author-as-a-possibility.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Excludes MR author from Review roulette -merge_request: 28886 -author: Jacopo Beschi @jacopo-beschi -type: fixed diff --git a/changelogs/unreleased/61313-fix-dropdown-searchbar.yml b/changelogs/unreleased/61313-fix-dropdown-searchbar.yml deleted file mode 100644 index ba191a89da2..00000000000 --- a/changelogs/unreleased/61313-fix-dropdown-searchbar.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix loading.. dropdown at search field -merge_request: 28275 -author: Pavel Chausov -type: fixed diff --git a/changelogs/unreleased/61323-snippet-copy-icon-button-is-misaligned.yml b/changelogs/unreleased/61323-snippet-copy-icon-button-is-misaligned.yml deleted file mode 100644 index 94666ac12ec..00000000000 --- a/changelogs/unreleased/61323-snippet-copy-icon-button-is-misaligned.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve Snippet icon button is misaligned -merge_request: 28522 -author: -type: other diff --git a/changelogs/unreleased/61324-non-project-snippet-new-snippet-button-should-be-green-outline.yml b/changelogs/unreleased/61324-non-project-snippet-new-snippet-button-should-be-green-outline.yml deleted file mode 100644 index a7f5706058d..00000000000 --- a/changelogs/unreleased/61324-non-project-snippet-new-snippet-button-should-be-green-outline.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Give New Snippet button green outline -merge_request: 28559 -author: -type: other diff --git a/changelogs/unreleased/61339-Add-underline-to-attach-a-file.yml b/changelogs/unreleased/61339-Add-underline-to-attach-a-file.yml deleted file mode 100644 index e446459ffc8..00000000000 --- a/changelogs/unreleased/61339-Add-underline-to-attach-a-file.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add hover and focus to Attach a file -merge_request: 28682 -author: -type: fixed diff --git a/changelogs/unreleased/61393-emoji-button.yml b/changelogs/unreleased/61393-emoji-button.yml deleted file mode 100644 index 2bcfde308db..00000000000 --- a/changelogs/unreleased/61393-emoji-button.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change default color of award emoji button -merge_request: -author: -type: other diff --git a/changelogs/unreleased/61441.yml b/changelogs/unreleased/61441.yml deleted file mode 100644 index 2ad0c6f62d3..00000000000 --- a/changelogs/unreleased/61441.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow user to set primary email first when 2FA is required -merge_request: 28097 -author: Kartikey Tanna -type: fixed diff --git a/changelogs/unreleased/61511-add-expand-collapse-to-project-operation-settings.yml b/changelogs/unreleased/61511-add-expand-collapse-to-project-operation-settings.yml deleted file mode 100644 index 1a3a019e1f4..00000000000 --- a/changelogs/unreleased/61511-add-expand-collapse-to-project-operation-settings.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add expand/collapse to error tracking settings -merge_request: 28619 -author: -type: added diff --git a/changelogs/unreleased/61565-merge-request-discussion-text-jumps-when-resolved.yml b/changelogs/unreleased/61565-merge-request-discussion-text-jumps-when-resolved.yml deleted file mode 100644 index 718604c9ceb..00000000000 --- a/changelogs/unreleased/61565-merge-request-discussion-text-jumps-when-resolved.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve Merge request discussion text jumps when resolved -merge_request: 28995 -author: -type: fixed diff --git a/changelogs/unreleased/61606-support-string-piwik-website-ids.yml b/changelogs/unreleased/61606-support-string-piwik-website-ids.yml deleted file mode 100644 index 5c525294132..00000000000 --- a/changelogs/unreleased/61606-support-string-piwik-website-ids.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Supports Matomo/Piwik string website ID (\"Protect Track ID\" plugin)" -merge_request: 28214 -author: DUVERGIER Claude -type: fixed
\ No newline at end of file diff --git a/changelogs/unreleased/61629-dependency-installation-error-on-fsevents-1-2-4-with-node-js-12.yml b/changelogs/unreleased/61629-dependency-installation-error-on-fsevents-1-2-4-with-node-js-12.yml deleted file mode 100644 index bbe43760953..00000000000 --- a/changelogs/unreleased/61629-dependency-installation-error-on-fsevents-1-2-4-with-node-js-12.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update indirect dependency fsevents from 1.2.4 to 1.2.9 -merge_request: 28220 -author: Takuya Noguchi -type: other diff --git a/changelogs/unreleased/61639-flaky-spec-issue-boards-labels-creates-project-label-spec-features-boards-sidebar_spec-rb-350.yml b/changelogs/unreleased/61639-flaky-spec-issue-boards-labels-creates-project-label-spec-features-boards-sidebar_spec-rb-350.yml deleted file mode 100644 index 9b4f13353f5..00000000000 --- a/changelogs/unreleased/61639-flaky-spec-issue-boards-labels-creates-project-label-spec-features-boards-sidebar_spec-rb-350.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix dropdown position when loading remote data -merge_request: 28526 -author: -type: fixed diff --git a/changelogs/unreleased/61697-add-project-id-to-le-common-name.yml b/changelogs/unreleased/61697-add-project-id-to-le-common-name.yml deleted file mode 100644 index 8ffa8d0a51a..00000000000 --- a/changelogs/unreleased/61697-add-project-id-to-le-common-name.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent common name collisions when requesting multiple Let's Encrypt certificates concurrently -merge_request: 28373 -author: -type: fixed diff --git a/changelogs/unreleased/61788-predefined-colours-dont-have-descriptive-labels.yml b/changelogs/unreleased/61788-predefined-colours-dont-have-descriptive-labels.yml deleted file mode 100644 index 25c83d24007..00000000000 --- a/changelogs/unreleased/61788-predefined-colours-dont-have-descriptive-labels.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds a text label to color pickers to improve accessibility. -merge_request: 28343 -author: Chris Toynbee -type: changed diff --git a/changelogs/unreleased/61795-fix-error-when-moving-issues.yml b/changelogs/unreleased/61795-fix-error-when-moving-issues.yml deleted file mode 100644 index 6812baa07c3..00000000000 --- a/changelogs/unreleased/61795-fix-error-when-moving-issues.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove unintended error message shown when moving issues -merge_request: 28317 -author: -type: fixed diff --git a/changelogs/unreleased/61821-tooltip-consistency.yml b/changelogs/unreleased/61821-tooltip-consistency.yml deleted file mode 100644 index 9b131907ebf..00000000000 --- a/changelogs/unreleased/61821-tooltip-consistency.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve Tooltip Consistency -merge_request: 28839 -author: -type: fixed diff --git a/changelogs/unreleased/61827-prevent-user-popover-icon-shrink.yml b/changelogs/unreleased/61827-prevent-user-popover-icon-shrink.yml deleted file mode 100644 index 4d6464eed52..00000000000 --- a/changelogs/unreleased/61827-prevent-user-popover-icon-shrink.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent icons from shrinking in User popover when contents exceed container -merge_request: 28696 -author: -type: fixed diff --git a/changelogs/unreleased/61880-download-btn-group.yml b/changelogs/unreleased/61880-download-btn-group.yml deleted file mode 100644 index c1f6b2767c6..00000000000 --- a/changelogs/unreleased/61880-download-btn-group.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Group download buttons into a .btn-group -merge_request: -author: -type: other diff --git a/changelogs/unreleased/61914-fix-emojis-urls.yml b/changelogs/unreleased/61914-fix-emojis-urls.yml deleted file mode 100644 index 578edf4a063..00000000000 --- a/changelogs/unreleased/61914-fix-emojis-urls.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix emojis URLs -merge_request: 28371 -author: -type: fixed diff --git a/changelogs/unreleased/61928-remove-throttle-from-dirty-submit.yml b/changelogs/unreleased/61928-remove-throttle-from-dirty-submit.yml deleted file mode 100644 index f8ef5dbb53b..00000000000 --- a/changelogs/unreleased/61928-remove-throttle-from-dirty-submit.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Fix issue that causes "Save changes" button in project settings pages to be - enabled/disabled incorrectly when changes are made to the form -merge_request: 28377 -author: -type: fixed diff --git a/changelogs/unreleased/61960-translatable-strings-in-issue-closure-emails.yml b/changelogs/unreleased/61960-translatable-strings-in-issue-closure-emails.yml deleted file mode 100644 index 50b3efba0a5..00000000000 --- a/changelogs/unreleased/61960-translatable-strings-in-issue-closure-emails.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: I18n for issue closure reason in emails -merge_request: 28489 -author: Michał Zając -type: changed diff --git a/changelogs/unreleased/61988-collapse-icon-on-merge-request-diff-larger-than-profile-picture.yml b/changelogs/unreleased/61988-collapse-icon-on-merge-request-diff-larger-than-profile-picture.yml deleted file mode 100644 index 4d2f73ce2ff..00000000000 --- a/changelogs/unreleased/61988-collapse-icon-on-merge-request-diff-larger-than-profile-picture.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change collapse icon size to size of profile picture -merge_request: 28512 -author: -type: other diff --git a/changelogs/unreleased/61990-spinner.yml b/changelogs/unreleased/61990-spinner.yml deleted file mode 100644 index 27d35e56cc9..00000000000 --- a/changelogs/unreleased/61990-spinner.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Updates loading icon in commits page -merge_request: 28475 -author: -type: fixed diff --git a/changelogs/unreleased/62061-note-icon-color.yml b/changelogs/unreleased/62061-note-icon-color.yml deleted file mode 100644 index 5bfea1a9ed3..00000000000 --- a/changelogs/unreleased/62061-note-icon-color.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update icon color to match design system, pass accessibility -merge_request: 28498 -author: Jarek Ostrowski @jareko -type: fixed diff --git a/changelogs/unreleased/62091-remove-time-windows-flag.yml b/changelogs/unreleased/62091-remove-time-windows-flag.yml deleted file mode 100644 index c6c11328312..00000000000 --- a/changelogs/unreleased/62091-remove-time-windows-flag.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow users to specify a time range on metrics dashboard -merge_request: 28670 -author: -type: added diff --git a/changelogs/unreleased/62092-missing-padding-next-to-time-windows-dropdown-on-metrics-dashboard.yml b/changelogs/unreleased/62092-missing-padding-next-to-time-windows-dropdown-on-metrics-dashboard.yml deleted file mode 100644 index 3317d505924..00000000000 --- a/changelogs/unreleased/62092-missing-padding-next-to-time-windows-dropdown-on-metrics-dashboard.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added padding to time window dropdown in monitor dashboard -merge_request: 28897 -author: -type: fixed diff --git a/changelogs/unreleased/62107-fix-detail-page-header-height.yml b/changelogs/unreleased/62107-fix-detail-page-header-height.yml deleted file mode 100644 index 3723f323bcc..00000000000 --- a/changelogs/unreleased/62107-fix-detail-page-header-height.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix the height of the page headers on issues/merge request/snippets pages -merge_request: 28650 -author: Erik van der Gaag -type: fixed diff --git a/changelogs/unreleased/62116-performance-issue-502-errors-on-rendering-of-issues-with-heavy-markdown-contents.yml b/changelogs/unreleased/62116-performance-issue-502-errors-on-rendering-of-issues-with-heavy-markdown-contents.yml deleted file mode 100644 index 9596f487116..00000000000 --- a/changelogs/unreleased/62116-performance-issue-502-errors-on-rendering-of-issues-with-heavy-markdown-contents.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Fix performance issue with large Markdown content in issue or merge request - description -merge_request: 28597 -author: -type: performance diff --git a/changelogs/unreleased/62124-new-threaded-discussion-design.yml b/changelogs/unreleased/62124-new-threaded-discussion-design.yml deleted file mode 100644 index 6614e05be74..00000000000 --- a/changelogs/unreleased/62124-new-threaded-discussion-design.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Implement borderless discussion design with new reply field -merge_request: 28580 -author: -type: added diff --git a/changelogs/unreleased/62134-fix-non-wraping-project-description.yml b/changelogs/unreleased/62134-fix-non-wraping-project-description.yml deleted file mode 100644 index 8c734c526fe..00000000000 --- a/changelogs/unreleased/62134-fix-non-wraping-project-description.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Correctly word-wrapping project descriptions with very long words -merge_request: 28695 -author: Erik van der Gaag -type: fixed diff --git a/changelogs/unreleased/62144-fix-option-dropdown-button-size.yml b/changelogs/unreleased/62144-fix-option-dropdown-button-size.yml deleted file mode 100644 index 86d8f4536f9..00000000000 --- a/changelogs/unreleased/62144-fix-option-dropdown-button-size.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix inconsistent option dropdown button height to match adjacent button -merge_request: 29096 -author: -type: fixed diff --git a/changelogs/unreleased/62154-fe-create-fix-long-branch-name-in-dropdown.yml b/changelogs/unreleased/62154-fe-create-fix-long-branch-name-in-dropdown.yml deleted file mode 100644 index 1d951c1dc24..00000000000 --- a/changelogs/unreleased/62154-fe-create-fix-long-branch-name-in-dropdown.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Add support to view entirety of long branch name in dropdown instead of it - being cut off -merge_request: 29069 -author: -type: fixed diff --git a/changelogs/unreleased/62227-webkit-icon-overlap.yml b/changelogs/unreleased/62227-webkit-icon-overlap.yml deleted file mode 100644 index 47d7583f4c2..00000000000 --- a/changelogs/unreleased/62227-webkit-icon-overlap.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add style to disable webkit icons for search inputs -merge_request: 28833 -author: Jarek Ostrowski @jareko -type: fixed diff --git a/changelogs/unreleased/62253-add-kubernetes-logs-to-monitoring-ui.yml b/changelogs/unreleased/62253-add-kubernetes-logs-to-monitoring-ui.yml deleted file mode 100644 index c01106a15ec..00000000000 --- a/changelogs/unreleased/62253-add-kubernetes-logs-to-monitoring-ui.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add Kubernetes logs to Admin Logs UI -merge_request: 28685 -author: -type: added diff --git a/changelogs/unreleased/62300-target-area-for-dropdown-list-items-is-too-small-on-metrics-dashboard.yml b/changelogs/unreleased/62300-target-area-for-dropdown-list-items-is-too-small-on-metrics-dashboard.yml deleted file mode 100644 index 7944e6faa27..00000000000 --- a/changelogs/unreleased/62300-target-area-for-dropdown-list-items-is-too-small-on-metrics-dashboard.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enlarge metrics time-window dropdown links -merge_request: 29458 -author: -type: fixed diff --git a/changelogs/unreleased/62408-dropdown-truncate.yml b/changelogs/unreleased/62408-dropdown-truncate.yml deleted file mode 100644 index 7204016efdf..00000000000 --- a/changelogs/unreleased/62408-dropdown-truncate.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix job name in graph dropdown overflowing -merge_request: 28824 -author: -type: fixed diff --git a/changelogs/unreleased/62418-project-default-git-depth.yml b/changelogs/unreleased/62418-project-default-git-depth.yml deleted file mode 100644 index b5647cd0859..00000000000 --- a/changelogs/unreleased/62418-project-default-git-depth.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add project level git depth CI/CD setting -merge_request: 28919 -author: -type: added diff --git a/changelogs/unreleased/62432-fix-participants-wrapping.yml b/changelogs/unreleased/62432-fix-participants-wrapping.yml deleted file mode 100644 index a7e4bd372de..00000000000 --- a/changelogs/unreleased/62432-fix-participants-wrapping.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix participants list wrapping -merge_request: 28873 -author: -type: fixed diff --git a/changelogs/unreleased/62485-label-weights.yml b/changelogs/unreleased/62485-label-weights.yml deleted file mode 100644 index 354b18be11e..00000000000 --- a/changelogs/unreleased/62485-label-weights.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Give labels consistent weight -merge_request: 28895 -author: -type: fixed diff --git a/changelogs/unreleased/62487-external-policy-desc.yml b/changelogs/unreleased/62487-external-policy-desc.yml deleted file mode 100644 index 2e787b89db1..00000000000 --- a/changelogs/unreleased/62487-external-policy-desc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Move text under p tag -merge_request: 28901 -author: -type: fixed diff --git a/changelogs/unreleased/62656-adjusted-dropdown-styles.yml b/changelogs/unreleased/62656-adjusted-dropdown-styles.yml deleted file mode 100644 index 36f14ae2741..00000000000 --- a/changelogs/unreleased/62656-adjusted-dropdown-styles.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "changed the styles on `Add List` dropdown to look more like the EE vesion" -merge_request: 29338 -author: Michel Engelen -type: changed diff --git a/changelogs/unreleased/62684-add-index-public-email-on-users.yml b/changelogs/unreleased/62684-add-index-public-email-on-users.yml deleted file mode 100644 index 56b5f91da21..00000000000 --- a/changelogs/unreleased/62684-add-index-public-email-on-users.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add index on public_email for users -merge_request: 29430 -author: -type: performance diff --git a/changelogs/unreleased/62685-add-index-invite-email-to-members.yml b/changelogs/unreleased/62685-add-index-invite-email-to-members.yml deleted file mode 100644 index 80bb05e1709..00000000000 --- a/changelogs/unreleased/62685-add-index-invite-email-to-members.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add index on invite_email for members -merge_request: 29768 -author: -type: performance diff --git a/changelogs/unreleased/62772-disable-kubernetes-credential-passthrough.yml b/changelogs/unreleased/62772-disable-kubernetes-credential-passthrough.yml new file mode 100644 index 00000000000..35771e80821 --- /dev/null +++ b/changelogs/unreleased/62772-disable-kubernetes-credential-passthrough.yml @@ -0,0 +1,5 @@ +--- +title: Disable Kubernetes credential passthrough for managed project-level clusters +merge_request: 29262 +author: +type: removed diff --git a/changelogs/unreleased/62772-migrate-managed-clusters-to-unmanaged.yml b/changelogs/unreleased/62772-migrate-managed-clusters-to-unmanaged.yml new file mode 100644 index 00000000000..62a67c7b78d --- /dev/null +++ b/changelogs/unreleased/62772-migrate-managed-clusters-to-unmanaged.yml @@ -0,0 +1,6 @@ +--- +title: Migrate GitLab managed project-level clusters to unmanaged if a Kubernetes + namespace was unable to be created +merge_request: 29251 +author: +type: other diff --git a/changelogs/unreleased/62788-clean-up-pagination.yml b/changelogs/unreleased/62788-clean-up-pagination.yml deleted file mode 100644 index 05e3a4527b8..00000000000 --- a/changelogs/unreleased/62788-clean-up-pagination.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Moves the table pagination shared component -merge_request: -author: -type: other diff --git a/changelogs/unreleased/62788-graphql-pagination.yml b/changelogs/unreleased/62788-graphql-pagination.yml deleted file mode 100644 index a7bc317a08f..00000000000 --- a/changelogs/unreleased/62788-graphql-pagination.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds pagination component for graphql api -merge_request: 29277 -author: -type: added diff --git a/changelogs/unreleased/62847-url-for-the-next-request-with-pagination-is-missing-port.yml b/changelogs/unreleased/62847-url-for-the-next-request-with-pagination-is-missing-port.yml deleted file mode 100644 index fca92a0d4dc..00000000000 --- a/changelogs/unreleased/62847-url-for-the-next-request-with-pagination-is-missing-port.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Include the port in the URLs of the API Link headers -merge_request: 29267 -author: -type: fixed diff --git a/changelogs/unreleased/62910-task-completion-status-gql-pderichs.yml b/changelogs/unreleased/62910-task-completion-status-gql-pderichs.yml deleted file mode 100644 index dcbfa7c185d..00000000000 --- a/changelogs/unreleased/62910-task-completion-status-gql-pderichs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Make task completion status available via GraphQL -merge_request: -author: -type: added diff --git a/changelogs/unreleased/62966-embed-zoom-call-in-issue-mvc.yml b/changelogs/unreleased/62966-embed-zoom-call-in-issue-mvc.yml deleted file mode 100644 index a41873f671e..00000000000 --- a/changelogs/unreleased/62966-embed-zoom-call-in-issue-mvc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add Join meeting button to issues with Zoom links -merge_request: 29454 -author: -type: added diff --git a/changelogs/unreleased/62974-follow-up-from-wip-align-merge-request-icons-and-text.yml b/changelogs/unreleased/62974-follow-up-from-wip-align-merge-request-icons-and-text.yml deleted file mode 100644 index 811986e6857..00000000000 --- a/changelogs/unreleased/62974-follow-up-from-wip-align-merge-request-icons-and-text.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Make margin between buttons consistent' -merge_request: 29378 -author: -type: other diff --git a/changelogs/unreleased/63079-exclude-k8s-namespaces-with-no-service-account-token.yml b/changelogs/unreleased/63079-exclude-k8s-namespaces-with-no-service-account-token.yml deleted file mode 100644 index 9dc99c8a62f..00000000000 --- a/changelogs/unreleased/63079-exclude-k8s-namespaces-with-no-service-account-token.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Ensure a Kubernetes namespace is not used for deployments if there is no service - account token associated with it -merge_request: 29643 -author: -type: fixed diff --git a/changelogs/unreleased/63079-migrate-clusters-with-no-token-to-unmanaged.yml b/changelogs/unreleased/63079-migrate-clusters-with-no-token-to-unmanaged.yml new file mode 100644 index 00000000000..92133af03f7 --- /dev/null +++ b/changelogs/unreleased/63079-migrate-clusters-with-no-token-to-unmanaged.yml @@ -0,0 +1,6 @@ +--- +title: Migrate GitLab managed project-level clusters to unmanaged if they are missing + a Kubernetes service account token +merge_request: 29648 +author: +type: other diff --git a/changelogs/unreleased/63417-add-missing-class.yml b/changelogs/unreleased/63417-add-missing-class.yml deleted file mode 100644 index 3030f5c57e4..00000000000 --- a/changelogs/unreleased/63417-add-missing-class.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Indent collapsible sections -merge_request: 29804 -author: -type: other diff --git a/changelogs/unreleased/63507-fix-race-condition-fetching-token.yml b/changelogs/unreleased/63507-fix-race-condition-fetching-token.yml new file mode 100644 index 00000000000..7f2b59fc9eb --- /dev/null +++ b/changelogs/unreleased/63507-fix-race-condition-fetching-token.yml @@ -0,0 +1,5 @@ +--- +title: Retry fetching Kubernetes Secret#token (#63507) +merge_request: 29922 +author: +type: fixed diff --git a/changelogs/unreleased/63513-ensure-gitlab-jsoncache-includes-the-gitlab-version-in-the-cache-key.yml b/changelogs/unreleased/63513-ensure-gitlab-jsoncache-includes-the-gitlab-version-in-the-cache-key.yml new file mode 100644 index 00000000000..b5715902630 --- /dev/null +++ b/changelogs/unreleased/63513-ensure-gitlab-jsoncache-includes-the-gitlab-version-in-the-cache-key.yml @@ -0,0 +1,5 @@ +--- +title: Include the GitLab version in the cache key for Gitlab::JsonCache +merge_request: 29938 +author: +type: fixed diff --git a/changelogs/unreleased/8723-geo-remove-gitlab-lfstoken-legacyredisdevisetoken-implementation-and-usage-geo.yml b/changelogs/unreleased/8723-geo-remove-gitlab-lfstoken-legacyredisdevisetoken-implementation-and-usage-geo.yml deleted file mode 100644 index 173c7d9383e..00000000000 --- a/changelogs/unreleased/8723-geo-remove-gitlab-lfstoken-legacyredisdevisetoken-implementation-and-usage-geo.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Geo: Remove Gitlab::LfsToken::LegacyRedisDeviseToken implementation and usage' -merge_request: 28546 -author: -type: changed diff --git a/changelogs/unreleased/9121-sort-relative-position.yml b/changelogs/unreleased/9121-sort-relative-position.yml deleted file mode 100644 index adc9e87e5bb..00000000000 --- a/changelogs/unreleased/9121-sort-relative-position.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow issue list to be sorted by relative order -merge_request: 28566 -author: -type: added diff --git a/changelogs/unreleased/9186-implement-atmtwps-state-to-mr-widget.yml b/changelogs/unreleased/9186-implement-atmtwps-state-to-mr-widget.yml deleted file mode 100644 index 2c1d56f197e..00000000000 --- a/changelogs/unreleased/9186-implement-atmtwps-state-to-mr-widget.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update the merge request widget's "Merge" button to support merge trains -merge_request: 27594 -author: -type: added diff --git a/changelogs/unreleased/9578-adjust-milestone-completion-rate.yml b/changelogs/unreleased/9578-adjust-milestone-completion-rate.yml deleted file mode 100644 index 0694e1462cf..00000000000 --- a/changelogs/unreleased/9578-adjust-milestone-completion-rate.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adjust milestone completion rate to be based on issues count. -merge_request: 28777 -author: -type: changed diff --git a/changelogs/unreleased/9978-moved-code-differences-from-EE-to-CE.yml b/changelogs/unreleased/9978-moved-code-differences-from-EE-to-CE.yml deleted file mode 100644 index 821e5d70dca..00000000000 --- a/changelogs/unreleased/9978-moved-code-differences-from-EE-to-CE.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Moved EE/CE code differences for `app/assets/javascripts/gl_dropdown.js` into CE" -merge_request: 28711 -author: Michel Engelen -type: other diff --git a/changelogs/unreleased/abstract-auto-merge.yml b/changelogs/unreleased/abstract-auto-merge.yml deleted file mode 100644 index d3069a3e500..00000000000 --- a/changelogs/unreleased/abstract-auto-merge.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Refactor and abstract Auto Merge Processes -merge_request: 28595 -author: -type: other diff --git a/changelogs/unreleased/ac-63020-typeerror-nil-can-t-be-coerced-into-integer.yml b/changelogs/unreleased/ac-63020-typeerror-nil-can-t-be-coerced-into-integer.yml deleted file mode 100644 index 51ac2358fba..00000000000 --- a/changelogs/unreleased/ac-63020-typeerror-nil-can-t-be-coerced-into-integer.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix nil coercion updating storage size on project statistics -merge_request: 29425 -author: -type: fixed diff --git a/changelogs/unreleased/ac-graphql-stats.yml b/changelogs/unreleased/ac-graphql-stats.yml deleted file mode 100644 index 8837dce4d89..00000000000 --- a/changelogs/unreleased/ac-graphql-stats.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add Namespace and ProjectStatistics to GraphQL API -merge_request: 28277 -author: -type: added diff --git a/changelogs/unreleased/ac-graphql-wikisize.yml b/changelogs/unreleased/ac-graphql-wikisize.yml deleted file mode 100644 index be9c347ec21..00000000000 --- a/changelogs/unreleased/ac-graphql-wikisize.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Expose wiki_size on GraphQL API -merge_request: 29123 -author: -type: added diff --git a/changelogs/unreleased/ac-namespaces-stats-no-coalesce.yml b/changelogs/unreleased/ac-namespaces-stats-no-coalesce.yml deleted file mode 100644 index bd005206d4e..00000000000 --- a/changelogs/unreleased/ac-namespaces-stats-no-coalesce.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Forbid NULL in project_statistics.packages_size -merge_request: 28400 -author: -type: other diff --git a/changelogs/unreleased/add-allow_failure-to-job-api.yml b/changelogs/unreleased/add-allow_failure-to-job-api.yml deleted file mode 100644 index 5dd2b9708c5..00000000000 --- a/changelogs/unreleased/add-allow_failure-to-job-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add allow_failure attribute to Job API -merge_request: 28406 -author: -type: added diff --git a/changelogs/unreleased/add-branch-to-project-search-api.yml b/changelogs/unreleased/add-branch-to-project-search-api.yml deleted file mode 100644 index 74cff94ab76..00000000000 --- a/changelogs/unreleased/add-branch-to-project-search-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added ref querystring parameter to project search API to allow searching on branches/tags other than the default -merge_request: 28069 -author: Lee Tickett -type: added diff --git a/changelogs/unreleased/add-constraint-for-milestone-dates.yml b/changelogs/unreleased/add-constraint-for-milestone-dates.yml deleted file mode 100644 index 485149cf62e..00000000000 --- a/changelogs/unreleased/add-constraint-for-milestone-dates.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Limit milestone dates to before year 9999 -merge_request: 28742 -author: Luke Picciau -type: fixed diff --git a/changelogs/unreleased/add-lfs-blob-ids-to-tree-type.yml b/changelogs/unreleased/add-lfs-blob-ids-to-tree-type.yml deleted file mode 100644 index 14a5ef1cef3..00000000000 --- a/changelogs/unreleased/add-lfs-blob-ids-to-tree-type.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add LFS oid to GraphQL blob type -merge_request: 28666 -author: -type: added diff --git a/changelogs/unreleased/add-warning-to-backup-rake-task.yml b/changelogs/unreleased/add-warning-to-backup-rake-task.yml deleted file mode 100644 index 7ddeae3f9fd..00000000000 --- a/changelogs/unreleased/add-warning-to-backup-rake-task.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add warning that gitlab-secrets isn't included in backup -merge_request: -author: -type: other diff --git a/changelogs/unreleased/add-wiki-size-to-statistics.yml b/changelogs/unreleased/add-wiki-size-to-statistics.yml deleted file mode 100644 index 85b6d7a1774..00000000000 --- a/changelogs/unreleased/add-wiki-size-to-statistics.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add wiki size to project statistics -merge_request: 25321 -author: Peter Marko -type: added diff --git a/changelogs/unreleased/allow-emoji-in-references.yml b/changelogs/unreleased/allow-emoji-in-references.yml deleted file mode 100644 index 3116b346c00..00000000000 --- a/changelogs/unreleased/allow-emoji-in-references.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow references to labels and milestones to contain emoji -merge_request: 29284 -author: -type: changed diff --git a/changelogs/unreleased/always-show-pipelines-must-succeed-checkbox.yml b/changelogs/unreleased/always-show-pipelines-must-succeed-checkbox.yml deleted file mode 100644 index d60dd65be8a..00000000000 --- a/changelogs/unreleased/always-show-pipelines-must-succeed-checkbox.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Always show "Pipelines must succeed" checkbox -merge_request: 28651 -author: -type: fixed diff --git a/changelogs/unreleased/antonyliu-i18n-user-profile.yml b/changelogs/unreleased/antonyliu-i18n-user-profile.yml deleted file mode 100644 index f9065ee5697..00000000000 --- a/changelogs/unreleased/antonyliu-i18n-user-profile.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'i18n: externalize strings from user profile settings' -merge_request: 28088 -author: Antony Liu -type: other diff --git a/changelogs/unreleased/api_make_protected_boolean_type.yml b/changelogs/unreleased/api_make_protected_boolean_type.yml deleted file mode 100644 index 765edea6427..00000000000 --- a/changelogs/unreleased/api_make_protected_boolean_type.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'API: change protected attribute type to Boolean' -merge_request: 28766 -author: -type: other diff --git a/changelogs/unreleased/api_masked_variables.yml b/changelogs/unreleased/api_masked_variables.yml deleted file mode 100644 index 3605339cb91..00000000000 --- a/changelogs/unreleased/api_masked_variables.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'API: Allow to get and set "masked" attribute for variables' -merge_request: 28381 -author: Mathieu Parent -type: added diff --git a/changelogs/unreleased/asciidoc-include-directive.yml b/changelogs/unreleased/asciidoc-include-directive.yml deleted file mode 100644 index 58fe3666727..00000000000 --- a/changelogs/unreleased/asciidoc-include-directive.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add support for AsciiDoc include directive -merge_request: 28417 -author: "Jakub Jirutka & Guillaume Grossetie" -type: added diff --git a/changelogs/unreleased/auto-devops-kubernestes-bump1-11-10.yml b/changelogs/unreleased/auto-devops-kubernestes-bump1-11-10.yml deleted file mode 100644 index 9ba55719bdf..00000000000 --- a/changelogs/unreleased/auto-devops-kubernestes-bump1-11-10.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bumps Kubernetes in Auto DevOps to 1.11.10 -merge_request: 28525 -author: -type: other diff --git a/changelogs/unreleased/backport-schema-changes.yml b/changelogs/unreleased/backport-schema-changes.yml deleted file mode 100644 index 58f3ca72b0b..00000000000 --- a/changelogs/unreleased/backport-schema-changes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Backport the EE schema and migrations to CE -merge_request: 26940 -author: Yorick Peterse -type: other diff --git a/changelogs/unreleased/backstage-gb-improve-jobs-controller-performance.yml b/changelogs/unreleased/backstage-gb-improve-jobs-controller-performance.yml deleted file mode 100644 index 2b5a3592775..00000000000 --- a/changelogs/unreleased/backstage-gb-improve-jobs-controller-performance.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve performance of jobs controller -merge_request: 28093 -author: -type: performance diff --git a/changelogs/unreleased/bug-63162-duplicate_path_in_links.yml b/changelogs/unreleased/bug-63162-duplicate_path_in_links.yml new file mode 100644 index 00000000000..d3f246492fb --- /dev/null +++ b/changelogs/unreleased/bug-63162-duplicate_path_in_links.yml @@ -0,0 +1,5 @@ +--- +title: Fixed 'diff version changes' link not working +merge_request: 29825 +author: +type: fixed diff --git a/changelogs/unreleased/bump-auto-devops-helm-2-14-0.yml b/changelogs/unreleased/bump-auto-devops-helm-2-14-0.yml deleted file mode 100644 index ecfbc97a8c5..00000000000 --- a/changelogs/unreleased/bump-auto-devops-helm-2-14-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bump Helm version in Auto-DevOps.gitlab-ci.yml to 2.14.0 -merge_request: 28527 -author: -type: other diff --git a/changelogs/unreleased/bvl-comments-graphql.yml b/changelogs/unreleased/bvl-comments-graphql.yml deleted file mode 100644 index 9f510a910a3..00000000000 --- a/changelogs/unreleased/bvl-comments-graphql.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Expose notes and discussions in GraphQL -merge_request: 29212 -author: -type: added diff --git a/changelogs/unreleased/bvl-graphql-multiplex.yml b/changelogs/unreleased/bvl-graphql-multiplex.yml deleted file mode 100644 index 56d39e447a5..00000000000 --- a/changelogs/unreleased/bvl-graphql-multiplex.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Support multiplex GraphQL queries -merge_request: 28273 -author: -type: added diff --git a/changelogs/unreleased/bvl-use-global-ids-graphql.yml b/changelogs/unreleased/bvl-use-global-ids-graphql.yml deleted file mode 100644 index 34cb65e6001..00000000000 --- a/changelogs/unreleased/bvl-use-global-ids-graphql.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use global IDs when exposing GraphQL resources -merge_request: 29080 -author: -type: added diff --git a/changelogs/unreleased/cancel-auto-merge-when-branch-is-changed.yml b/changelogs/unreleased/cancel-auto-merge-when-branch-is-changed.yml deleted file mode 100644 index c3c6e4322a2..00000000000 --- a/changelogs/unreleased/cancel-auto-merge-when-branch-is-changed.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Cancel Auto Merge when target branch is changed -merge_request: 29416 -author: -type: fixed diff --git a/changelogs/unreleased/cancel-auto-merge-when-merge-request-is-closed.yml b/changelogs/unreleased/cancel-auto-merge-when-merge-request-is-closed.yml deleted file mode 100644 index d38046ebcbf..00000000000 --- a/changelogs/unreleased/cancel-auto-merge-when-merge-request-is-closed.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Cancel auto merge when merge request is closed -merge_request: 28782 -author: -type: fixed diff --git a/changelogs/unreleased/ce-57402-add-issues-statistics-api-endpoints.yml b/changelogs/unreleased/ce-57402-add-issues-statistics-api-endpoints.yml deleted file mode 100644 index a626193dc27..00000000000 --- a/changelogs/unreleased/ce-57402-add-issues-statistics-api-endpoints.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add issues_statistics api endpoints and extend issues search api -merge_request: 27366 -author: -type: added diff --git a/changelogs/unreleased/ce-jej-fix-git-http-with-sso-enforcement.yml b/changelogs/unreleased/ce-jej-fix-git-http-with-sso-enforcement.yml deleted file mode 100644 index a795e33b00d..00000000000 --- a/changelogs/unreleased/ce-jej-fix-git-http-with-sso-enforcement.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Avoid setting Gitlab::Session on sessionless requests and Git HTTP -merge_request: 29146 -author: -type: fixed diff --git a/changelogs/unreleased/ce-quick-fix-58727-collapsed-sidebar-flyout-menu-items-don-t-appear-in-1200px-screen-size.yml b/changelogs/unreleased/ce-quick-fix-58727-collapsed-sidebar-flyout-menu-items-don-t-appear-in-1200px-screen-size.yml deleted file mode 100644 index 332105bb269..00000000000 --- a/changelogs/unreleased/ce-quick-fix-58727-collapsed-sidebar-flyout-menu-items-don-t-appear-in-1200px-screen-size.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix flyout nav on small viewports -merge_request: 25998 -author: -type: fixed diff --git a/changelogs/unreleased/chore-remove-circuit-breaker-api.yml b/changelogs/unreleased/chore-remove-circuit-breaker-api.yml deleted file mode 100644 index f9532be04c8..00000000000 --- a/changelogs/unreleased/chore-remove-circuit-breaker-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove the circuit breaker API -merge_request: 28669 -author: -type: removed diff --git a/changelogs/unreleased/ci-variable-conjunction.yml b/changelogs/unreleased/ci-variable-conjunction.yml deleted file mode 100644 index 839c4285f3a..00000000000 --- a/changelogs/unreleased/ci-variable-conjunction.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add support for && and || to CI Pipeline Expressions. Change CI variable expression matching for Lexeme::Pattern to eagerly return tokens. -merge_request: 27925 -author: Martin Manelli -type: added diff --git a/changelogs/unreleased/container-registry-api-perms-58271.yml b/changelogs/unreleased/container-registry-api-perms-58271.yml deleted file mode 100644 index 0d1036a7788..00000000000 --- a/changelogs/unreleased/container-registry-api-perms-58271.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow developer role to delete docker tags via container registry API -merge_request: 29512 -author: -type: fixed diff --git a/changelogs/unreleased/copy-button-in-modals.yml b/changelogs/unreleased/copy-button-in-modals.yml deleted file mode 100644 index bc18eb9ab26..00000000000 --- a/changelogs/unreleased/copy-button-in-modals.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add a New Copy Button That Works in Modals -merge_request: 28676 -author: -type: added diff --git a/changelogs/unreleased/db-update-geo-nodes-primary.yml b/changelogs/unreleased/db-update-geo-nodes-primary.yml new file mode 100644 index 00000000000..7c5203353ac --- /dev/null +++ b/changelogs/unreleased/db-update-geo-nodes-primary.yml @@ -0,0 +1,5 @@ +--- +title: Disallow `NULL` values for `geo_nodes.primary` column +merge_request: 29818 +author: Arun Kumar Mohan +type: other diff --git a/changelogs/unreleased/dhiraj-fix-missing-deployment-rockets-in-monitoring-dashboard.yml b/changelogs/unreleased/dhiraj-fix-missing-deployment-rockets-in-monitoring-dashboard.yml deleted file mode 100644 index 12a21e818b4..00000000000 --- a/changelogs/unreleased/dhiraj-fix-missing-deployment-rockets-in-monitoring-dashboard.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix missing deployment rockets in monitor dashboard -merge_request: 29574 -author: -type: fixed diff --git a/changelogs/unreleased/diff-suggestions-popover.yml b/changelogs/unreleased/diff-suggestions-popover.yml deleted file mode 100644 index fdb94e6e2a7..00000000000 --- a/changelogs/unreleased/diff-suggestions-popover.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added diff suggestion feature discovery popover -merge_request: -author: -type: added diff --git a/changelogs/unreleased/diff-whitespace-setting-changes.yml b/changelogs/unreleased/diff-whitespace-setting-changes.yml deleted file mode 100644 index 640e9e589df..00000000000 --- a/changelogs/unreleased/diff-whitespace-setting-changes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed show whitespace button not refetching diff content -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/display-junit-classname-in-modal.yml b/changelogs/unreleased/display-junit-classname-in-modal.yml deleted file mode 100644 index c5140456e4e..00000000000 --- a/changelogs/unreleased/display-junit-classname-in-modal.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Display classname JUnit attribute in report modal -merge_request: 28376 -author: -type: added diff --git a/changelogs/unreleased/dm-http-hostname-override.yml b/changelogs/unreleased/dm-http-hostname-override.yml deleted file mode 100644 index f84f36a0010..00000000000 --- a/changelogs/unreleased/dm-http-hostname-override.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Protect Gitlab::HTTP against DNS rebinding attack -merge_request: -author: -type: security diff --git a/changelogs/unreleased/docs-add-chatops-request-doc.yml b/changelogs/unreleased/docs-add-chatops-request-doc.yml deleted file mode 100644 index 85ba86a73af..00000000000 --- a/changelogs/unreleased/docs-add-chatops-request-doc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add section to dev docs on accessing chatops -merge_request: 28623 -author: -type: other diff --git a/changelogs/unreleased/dz-patch-58.yml b/changelogs/unreleased/dz-patch-58.yml deleted file mode 100644 index 97ceadd303d..00000000000 --- a/changelogs/unreleased/dz-patch-58.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Replace Oxygen-Sans font with Noto Sans -merge_request: 28322 -author: -type: changed diff --git a/changelogs/unreleased/dz-scope-project-routes.yml b/changelogs/unreleased/dz-scope-project-routes.yml deleted file mode 100644 index 66eb5d928f0..00000000000 --- a/changelogs/unreleased/dz-scope-project-routes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Move some project routes under /-/ scope -merge_request: 28435 -author: -type: changed diff --git a/changelogs/unreleased/ee-11040-added-conditional-rendering.yml b/changelogs/unreleased/ee-11040-added-conditional-rendering.yml deleted file mode 100644 index 7b06e43830f..00000000000 --- a/changelogs/unreleased/ee-11040-added-conditional-rendering.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Added conditional rendering to `app/views/search/_form.html.haml` for CE/EE code base consistency" -merge_request: 28883 -author: Michel Engelen -type: other diff --git a/changelogs/unreleased/ensure_namespace.yml b/changelogs/unreleased/ensure_namespace.yml deleted file mode 100644 index ce2a615af1f..00000000000 --- a/changelogs/unreleased/ensure_namespace.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: AutoDevops function ensure_namespace() now explicitly tests the namespace -merge_request: 29567 -author: Jack Lei -type: fixed diff --git a/changelogs/unreleased/error-pipelines-for-blocked-users.yml b/changelogs/unreleased/error-pipelines-for-blocked-users.yml deleted file mode 100644 index 3ace28b6cfd..00000000000 --- a/changelogs/unreleased/error-pipelines-for-blocked-users.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: preventing blocked users and their PipelineSchdules from creating new Pipelines -merge_request: 27318 -author: -type: fixed diff --git a/changelogs/unreleased/expose-project-git-depth-via-api.yml b/changelogs/unreleased/expose-project-git-depth-via-api.yml deleted file mode 100644 index e9d158fda16..00000000000 --- a/changelogs/unreleased/expose-project-git-depth-via-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Get and edit ci_default_git_depth via project API -merge_request: 29353 -author: -type: added diff --git a/changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml b/changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml deleted file mode 100644 index 4125b4241e6..00000000000 --- a/changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix scrolling to top on assignee change -merge_request: 29500 -author: -type: fixed diff --git a/changelogs/unreleased/feature-gb-use-gitlabktl-to-build-serverless-applications.yml b/changelogs/unreleased/feature-gb-use-gitlabktl-to-build-serverless-applications.yml deleted file mode 100644 index 443fff92f55..00000000000 --- a/changelogs/unreleased/feature-gb-use-gitlabktl-to-build-serverless-applications.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use to 'gitlabktl' build serverless applications -merge_request: 29258 -author: -type: added diff --git a/changelogs/unreleased/feature-require-2fa-for-all-entities-in-group.yml b/changelogs/unreleased/feature-require-2fa-for-all-entities-in-group.yml deleted file mode 100644 index 0abe777fb69..00000000000 --- a/changelogs/unreleased/feature-require-2fa-for-all-entities-in-group.yml +++ /dev/null @@ -1,4 +0,0 @@ -title: Apply the group setting "require 2FA" across all subgroup members as well when changing the group setting -merge_request: 24965 -author: rroger -type: changed diff --git a/changelogs/unreleased/fix-allow-lower-case-issue-ids.yml b/changelogs/unreleased/fix-allow-lower-case-issue-ids.yml deleted file mode 100644 index 46fa90ccda0..00000000000 --- a/changelogs/unreleased/fix-allow-lower-case-issue-ids.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow lowercase prefix for Youtrack issue ids -merge_request: 29057 -author: Matthias Baur -type: fixed diff --git a/changelogs/unreleased/fix-autodevops-postgres-versioning.yml b/changelogs/unreleased/fix-autodevops-postgres-versioning.yml deleted file mode 100644 index 8ddc70f6314..00000000000 --- a/changelogs/unreleased/fix-autodevops-postgres-versioning.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed ignored postgres version that occurs after the first autodevops deploy when specifying custom $POSTGRES_VERSION -merge_request: 28735 -author: Brandon Dimcheff -type: fixed diff --git a/changelogs/unreleased/fix-db-migrate-is-failed-on-mysql8.yml b/changelogs/unreleased/fix-db-migrate-is-failed-on-mysql8.yml deleted file mode 100644 index 63f134808e3..00000000000 --- a/changelogs/unreleased/fix-db-migrate-is-failed-on-mysql8.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix. `db:migrate` is failed on MySQL 8 -merge_request: 28351 -author: sue445 -type: fixed diff --git a/changelogs/unreleased/fix-diverged-branch-locals.yml b/changelogs/unreleased/fix-diverged-branch-locals.yml deleted file mode 100644 index 719d669fad3..00000000000 --- a/changelogs/unreleased/fix-diverged-branch-locals.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix diverged branch locals -merge_request: 29508 -author: -type: fixed diff --git a/changelogs/unreleased/fix-flyout-navs.yml b/changelogs/unreleased/fix-flyout-navs.yml deleted file mode 100644 index c21f1037f09..00000000000 --- a/changelogs/unreleased/fix-flyout-navs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix sidebar flyout navigation -merge_request: 29571 -author: -type: fixed diff --git a/changelogs/unreleased/fix-format-date-safari-ff.yml b/changelogs/unreleased/fix-format-date-safari-ff.yml deleted file mode 100644 index e71ea2867f3..00000000000 --- a/changelogs/unreleased/fix-format-date-safari-ff.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Throw an error when formatDate's input is invalid -merge_request: 28713 -author: -type: fixed diff --git a/changelogs/unreleased/fix-gb-fix-serverless-apps-deployment-template.yml b/changelogs/unreleased/fix-gb-fix-serverless-apps-deployment-template.yml deleted file mode 100644 index 88656b7ef4c..00000000000 --- a/changelogs/unreleased/fix-gb-fix-serverless-apps-deployment-template.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix serverless apps deployments by bumping 'tm' version -merge_request: 29254 -author: -type: fixed diff --git a/changelogs/unreleased/fix-gb-remove-serverless-app-build-policies-from-template.yml b/changelogs/unreleased/fix-gb-remove-serverless-app-build-policies-from-template.yml deleted file mode 100644 index f51ec273a57..00000000000 --- a/changelogs/unreleased/fix-gb-remove-serverless-app-build-policies-from-template.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove build policies from serverless app template -merge_request: 29253 -author: -type: fixed diff --git a/changelogs/unreleased/fix-import-member-access.yml b/changelogs/unreleased/fix-import-member-access.yml deleted file mode 100644 index 5dc4ae738f8..00000000000 --- a/changelogs/unreleased/fix-import-member-access.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix issue importing members with owner access -merge_request: 28636 -author: -type: fixed diff --git a/changelogs/unreleased/fix-import-param-ordering.yml b/changelogs/unreleased/fix-import-param-ordering.yml deleted file mode 100644 index 47e32cda977..00000000000 --- a/changelogs/unreleased/fix-import-param-ordering.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix order dependency with user params during imports -merge_request: 28719 -author: -type: fixed diff --git a/changelogs/unreleased/fix-issue-mr-badge.yml b/changelogs/unreleased/fix-issue-mr-badge.yml deleted file mode 100644 index e777f52f173..00000000000 --- a/changelogs/unreleased/fix-issue-mr-badge.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use grid and correct border radius for status badge -merge_request: -author: -type: other diff --git a/changelogs/unreleased/fix-milestone-references-with-escaped-html-entities.yml b/changelogs/unreleased/fix-milestone-references-with-escaped-html-entities.yml deleted file mode 100644 index 1041943f9c4..00000000000 --- a/changelogs/unreleased/fix-milestone-references-with-escaped-html-entities.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix milestone references containing &, <, or > -merge_request: 28667 -author: -type: fixed diff --git a/changelogs/unreleased/fix-notes-emails-with-group-settings.yml b/changelogs/unreleased/fix-notes-emails-with-group-settings.yml new file mode 100644 index 00000000000..77dae8418a8 --- /dev/null +++ b/changelogs/unreleased/fix-notes-emails-with-group-settings.yml @@ -0,0 +1,5 @@ +--- +title: Fix comment emails not respecting group-level notification email +merge_request: +author: +type: fixed diff --git a/changelogs/unreleased/fix-pipeline-schedule-owner-is-nil.yml b/changelogs/unreleased/fix-pipeline-schedule-owner-is-nil.yml deleted file mode 100644 index 5c8644d2860..00000000000 --- a/changelogs/unreleased/fix-pipeline-schedule-owner-is-nil.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix pipeline schedules when owner is nil -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/fix-search-dropdown-blur-close.yml b/changelogs/unreleased/fix-search-dropdown-blur-close.yml deleted file mode 100644 index 1ac9dc674fe..00000000000 --- a/changelogs/unreleased/fix-search-dropdown-blur-close.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix search dropdown not closing on blur if empty -merge_request: 28730 -author: -type: fixed diff --git a/changelogs/unreleased/fix-time-window-default.yml b/changelogs/unreleased/fix-time-window-default.yml deleted file mode 100644 index 147f82eb6c9..00000000000 --- a/changelogs/unreleased/fix-time-window-default.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use the selected time window for metrics dashboard -merge_request: 29152 -author: -type: fixed diff --git a/changelogs/unreleased/fix-too-many-loops-cron-error.yml b/changelogs/unreleased/fix-too-many-loops-cron-error.yml deleted file mode 100644 index a9b5b761439..00000000000 --- a/changelogs/unreleased/fix-too-many-loops-cron-error.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix "too many loops" error by handling gracefully cron schedules for non existent days -merge_request: 28002 -author: -type: fixed diff --git a/changelogs/unreleased/generate-spans-for-sections.yml b/changelogs/unreleased/generate-spans-for-sections.yml deleted file mode 100644 index e167d66490f..00000000000 --- a/changelogs/unreleased/generate-spans-for-sections.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds collapsible sections for job log -merge_request: 28642 -author: -type: added diff --git a/changelogs/unreleased/gitaly-version-v1.43.0.yml b/changelogs/unreleased/gitaly-version-v1.43.0.yml deleted file mode 100644 index 67acd2725e1..00000000000 --- a/changelogs/unreleased/gitaly-version-v1.43.0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade to Gitaly v1.43.0 -merge_request: 28867 -author: -type: changed diff --git a/changelogs/unreleased/gitaly-version-v1.47.0.yml b/changelogs/unreleased/gitaly-version-v1.47.0.yml deleted file mode 100644 index b369506b336..00000000000 --- a/changelogs/unreleased/gitaly-version-v1.47.0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade to Gitaly v1.47.0 -merge_request: 29789 -author: -type: changed diff --git a/changelogs/unreleased/gt-externalize-profiles-preferences.yml b/changelogs/unreleased/gt-externalize-profiles-preferences.yml deleted file mode 100644 index 1a72e92a241..00000000000 --- a/changelogs/unreleased/gt-externalize-profiles-preferences.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Externalize profiles preferences -merge_request: 28470 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/gt-open-visibility-help-link-in-a-new-tab.yml b/changelogs/unreleased/gt-open-visibility-help-link-in-a-new-tab.yml deleted file mode 100644 index 35515c9d639..00000000000 --- a/changelogs/unreleased/gt-open-visibility-help-link-in-a-new-tab.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Open visibility help link in a new tab -merge_request: 28603 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/gt-remove-tooltip-directive-on-project-avatar-image-component.yml b/changelogs/unreleased/gt-remove-tooltip-directive-on-project-avatar-image-component.yml new file mode 100644 index 00000000000..d9ca20d9d4d --- /dev/null +++ b/changelogs/unreleased/gt-remove-tooltip-directive-on-project-avatar-image-component.yml @@ -0,0 +1,5 @@ +--- +title: Remove tooltip directive on project avatar image component +merge_request: 29631 +author: George Tsiolis +type: performance diff --git a/changelogs/unreleased/hashed-storage-enabled-default.yml b/changelogs/unreleased/hashed-storage-enabled-default.yml deleted file mode 100644 index 9a34505785c..00000000000 --- a/changelogs/unreleased/hashed-storage-enabled-default.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Hashed Storage is enabled by default on new installations -merge_request: 29586 -author: -type: changed diff --git a/changelogs/unreleased/i18n-active_sessions-in-user-profile.yml b/changelogs/unreleased/i18n-active_sessions-in-user-profile.yml deleted file mode 100644 index fe6eb3a2bf7..00000000000 --- a/changelogs/unreleased/i18n-active_sessions-in-user-profile.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Externalize strings of active sessions page in user profile -merge_request: 28590 -author: antony liu -type: other diff --git a/changelogs/unreleased/i18n-chat-of-user-profile.yml b/changelogs/unreleased/i18n-chat-of-user-profile.yml deleted file mode 100644 index 663b4ffc1a1..00000000000 --- a/changelogs/unreleased/i18n-chat-of-user-profile.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Externalize strings of chat page in user profile -merge_request: 28632 -author: -type: other diff --git a/changelogs/unreleased/i18n-email-of-user-profile.yml b/changelogs/unreleased/i18n-email-of-user-profile.yml deleted file mode 100644 index 6cb718843d5..00000000000 --- a/changelogs/unreleased/i18n-email-of-user-profile.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Externalize strings of email page in user profile -merge_request: 28587 -author: antony liu -type: other diff --git a/changelogs/unreleased/i18n-pgp_ssh_keys-of-user-profile.yml b/changelogs/unreleased/i18n-pgp_ssh_keys-of-user-profile.yml deleted file mode 100644 index 4dc45b35976..00000000000 --- a/changelogs/unreleased/i18n-pgp_ssh_keys-of-user-profile.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Externalize strings of PGP Keys and SSH Keys page in user profile -merge_request: 28653 -author: Antony Liu -type: other diff --git a/changelogs/unreleased/id-bug-suggested-changes-remove-empty-line.yml b/changelogs/unreleased/id-bug-suggested-changes-remove-empty-line.yml deleted file mode 100644 index eae2d5f9b2a..00000000000 --- a/changelogs/unreleased/id-bug-suggested-changes-remove-empty-line.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow removal of empty lines via suggestions -merge_request: 28703 -author: -type: fixed diff --git a/changelogs/unreleased/ignore-artifact-attirbutes-in-project-import-export.yml b/changelogs/unreleased/ignore-artifact-attirbutes-in-project-import-export.yml deleted file mode 100644 index 536aae03f59..00000000000 --- a/changelogs/unreleased/ignore-artifact-attirbutes-in-project-import-export.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Ignore legacy artifact columns in Project Import/Export -merge_request: 29427 -author: -type: fixed diff --git a/changelogs/unreleased/improve-email-text-part.yml b/changelogs/unreleased/improve-email-text-part.yml deleted file mode 100644 index ce506cb1507..00000000000 --- a/changelogs/unreleased/improve-email-text-part.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve new user email markup unconsistency between text and html parts -merge_request: 29111 -author: Haunui Saint-sevin -type: fixed diff --git a/changelogs/unreleased/increase-move-issue-dropdown-height.yml b/changelogs/unreleased/increase-move-issue-dropdown-height.yml deleted file mode 100644 index bb67e9341b2..00000000000 --- a/changelogs/unreleased/increase-move-issue-dropdown-height.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Increase height of move issue dropdown -merge_request: -author: -type: other diff --git a/changelogs/unreleased/issue-58747.yml b/changelogs/unreleased/issue-58747.yml deleted file mode 100644 index 01b610576f7..00000000000 --- a/changelogs/unreleased/issue-58747.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix GPG signature verification with recent GnuPG versions -merge_request: 29388 -author: David Palubin -type: fixed diff --git a/changelogs/unreleased/issue_49897.yml b/changelogs/unreleased/issue_49897.yml deleted file mode 100644 index b630b5143c6..00000000000 --- a/changelogs/unreleased/issue_49897.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Delete unauthorized Todos when project is made private -merge_request: 28560 -author: -type: fixed diff --git a/changelogs/unreleased/jc-migration-for-source-project-id.yml b/changelogs/unreleased/jc-migration-for-source-project-id.yml deleted file mode 100644 index 3e2e8ebfcc5..00000000000 --- a/changelogs/unreleased/jc-migration-for-source-project-id.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix null source_project_id in pool_repositories -merge_request: 29157 -author: -type: other diff --git a/changelogs/unreleased/jc-omit-count-diverging-commits-max.yml b/changelogs/unreleased/jc-omit-count-diverging-commits-max.yml deleted file mode 100644 index 23235060a98..00000000000 --- a/changelogs/unreleased/jc-omit-count-diverging-commits-max.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Omit max-count for diverging_commit_counts behind feature flag -merge_request: 28157 -author: -type: other diff --git a/changelogs/unreleased/jivl-migrate-dashboard-store-vuex.yml b/changelogs/unreleased/jivl-migrate-dashboard-store-vuex.yml deleted file mode 100644 index dc4edbc058f..00000000000 --- a/changelogs/unreleased/jivl-migrate-dashboard-store-vuex.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Migrate the monitoring dashboard store to vuex -merge_request: 28555 -author: -type: other diff --git a/changelogs/unreleased/jupyter_pre_spawn_hook_v2.yml b/changelogs/unreleased/jupyter_pre_spawn_hook_v2.yml deleted file mode 100644 index c5918df8193..00000000000 --- a/changelogs/unreleased/jupyter_pre_spawn_hook_v2.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Pass user's identity and token from JupyterHub to user's Jupyter environment -merge_request: 27314 -author: Amit Rathi -type: added diff --git a/changelogs/unreleased/kinolaev-master-patch-13154.yml b/changelogs/unreleased/kinolaev-master-patch-13154.yml deleted file mode 100644 index 3292ff797e2..00000000000 --- a/changelogs/unreleased/kinolaev-master-patch-13154.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Auto-DevOps: allow to disable rollout status check' -merge_request: 28130 -author: Sergej Nikolaev <kinolaev@gmail.com> -type: fixed diff --git a/changelogs/unreleased/leipert-node-12-compatibility.yml b/changelogs/unreleased/leipert-node-12-compatibility.yml deleted file mode 100644 index 18025d33a6d..00000000000 --- a/changelogs/unreleased/leipert-node-12-compatibility.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade dependencies for node 12 compatibility -merge_request: 28323 -author: -type: fixed diff --git a/changelogs/unreleased/make-autocomplete-faster-with-lots-of-results.yml b/changelogs/unreleased/make-autocomplete-faster-with-lots-of-results.yml deleted file mode 100644 index daeefd3ffd7..00000000000 --- a/changelogs/unreleased/make-autocomplete-faster-with-lots-of-results.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve performance of users autocomplete when there are lots of results -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/mark-comment-resolved.yml b/changelogs/unreleased/mark-comment-resolved.yml deleted file mode 100644 index 3343d18d16f..00000000000 --- a/changelogs/unreleased/mark-comment-resolved.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change resolve button text to mark comment as resolved -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/migrate_k8s_service_integration.yml b/changelogs/unreleased/migrate_k8s_service_integration.yml deleted file mode 100644 index 57f03e6bdab..00000000000 --- a/changelogs/unreleased/migrate_k8s_service_integration.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Migrate Kubernetes service integration templates to clusters -merge_request: 28534 -author: -type: added diff --git a/changelogs/unreleased/mm12935.yml b/changelogs/unreleased/mm12935.yml deleted file mode 100644 index 782586c514e..00000000000 --- a/changelogs/unreleased/mm12935.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove Content-Type override for Mattermost OAuth login -merge_request: -author: Harrison Healey -type: removed diff --git a/changelogs/unreleased/osw-avoid-500-on-suggestions-check.yml b/changelogs/unreleased/osw-avoid-500-on-suggestions-check.yml deleted file mode 100644 index d0a09385d4c..00000000000 --- a/changelogs/unreleased/osw-avoid-500-on-suggestions-check.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Avoid 500 when rendering users ATOM data -merge_request: 25408 -author: -type: fixed diff --git a/changelogs/unreleased/osw-avoid-encoding-errors-on-merge-to-ref-service.yml b/changelogs/unreleased/osw-avoid-encoding-errors-on-merge-to-ref-service.yml deleted file mode 100644 index 176c8bf36f7..00000000000 --- a/changelogs/unreleased/osw-avoid-encoding-errors-on-merge-to-ref-service.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Handle encoding errors for MergeToRefService -merge_request: 29440 -author: -type: fixed diff --git a/changelogs/unreleased/osw-fix-post-dep-migration-with-timeout.yml b/changelogs/unreleased/osw-fix-post-dep-migration-with-timeout.yml deleted file mode 100644 index 6b37bb11ad5..00000000000 --- a/changelogs/unreleased/osw-fix-post-dep-migration-with-timeout.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Avoid DB timeouts when scheduling migrations -merge_request: 29437 -author: -type: fixed diff --git a/changelogs/unreleased/osw-reset-merge-status-from-mergeable-mrs.yml b/changelogs/unreleased/osw-reset-merge-status-from-mergeable-mrs.yml deleted file mode 100644 index 6b5f97f24b3..00000000000 --- a/changelogs/unreleased/osw-reset-merge-status-from-mergeable-mrs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reset merge status from mergeable MRs -merge_request: 28843 -author: -type: other diff --git a/changelogs/unreleased/paginate-license-management.yml b/changelogs/unreleased/paginate-license-management.yml new file mode 100644 index 00000000000..c5134978612 --- /dev/null +++ b/changelogs/unreleased/paginate-license-management.yml @@ -0,0 +1,5 @@ +--- +title: Backport and Docs for Paginate license management and add license search +merge_request: 27602 +author: +type: changed diff --git a/changelogs/unreleased/patch-55.yml b/changelogs/unreleased/patch-55.yml deleted file mode 100644 index 7a6d6bfed2f..00000000000 --- a/changelogs/unreleased/patch-55.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Better isolated `Docker.gitlab-ci.yml` to avoid interference with other job configurations. -merge_request: 28213 -author: lrkwz -type: changed diff --git a/changelogs/unreleased/patch-65.yml b/changelogs/unreleased/patch-65.yml deleted file mode 100644 index 9ce628a6541..00000000000 --- a/changelogs/unreleased/patch-65.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show tooltip on truncated commit title -merge_request: 28865 -author: Timofey Trofimov -type: other diff --git a/changelogs/unreleased/patch-issue--56683.yml b/changelogs/unreleased/patch-issue--56683.yml deleted file mode 100644 index 9b82c6c1459..00000000000 --- a/changelogs/unreleased/patch-issue--56683.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Process up to 100 commit messages for references when pushing to a new default - branch -merge_request: 29511 -author: Fabio Papa -type: fixed diff --git a/changelogs/unreleased/pb-update-gitaly-1-45-0.yml b/changelogs/unreleased/pb-update-gitaly-1-45-0.yml deleted file mode 100644 index eaad7a8378b..00000000000 --- a/changelogs/unreleased/pb-update-gitaly-1-45-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GITALY_SERVER_VERSION to 1.45.0 -merge_request: 29109 -author: -type: changed diff --git a/changelogs/unreleased/pipelines-email-default-branch-filter.yml b/changelogs/unreleased/pipelines-email-default-branch-filter.yml deleted file mode 100644 index 4c2a54af0bf..00000000000 --- a/changelogs/unreleased/pipelines-email-default-branch-filter.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add notify_only_default_branch option to PipelinesEmailService -merge_request: 28271 -author: Peter Marko -type: added diff --git a/changelogs/unreleased/readonly_k8s_integration.yml b/changelogs/unreleased/readonly_k8s_integration.yml deleted file mode 100644 index 718705e8750..00000000000 --- a/changelogs/unreleased/readonly_k8s_integration.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Make Kubernetes service templates readonly -merge_request: 29044 -author: -type: removed diff --git a/changelogs/unreleased/referenced-labels.yml b/changelogs/unreleased/referenced-labels.yml deleted file mode 100644 index c39ef4c2478..00000000000 --- a/changelogs/unreleased/referenced-labels.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add referenced-commands in no overflow list -merge_request: 28858 -author: -type: fixed diff --git a/changelogs/unreleased/relative-urls-for-system-notes.yml b/changelogs/unreleased/relative-urls-for-system-notes.yml deleted file mode 100644 index ec834e9f277..00000000000 --- a/changelogs/unreleased/relative-urls-for-system-notes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change links in system notes to use relative paths -merge_request: 28588 -author: Luke Picciau -type: fixed diff --git a/changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml b/changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml deleted file mode 100644 index 24b5fb50e40..00000000000 --- a/changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Link to an external dashboard from metrics dashboard -merge_request: 29369 -author: -type: added diff --git a/changelogs/unreleased/remove-kubernetes-service-deployment-platform.yml b/changelogs/unreleased/remove-kubernetes-service-deployment-platform.yml new file mode 100644 index 00000000000..17421fca234 --- /dev/null +++ b/changelogs/unreleased/remove-kubernetes-service-deployment-platform.yml @@ -0,0 +1,5 @@ +--- +title: Remove Kubernetes service integration and Kubernetes service template from available deployment platforms +merge_request: 29786 +author: +type: removed diff --git a/changelogs/unreleased/remove-legacy-artifacts-related-code.yml b/changelogs/unreleased/remove-legacy-artifacts-related-code.yml deleted file mode 100644 index acde65af2d4..00000000000 --- a/changelogs/unreleased/remove-legacy-artifacts-related-code.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove legacy artifact related code -merge_request: 26475 -author: -type: other diff --git a/changelogs/unreleased/remove-mr-diff-header-height.yml b/changelogs/unreleased/remove-mr-diff-header-height.yml deleted file mode 100644 index c06c7281c58..00000000000 --- a/changelogs/unreleased/remove-mr-diff-header-height.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove fixed height from MR diff headers -merge_request: -author: -type: other diff --git a/changelogs/unreleased/revert-concurrent-pipeline-schedule-creation.yml b/changelogs/unreleased/revert-concurrent-pipeline-schedule-creation.yml deleted file mode 100644 index 77423463d22..00000000000 --- a/changelogs/unreleased/revert-concurrent-pipeline-schedule-creation.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Revert concurrent pipeline creation for pipeline schedules -merge_request: 29794 -author: -type: fixed diff --git a/changelogs/unreleased/sanitize_rake_ldap_check_output.yml b/changelogs/unreleased/sanitize_rake_ldap_check_output.yml new file mode 100644 index 00000000000..92824d1dd48 --- /dev/null +++ b/changelogs/unreleased/sanitize_rake_ldap_check_output.yml @@ -0,0 +1,5 @@ +--- +title: Sanitize LDAP output in Rake tasks +merge_request: 28427 +author: +type: fixed diff --git a/changelogs/unreleased/security-58856-persistent-xss-in-note-objects.yml b/changelogs/unreleased/security-58856-persistent-xss-in-note-objects.yml deleted file mode 100644 index d9ad5af256a..00000000000 --- a/changelogs/unreleased/security-58856-persistent-xss-in-note-objects.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent XSS injection in note imports -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-60039.yml b/changelogs/unreleased/security-60039.yml deleted file mode 100644 index 5edbf32ec97..00000000000 --- a/changelogs/unreleased/security-60039.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent invalid branch for merge request -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-60143-address-xss-issue-in-wiki-links.yml b/changelogs/unreleased/security-60143-address-xss-issue-in-wiki-links.yml deleted file mode 100644 index 5b79258af54..00000000000 --- a/changelogs/unreleased/security-60143-address-xss-issue-in-wiki-links.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Filter relative links in wiki for XSS -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-fix-confidential-issue-label-visibility-master.yml b/changelogs/unreleased/security-fix-confidential-issue-label-visibility-master.yml deleted file mode 100644 index adfd8e1298f..00000000000 --- a/changelogs/unreleased/security-fix-confidential-issue-label-visibility-master.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix confidential issue label disclosure on milestone view -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-fix-project-existence-disclosure-master.yml b/changelogs/unreleased/security-fix-project-existence-disclosure-master.yml deleted file mode 100644 index 084439c71d9..00000000000 --- a/changelogs/unreleased/security-fix-project-existence-disclosure-master.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix url redaction for issue links -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-fix_milestones_search_api_leak.yml b/changelogs/unreleased/security-fix_milestones_search_api_leak.yml deleted file mode 100644 index 5691550b602..00000000000 --- a/changelogs/unreleased/security-fix_milestones_search_api_leak.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Resolve: Milestones leaked via search API' -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-id-leaked-password-in-import-url-frontend.yml b/changelogs/unreleased/security-id-leaked-password-in-import-url-frontend.yml deleted file mode 100644 index df636ec37fb..00000000000 --- a/changelogs/unreleased/security-id-leaked-password-in-import-url-frontend.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add extra fields for handling basic auth on import by url page -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-jej-prevent-web-sign-in-bypass.yml b/changelogs/unreleased/security-jej-prevent-web-sign-in-bypass.yml deleted file mode 100644 index 02773fa1d7c..00000000000 --- a/changelogs/unreleased/security-jej-prevent-web-sign-in-bypass.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent bypass of restriction disabling web password sign in -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-unsubscribing-from-issue.yml b/changelogs/unreleased/security-unsubscribing-from-issue.yml deleted file mode 100644 index 3a33a457c69..00000000000 --- a/changelogs/unreleased/security-unsubscribing-from-issue.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Hide confidential issue title on unsubscribe for anonymous users -merge_request: -author: -type: security diff --git a/changelogs/unreleased/set-real-next-run-at-for-preventing-duplciate-pipeline-creations.yml b/changelogs/unreleased/set-real-next-run-at-for-preventing-duplciate-pipeline-creations.yml deleted file mode 100644 index 04eb035b157..00000000000 --- a/changelogs/unreleased/set-real-next-run-at-for-preventing-duplciate-pipeline-creations.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Make pipeline schedule worker resilient -merge_request: 28407 -author: -type: performance diff --git a/changelogs/unreleased/sh-add-backtrace-to-sql-queries.yml b/changelogs/unreleased/sh-add-backtrace-to-sql-queries.yml deleted file mode 100644 index d4ca027d1b9..00000000000 --- a/changelogs/unreleased/sh-add-backtrace-to-sql-queries.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add backtraces to Peek performance bar for SQL calls -merge_request: -author: -type: added diff --git a/changelogs/unreleased/sh-add-header-to-jobs-admin-page.yml b/changelogs/unreleased/sh-add-header-to-jobs-admin-page.yml deleted file mode 100644 index b089e6e4f37..00000000000 --- a/changelogs/unreleased/sh-add-header-to-jobs-admin-page.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add a column header to admin/jobs page -merge_request: 28837 -author: -type: other diff --git a/changelogs/unreleased/sh-clean-up-bitbucket-import-errors.yml b/changelogs/unreleased/sh-clean-up-bitbucket-import-errors.yml new file mode 100644 index 00000000000..e4c9de74e6a --- /dev/null +++ b/changelogs/unreleased/sh-clean-up-bitbucket-import-errors.yml @@ -0,0 +1,5 @@ +--- +title: Avoid storing backtraces from Bitbucket Cloud imports in the database +merge_request: 29862 +author: +type: performance diff --git a/changelogs/unreleased/sh-default-visibility-fix.yml b/changelogs/unreleased/sh-default-visibility-fix.yml deleted file mode 100644 index 8308f310150..00000000000 --- a/changelogs/unreleased/sh-default-visibility-fix.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Set project default visibility to max allowed -merge_request: 28754 -author: -type: fixed diff --git a/changelogs/unreleased/sh-enable-ref-name-caching-discussions.yml b/changelogs/unreleased/sh-enable-ref-name-caching-discussions.yml new file mode 100644 index 00000000000..12f4a5a499d --- /dev/null +++ b/changelogs/unreleased/sh-enable-ref-name-caching-discussions.yml @@ -0,0 +1,5 @@ +--- +title: Enable Gitaly ref name caching for discussions.json +merge_request: 29951 +author: +type: performance diff --git a/changelogs/unreleased/sh-fix-fogbugz-import.yml b/changelogs/unreleased/sh-fix-fogbugz-import.yml deleted file mode 100644 index 1ac730fca24..00000000000 --- a/changelogs/unreleased/sh-fix-fogbugz-import.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix Fogbugz Importer not working -merge_request: 29383 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-issue-55869.yml b/changelogs/unreleased/sh-fix-issue-55869.yml deleted file mode 100644 index 7935cffc13b..00000000000 --- a/changelogs/unreleased/sh-fix-issue-55869.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix alignment of resend button in members page -merge_request: 28202 -author: -type: other diff --git a/changelogs/unreleased/sh-fix-issue-63158.yml b/changelogs/unreleased/sh-fix-issue-63158.yml deleted file mode 100644 index 1a79166b6a2..00000000000 --- a/changelogs/unreleased/sh-fix-issue-63158.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix inability to set visibility_level on project via API -merge_request: 29578 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-rebase-error-clearing.yml b/changelogs/unreleased/sh-fix-rebase-error-clearing.yml deleted file mode 100644 index 4f5f2779e7f..00000000000 --- a/changelogs/unreleased/sh-fix-rebase-error-clearing.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Properly clear the merge error upon rebase failure -merge_request: 28319 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-resolve-button-not-available.yml b/changelogs/unreleased/sh-fix-resolve-button-not-available.yml deleted file mode 100644 index 85a9007f570..00000000000 --- a/changelogs/unreleased/sh-fix-resolve-button-not-available.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix "Resolve conflicts" button not appearing for some users -merge_request: 29535 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-tag-push-remote-mirror.yml b/changelogs/unreleased/sh-fix-tag-push-remote-mirror.yml deleted file mode 100644 index 7f33ab28e3d..00000000000 --- a/changelogs/unreleased/sh-fix-tag-push-remote-mirror.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix remote mirrors not updating after tag push -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-utf-8-encoding-resolve-conflicts.yml b/changelogs/unreleased/sh-fix-utf-8-encoding-resolve-conflicts.yml deleted file mode 100644 index 31039099788..00000000000 --- a/changelogs/unreleased/sh-fix-utf-8-encoding-resolve-conflicts.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix UTF-8 conversion issues when resolving conflicts -merge_request: 29453 -author: -type: fixed diff --git a/changelogs/unreleased/sh-omit-blocked-admins-from-notification.yml b/changelogs/unreleased/sh-omit-blocked-admins-from-notification.yml deleted file mode 100644 index 82c5505892f..00000000000 --- a/changelogs/unreleased/sh-omit-blocked-admins-from-notification.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Omit blocked admins from repository check e-mails -merge_request: 29507 -author: -type: fixed diff --git a/changelogs/unreleased/sh-omit-issues-links-on-poll.yml b/changelogs/unreleased/sh-omit-issues-links-on-poll.yml new file mode 100644 index 00000000000..21e51d3534f --- /dev/null +++ b/changelogs/unreleased/sh-omit-issues-links-on-poll.yml @@ -0,0 +1,5 @@ +--- +title: Omit issues links in merge request entity API response +merge_request: 29917 +author: +type: performance diff --git a/changelogs/unreleased/sh-speed-up-commit-loading.yml b/changelogs/unreleased/sh-speed-up-commit-loading.yml deleted file mode 100644 index db408708385..00000000000 --- a/changelogs/unreleased/sh-speed-up-commit-loading.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Speed up commit loads by disabling BatchLoader replace_methods -merge_request: 29633 -author: -type: performance diff --git a/changelogs/unreleased/sh-strong-memoize-appearances.yml b/changelogs/unreleased/sh-strong-memoize-appearances.yml new file mode 100644 index 00000000000..dc4fe1c4d8e --- /dev/null +++ b/changelogs/unreleased/sh-strong-memoize-appearances.yml @@ -0,0 +1,5 @@ +--- +title: Memoize non-existent custom appearances +merge_request: 29957 +author: +type: performance diff --git a/changelogs/unreleased/sh-update-process-mem.yml b/changelogs/unreleased/sh-update-process-mem.yml deleted file mode 100644 index 51b22fb0f00..00000000000 --- a/changelogs/unreleased/sh-update-process-mem.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update get_process_mem to 0.2.3 -merge_request: 28248 -author: -type: other diff --git a/changelogs/unreleased/sh-upgrade-ruby-2-6-3-ce.yml b/changelogs/unreleased/sh-upgrade-ruby-2-6-3-ce.yml deleted file mode 100644 index 9ad5c9ebb64..00000000000 --- a/changelogs/unreleased/sh-upgrade-ruby-2-6-3-ce.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade Ruby version to 2.6.3 -merge_request: 28117 -author: -type: performance diff --git a/changelogs/unreleased/t1.yml b/changelogs/unreleased/t1.yml deleted file mode 100644 index 6740375485d..00000000000 --- a/changelogs/unreleased/t1.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Set up git client in Jupyter installtion -merge_request: 28783 -author: Amit Rathi -type: added diff --git a/changelogs/unreleased/thomas-nilsson-irfu-gitlab-ce-thomas-nilsson-irfu-master-patch-13137.yml b/changelogs/unreleased/thomas-nilsson-irfu-gitlab-ce-thomas-nilsson-irfu-master-patch-13137.yml deleted file mode 100644 index 3391fcc9537..00000000000 --- a/changelogs/unreleased/thomas-nilsson-irfu-gitlab-ce-thomas-nilsson-irfu-master-patch-13137.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow masking if 8 or more characters in base64. -merge_request: 29143 -author: thomas-nilsson-irfu -type: changed diff --git a/changelogs/unreleased/update-babel-to-7-4-4.yml b/changelogs/unreleased/update-babel-to-7-4-4.yml deleted file mode 100644 index 0d4b4700bb2..00000000000 --- a/changelogs/unreleased/update-babel-to-7-4-4.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade babel to 7.4.4 -merge_request: 28437 -author: Takuya Noguchi -type: other diff --git a/changelogs/unreleased/update-gitaly-to-v1-42-1.yml b/changelogs/unreleased/update-gitaly-to-v1-42-1.yml deleted file mode 100644 index ff42bdd9c0b..00000000000 --- a/changelogs/unreleased/update-gitaly-to-v1-42-1.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Update Gitaly to v1.42.1" -merge_request: 28425 -author: -type: other diff --git a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-0.yml b/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-0.yml deleted file mode 100644 index 494331158fb..00000000000 --- a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GitLab Runner Helm Chart to 0.5.0 -merge_request: 28497 -author: -type: other diff --git a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-1.yml b/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-1.yml deleted file mode 100644 index dd71aa7d461..00000000000 --- a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-1.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GitLab Runner Helm Chart to 0.5.1 -merge_request: 28720 -author: -type: other diff --git a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-2.yml b/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-2.yml deleted file mode 100644 index 9ca6d18c2a8..00000000000 --- a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-2.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GitLab Runner Helm Chart to 0.5.2 -merge_request: 29050 -author: -type: other diff --git a/changelogs/unreleased/update-gitlab-shell-9-3-0.yml b/changelogs/unreleased/update-gitlab-shell-9-3-0.yml deleted file mode 100644 index 781ff31c7d8..00000000000 --- a/changelogs/unreleased/update-gitlab-shell-9-3-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update to GitLab Shell v9.3.0 -merge_request: 29283 -author: -type: other diff --git a/changelogs/unreleased/update-pages.yml b/changelogs/unreleased/update-pages.yml deleted file mode 100644 index 97a20b6b8fa..00000000000 --- a/changelogs/unreleased/update-pages.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GitLab Pages to v1.6.0 -merge_request: 29048 -author: -type: other diff --git a/changelogs/unreleased/update-pagination-texts.yml b/changelogs/unreleased/update-pagination-texts.yml new file mode 100644 index 00000000000..6a398e26242 --- /dev/null +++ b/changelogs/unreleased/update-pagination-texts.yml @@ -0,0 +1,5 @@ +--- +title: Update pagination prev and next texts +merge_request: 29911 +author: +type: other diff --git a/changelogs/unreleased/update-psd-doc.yml b/changelogs/unreleased/update-psd-doc.yml deleted file mode 100644 index 38c8d1c0d68..00000000000 --- a/changelogs/unreleased/update-psd-doc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update project security dashboard documentation -merge_request: 28681 -author: -type: changed diff --git a/changelogs/unreleased/update-smileys-new.yml b/changelogs/unreleased/update-smileys-new.yml deleted file mode 100644 index 0e3f606c81b..00000000000 --- a/changelogs/unreleased/update-smileys-new.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update new smiley icons, find n replace old names with new ones -merge_request: 28338 -author: Jarek Ostrowski -type: changed diff --git a/changelogs/unreleased/upgrade-pages-to-v1-6-1.yml b/changelogs/unreleased/upgrade-pages-to-v1-6-1.yml deleted file mode 100644 index 0ab58bb50d8..00000000000 --- a/changelogs/unreleased/upgrade-pages-to-v1-6-1.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GitLab Pages to v1.6.1 -merge_request: 29559 -author: -type: other diff --git a/changelogs/unreleased/variables-boolean-type.yml b/changelogs/unreleased/variables-boolean-type.yml deleted file mode 100644 index 7776657f60a..00000000000 --- a/changelogs/unreleased/variables-boolean-type.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'API: change masked attribute type to Boolean' -merge_request: 28758 -author: -type: other diff --git a/changelogs/unreleased/visual-review-apps-fix-dropdown.yml b/changelogs/unreleased/visual-review-apps-fix-dropdown.yml deleted file mode 100644 index ade68c26df9..00000000000 --- a/changelogs/unreleased/visual-review-apps-fix-dropdown.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Move Dropdown to Stick to MR View App Button -merge_request: 29767 -author: -type: fixed diff --git a/changelogs/unreleased/weimeng-email-routing.yml b/changelogs/unreleased/weimeng-email-routing.yml deleted file mode 100644 index 6536433bd03..00000000000 --- a/changelogs/unreleased/weimeng-email-routing.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add ability to define notification email addresses for groups you belong to. -merge_request: 25299 -author: -type: added diff --git a/changelogs/unreleased/winh-notes-error-handling.yml b/changelogs/unreleased/winh-notes-error-handling.yml deleted file mode 100644 index 6f23dd459d4..00000000000 --- a/changelogs/unreleased/winh-notes-error-handling.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Handle errors in successful notes reply -merge_request: 28082 -author: -type: fixed diff --git a/changelogs/unreleased/zj-gitaly-usage-data.yml b/changelogs/unreleased/zj-gitaly-usage-data.yml new file mode 100644 index 00000000000..ce5087292ed --- /dev/null +++ b/changelogs/unreleased/zj-gitaly-usage-data.yml @@ -0,0 +1,5 @@ +--- +title: Add Gitaly data to the usage ping +merge_request: +author: +type: added diff --git a/changelogs/unreleased/zj-remove-delta-island-feature-flag.yml b/changelogs/unreleased/zj-remove-delta-island-feature-flag.yml deleted file mode 100644 index e752e01b701..00000000000 --- a/changelogs/unreleased/zj-remove-delta-island-feature-flag.yml +++ /dev/null @@ -1,3 +0,0 @@ -merge_request: 28871 -title: Improve clone performance by using delta islands -type: performance diff --git a/changelogs/unreleased/zj-usage-ping-pool-repository.yml b/changelogs/unreleased/zj-usage-ping-pool-repository.yml deleted file mode 100644 index 62044a933d0..00000000000 --- a/changelogs/unreleased/zj-usage-ping-pool-repository.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add Pool repository to the usage ping -merge_request: 28267 -author: -type: other diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql index baded682e46..5b3b35c9226 100644 --- a/config/database.yml.postgresql +++ b/config/database.yml.postgresql @@ -9,6 +9,15 @@ production: username: git password: "secure password" host: localhost + # load_balancing: + # hosts: + # - host1.example.com + # - host2.example.com + # discover: + # nameserver: 1.2.3.4 + # port: 8600 + # record: secondary.postgresql.service.consul + # interval: 300 # # Development specific diff --git a/config/dependency_decisions.yml b/config/dependency_decisions.yml index af76bace577..40a80429afa 100644 --- a/config/dependency_decisions.yml +++ b/config/dependency_decisions.yml @@ -599,3 +599,10 @@ :why: https://github.com/apache/incubator-echarts/blob/master/LICENSE :versions: [] :when: 2018-12-07 20:46:12.421256000 Z +- - :license + - contracts + - BSD + - :who: Jarka Košanová + :why: https://github.com/egonSchiele/contracts.ruby/blob/master/LICENSE + :versions: [] + :when: 2019-04-01 11:29:39.361015000 Z diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index c83f569d885..dddc5ec3540 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -230,7 +230,45 @@ production: &base ## Packages (maven repository, npm registry, etc...) packages: - enabled: false + enabled: true + # The location where build packages are stored (default: shared/packages). + # storage_path: shared/packages + object_store: + enabled: false + remote_directory: packages # The bucket name + # direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false) + # background_upload: false # Temporary option to limit automatic upload (Default: true) + # proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage + connection: + provider: AWS + aws_access_key_id: AWS_ACCESS_KEY_ID + aws_secret_access_key: AWS_SECRET_ACCESS_KEY + region: us-east-1 + # host: 'localhost' # default: s3.amazonaws.com + # endpoint: 'http://127.0.0.1:9000' # default: nil + # aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4. + # path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object' + + ## Dependency Proxy + dependency_proxy: + enabled: true + # The location where build packages are stored (default: shared/dependency_proxy). + # storage_path: shared/dependency_proxy + object_store: + enabled: false + remote_directory: dependency_proxy # The bucket name + # direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false) + # background_upload: false # Temporary option to limit automatic upload (Default: true) + # proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage + connection: + provider: AWS + aws_access_key_id: AWS_ACCESS_KEY_ID + aws_secret_access_key: AWS_SECRET_ACCESS_KEY + region: us-east-1 + # host: 'localhost' # default: s3.amazonaws.com + # endpoint: 'http://127.0.0.1:9000' # default: nil + # aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4. + # path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object' ## GitLab Pages pages: @@ -306,6 +344,53 @@ production: &base schedule_migrate_external_diffs_worker: cron: "15 * * * *" + # GitLab EE only jobs. These jobs are automatically enabled for an EE + # installation, and ignored for a CE installation. + ee_cron_jobs: + # Snapshot active users statistics + historical_data_worker: + cron: "0 12 * * *" + + # In addition to refreshing users when they log in, + # periodically refresh LDAP users membership. + # NOTE: This will only take effect if LDAP is enabled + ldap_sync_worker: + cron: "30 1 * * *" + + # Periodically refresh LDAP groups membership. + # NOTE: This will only take effect if LDAP is enabled + ldap_group_sync_worker: + cron: "0 * * * *" + + # GitLab Geo metrics update worker + # NOTE: This will only take effect if Geo is enabled + geo_metrics_update_worker: + cron: "*/1 * * * *" + + # GitLab Geo prune event log worker + # NOTE: This will only take effect if Geo is enabled (primary node only) + geo_prune_event_log_worker: + cron: "*/5 * * * *" + + # GitLab Geo repository sync worker + # NOTE: This will only take effect if Geo is enabled (secondary nodes only) + geo_repository_sync_worker: + cron: "*/1 * * * *" + + # GitLab Geo file download dispatch worker + # NOTE: This will only take effect if Geo is enabled (secondary nodes only) + geo_file_download_dispatch_worker: + cron: "*/1 * * * *" + + # GitLab Geo migrated local files clean up worker + # NOTE: This will only take effect if Geo is enabled (secondary nodes only) + geo_migrated_local_files_clean_up_worker: + cron: "15 */6 * * *" + + # Export pseudonymized data in CSV format for analysis + pseudonymizer_worker: + cron: "0 * * * *" + registry: # enabled: true # host: registry.example.com @@ -323,6 +408,16 @@ production: &base # clientside_dsn: https://<key>@sentry.io/<project> # environment: 'production' # e.g. development, staging, production + ## Geo + # NOTE: These settings will only take effect if Geo is enabled + geo: + # This is an optional identifier which Geo nodes can use to identify themselves. + # For example, if external_url is the same for two secondaries, you must specify + # a unique Geo node name for those secondaries. + # + # If it is blank, it defaults to external_url. + node_name: '' + # # 2. GitLab CI settings # ========================== @@ -349,6 +444,19 @@ production: &base # bundle exec rake gitlab:ldap:check RAILS_ENV=production ldap: enabled: false + + # This setting controls the number of seconds between LDAP permission checks + # for each user. After this time has expired for a given user, their next + # interaction with GitLab (a click in the web UI, a git pull, etc.) will be + # slower because the LDAP permission check is being performed. How much + # slower depends on your LDAP setup, but it is not uncommon for this check + # to add seconds of waiting time. The default value is to have a "slow + # click" once every 3600 seconds (i.e., once per hour). + # + # Warning: if you set this value too low, every click in GitLab will be a + # "slow click" for all of your LDAP users. + # sync_time: 3600 + servers: ########################################################################## # @@ -446,6 +554,10 @@ production: &base # A value of 0 means there is no timeout. timeout: 10 + # Enable smartcard authentication against the LDAP server. Valid values + # are "false", "optional", and "required". + smartcard_auth: false + # This setting specifies if LDAP server is Active Directory LDAP server. # For non AD servers it skips the AD specific queries. # If your LDAP server is not AD, set this to false. @@ -485,6 +597,31 @@ production: &base # user_filter: '' + # Base where we can search for groups + # + # Ex. ou=Groups,dc=gitlab,dc=example + # + group_base: '' + + # LDAP group of users who should be admins in GitLab + # + # Ex. GLAdmins + # + admin_group: '' + + # LDAP group of users who should be marked as external users in GitLab + # + # Ex. ['Contractors', 'Interns'] + # + external_groups: [] + + # Name of attribute which holds a ssh public key of the user object. + # If false or nil, SSH key syncronisation will be disabled. + # + # Ex. sshpublickey + # + sync_ssh_keys: false + # LDAP attributes that GitLab will use to create an account for the LDAP user. # The specified attribute can either be the attribute name as a string (e.g. 'mail'), # or an array of attribute names to try in order (e.g. ['mail', 'email']). @@ -516,6 +653,38 @@ production: &base # host: # .... + ## Smartcard authentication settings + smartcard: + # Allow smartcard authentication + enabled: false + + # Path to a file containing a CA certificate + ca_file: '/etc/ssl/certs/CA.pem' + + # Port where the client side certificate is requested by the webserver (NGINX/Apache) + # client_certificate_required_port: 3444 + + ## Kerberos settings + kerberos: + # Allow the HTTP Negotiate authentication method for Git clients + enabled: false + + # Kerberos 5 keytab file. The keytab file must be readable by the GitLab user, + # and should be different from other keytabs in the system. + # (default: use default keytab from Krb5 config) + # keytab: /etc/http.keytab + + # The Kerberos service name to be used by GitLab. + # (default: accept any service name in keytab file) + # service_principal_name: HTTP/gitlab.example.com@EXAMPLE.COM + + # Dedicated port: Git before 2.4 does not fall back to Basic authentication if Negotiate fails. + # To support both Basic and Negotiate methods with older versions of Git, configure + # nginx to proxy GitLab on an extra port (e.g. 8443) and uncomment the following lines + # to dedicate this port to Kerberos authentication. (default: false) + # use_dedicated_port: true + # port: 8443 + # https: true ## OmniAuth settings omniauth: @@ -635,6 +804,8 @@ production: &base # name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' # } } # + # - { name: 'group_saml' } + # # - { name: 'crowd', # args: { # crowd_server_url: 'CROWD SERVER URL', @@ -707,6 +878,20 @@ production: &base # # Specifies Amazon S3 storage class to use for backups, this is optional # # storage_class: 'STANDARD' + ## Pseudonymizer exporter + pseudonymizer: + # Tables manifest that specifies the fields to extract and pseudonymize. + manifest: config/pseudonymizer.yml + upload: + remote_directory: 'gitlab-elt' + # Fog storage connection settings, see http://fog.io/storage/ . + connection: + # provider: AWS + # region: eu-west-1 + # aws_access_key_id: AKIAKIAKI + # aws_secret_access_key: 'secret123' + # # The remote 'directory' to store the CSV files. For S3, this would be the bucket name. + ## GitLab Shell settings gitlab_shell: path: /home/git/gitlab-shell/ @@ -872,6 +1057,17 @@ test: token: secret backup: path: tmp/tests/backups + pseudonymizer: + manifest: config/pseudonymizer.yml + upload: + # The remote 'directory' to store the CSV files. For S3, this would be the bucket name. + remote_directory: gitlab-elt.test + # Fog storage connection settings, see http://fog.io/storage/ + connection: + provider: AWS # Only AWS supported at the moment + aws_access_key_id: AWS_ACCESS_KEY_ID + aws_secret_access_key: AWS_SECRET_ACCESS_KEY + region: us-east-1 gitlab_shell: path: tmp/tests/gitlab-shell/ authorized_keys_file: tmp/tests/authorized_keys diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 0c8d94ccaed..6cca7a3b75f 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -117,6 +117,15 @@ if github_settings end end +# SAML should be enabled for the tests automatically, but only for EE. +saml_provider_enabled = Settings.omniauth.providers.any? do |provider| + provider['name'] == 'group_saml' +end + +if Gitlab.ee? && Rails.env.test? && !saml_provider_enabled + Settings.omniauth.providers << Settingslogic.new({ 'name' => 'group_saml' }) +end + Settings['shared'] ||= Settingslogic.new({}) Settings.shared['path'] = Settings.absolute(Settings.shared['path'] || "shared") @@ -291,6 +300,11 @@ Settings.gravatar['host'] = Settings.host_without_www(Settings.gravatar[ # Cron Jobs # Settings['cron_jobs'] ||= Settingslogic.new({}) + +if Gitlab.ee? && Settings['ee_cron_jobs'] + Settings.cron_jobs.merge!(Settings.ee_cron_jobs) +end + Settings.cron_jobs['stuck_ci_jobs_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['stuck_ci_jobs_worker']['cron'] ||= '0 * * * *' Settings.cron_jobs['stuck_ci_jobs_worker']['job_class'] = 'StuckCiJobsWorker' diff --git a/config/prometheus/common_metrics.yml b/config/prometheus/common_metrics.yml index 3c67ca36791..f9ce5a6f365 100644 --- a/config/prometheus/common_metrics.yml +++ b/config/prometheus/common_metrics.yml @@ -171,7 +171,7 @@ panel_groups: weight: 2 metrics: - id: system_metrics_kubernetes_container_memory_average - query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024' + query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024' label: Pod average unit: MB - title: "Canary: Memory Usage (Pod Average)" @@ -190,7 +190,7 @@ panel_groups: weight: 1 metrics: - id: system_metrics_kubernetes_container_core_usage - query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))' + query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))' label: Pod average unit: "cores" - title: "Canary: Core Usage (Pod Average)" diff --git a/config/routes/project.rb b/config/routes/project.rb index a1e769f6ca3..0e8e089c78a 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -406,6 +406,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do post :toggle_subscription post :mark_as_spam post :move + put :reorder get :related_branches get :can_create_branch get :realtime_changes diff --git a/config/settings.rb b/config/settings.rb index 1b94df785a7..6df2132332c 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -1,5 +1,11 @@ require 'settingslogic' +# We can not use `Rails.root` here, as this file might be loaded without the +# full Rails environment being loaded. We can not use `require_relative` either, +# as Rails uses `load` for `require_dependency` (used when loading the Rails +# environment). This could then lead to this file being loaded twice. +require_dependency File.expand_path('../lib/gitlab', __dir__) + class Settings < Settingslogic source ENV.fetch('GITLAB_CONFIG') { Pathname.new(File.expand_path('..', __dir__)).join('config/gitlab.yml') } namespace ENV.fetch('GITLAB_ENV') { Rails.env } diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml index fd9ce4d3374..4fda9d69077 100644 --- a/config/sidekiq_queues.yml +++ b/config/sidekiq_queues.yml @@ -93,3 +93,20 @@ - [migrate_external_diffs, 1] - [update_project_statistics, 1] - [phabricator_import_import_tasks, 1] + + # EE-specific queues + - [ldap_group_sync, 2] + - [create_github_webhook, 2] + - [geo, 1] + - [repository_update_mirror, 1] + - [new_epic, 2] + - [project_import_schedule, 1] + - [project_update_repository_storage, 1] + - [admin_emails, 1] + - [elastic_batch_project_indexer, 1] + - [elastic_indexer, 1] + - [elastic_full_index, 1] + - [elastic_commit_indexer, 1] + - [elastic_namespace_indexer, 1] + - [export_csv, 1] + - [incident_management, 2] diff --git a/db/migrate/20190607085356_add_source_to_pages_domains.rb b/db/migrate/20190607085356_add_source_to_pages_domains.rb new file mode 100644 index 00000000000..0a845d7d11f --- /dev/null +++ b/db/migrate/20190607085356_add_source_to_pages_domains.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddSourceToPagesDomains < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:pages_domains, :certificate_source, :smallint, default: 0) + end + + def down + remove_column(:pages_domains, :certificate_source) + end +end diff --git a/db/post_migrate/20190606163724_migrate_legacy_managed_clusters_to_unmanaged.rb b/db/post_migrate/20190606163724_migrate_legacy_managed_clusters_to_unmanaged.rb new file mode 100644 index 00000000000..759ab939f7d --- /dev/null +++ b/db/post_migrate/20190606163724_migrate_legacy_managed_clusters_to_unmanaged.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class MigrateLegacyManagedClustersToUnmanaged < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + class Cluster < ActiveRecord::Base + include EachBatch + + self.table_name = 'clusters' + + has_many :kubernetes_namespaces, class_name: 'MigrateLegacyManagedClustersToUnmanaged::KubernetesNamespace' + + scope :managed, -> { where(managed: true) } + + enum cluster_type: { + instance_type: 1, + group_type: 2, + project_type: 3 + } + end + + class KubernetesNamespace < ActiveRecord::Base + self.table_name = 'clusters_kubernetes_namespaces' + + belongs_to :cluster, class_name: 'MigrateLegacyManagedClustersToUnmanaged::Cluster' + end + + def up + Cluster.managed + .project_type + .left_joins(:kubernetes_namespaces) + .where(clusters_kubernetes_namespaces: { cluster_id: nil }) + .where('clusters.created_at < ?', 5.minutes.ago) + .each_batch do |batch| + batch.update_all(managed: false) + end + end + + def down + end +end diff --git a/db/post_migrate/20190613231640_migrate_managed_clusters_with_no_token_to_unmanaged.rb b/db/post_migrate/20190613231640_migrate_managed_clusters_with_no_token_to_unmanaged.rb new file mode 100644 index 00000000000..b2914afe2cd --- /dev/null +++ b/db/post_migrate/20190613231640_migrate_managed_clusters_with_no_token_to_unmanaged.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class MigrateManagedClustersWithNoTokenToUnmanaged < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + class Cluster < ActiveRecord::Base + include EachBatch + + self.table_name = 'clusters' + + has_many :kubernetes_namespaces, class_name: 'MigrateManagedClustersWithNoTokenToUnmanaged::KubernetesNamespace' + + scope :managed, -> { where(managed: true) } + + enum cluster_type: { + instance_type: 1, + group_type: 2, + project_type: 3 + } + end + + class KubernetesNamespace < ActiveRecord::Base + self.table_name = 'clusters_kubernetes_namespaces' + + belongs_to :cluster, class_name: 'MigrateManagedClustersWithNoTokenToUnmanaged::Cluster' + end + + def up + Cluster.managed + .project_type + .joins(:kubernetes_namespaces) + .where(clusters_kubernetes_namespaces: { encrypted_service_account_token: nil }) + .where('clusters.created_at < ?', Date.new(2018, 12, 1).midnight) + .each_batch do |batch| + batch.update_all(managed: false) + end + end + + def down + end +end diff --git a/db/post_migrate/20190618171120_update_geo_nodes_primary.rb b/db/post_migrate/20190618171120_update_geo_nodes_primary.rb new file mode 100644 index 00000000000..dc9cfbda177 --- /dev/null +++ b/db/post_migrate/20190618171120_update_geo_nodes_primary.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class UpdateGeoNodesPrimary < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + change_column_default(:geo_nodes, :primary, false) + change_column_null(:geo_nodes, :primary, false, false) + end + + def down + change_column_default(:geo_nodes, :primary, nil) + change_column_null(:geo_nodes, :primary, true) + end +end diff --git a/db/schema.rb b/db/schema.rb index e35c79439ef..f6cf2ee07e3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1391,7 +1391,7 @@ ActiveRecord::Schema.define(version: 20190620112608) do end create_table "geo_nodes", id: :serial, force: :cascade do |t| - t.boolean "primary" + t.boolean "primary", default: false, null: false t.integer "oauth_application_id" t.boolean "enabled", default: true, null: false t.string "access_key" @@ -2333,6 +2333,7 @@ ActiveRecord::Schema.define(version: 20190620112608) do t.boolean "auto_ssl_enabled", default: false, null: false t.datetime_with_timezone "certificate_valid_not_before" t.datetime_with_timezone "certificate_valid_not_after" + t.integer "certificate_source", limit: 2, default: 0, null: false t.index ["domain"], name: "index_pages_domains_on_domain", unique: true, using: :btree t.index ["project_id", "enabled_until"], name: "index_pages_domains_on_project_id_and_enabled_until", using: :btree t.index ["project_id"], name: "index_pages_domains_on_project_id", using: :btree diff --git a/doc/administration/geo/replication/troubleshooting.md b/doc/administration/geo/replication/troubleshooting.md index c5bdd36ba70..846afd8f5f4 100644 --- a/doc/administration/geo/replication/troubleshooting.md +++ b/doc/administration/geo/replication/troubleshooting.md @@ -1,15 +1,23 @@ # Geo Troubleshooting **[PREMIUM ONLY]** -NOTE: **Note:** -This list is an attempt to document all the moving parts that can go wrong. -We are working into getting all this steps verified automatically in a -rake task in the future. - Setting up Geo requires careful attention to details and sometimes it's easy to -miss a step. Here is a list of questions you should ask to try to detect -what you need to fix (all commands and path locations are for Omnibus installs): +miss a step. + +Here is a list of steps you should take to attempt to fix problem: + +- Perform [basic troubleshooting](#basic-troubleshooting). +- Fix any [replication errors](#fixing-replication-errors). +- Fix any [Foreign Data Wrapper](#fixing-foreign-data-wrapper-errors) errors. +- Fix any [common](#fixing-common-errors) errors. -## First check the health of the **secondary** node +## Basic troubleshooting + +Before attempting more advanced troubleshooting: + +- Check [the health of the **secondary** node](#check-the-health-of-the-secondary-node). +- Check [if PostgreSQL replication is working](#check-if-postgresql-replication-is-working). + +### Check the health of the **secondary** node Visit the **primary** node's **Admin Area > Geo** (`/admin/geo/nodes`) in your browser. We perform the following health checks on each **secondary** node @@ -23,10 +31,12 @@ to help identify if something is wrong: ![Geo health check](img/geo_node_healthcheck.png) -For information on how to resolve common errors reported from the UI, see [common errors](#common-errors). +For information on how to resolve common errors reported from the UI, see +[Fixing Common Errors](#fixing-common-errors). If the UI is not working, or you are unable to log in, you can run the Geo health check manually to get this information as well as a few more details. + This rake task can be run on an app node in the **primary** or **secondary** Geo nodes: @@ -36,7 +46,7 @@ sudo gitlab-rake gitlab:geo:check Example output: -``` +```text Checking Geo ... GitLab Geo is available ... yes @@ -68,7 +78,7 @@ sudo gitlab-rake geo:status Example output: -``` +```text http://secondary.example.com/ ----------------------------------------------------- GitLab Version: 11.10.4-ee @@ -89,16 +99,21 @@ http://secondary.example.com/ Last status report was: 2 minutes ago ``` -## Is Postgres replication working? +### Check if PostgreSQL replication is working + +To check if PostgreSQL replication is working, check if: + +- [Nodes are pointing to the correct database instance](#are-nodes-pointing-to-the-correct-database-instance). +- [Geo can detect the current node correctly](#can-geo-detect-the-current-node-correctly). -### Are my nodes pointing to the correct database instance? +#### Are nodes pointing to the correct database instance? You should make sure your **primary** Geo node points to the instance with writing permissions. Any **secondary** nodes should point only to read-only instances. -### Can Geo detect my current node correctly? +#### Can Geo detect the current node correctly? Geo uses the defined node from the **Admin Area > Geo** screen, and tries to match it with the value defined in the `/etc/gitlab/gitlab.rb` configuration file. @@ -112,29 +127,38 @@ sudo gitlab-rails runner "puts Gitlab::Geo.current_node.inspect" and expect something like: -``` +```ruby #<GeoNode id: 2, schema: "https", host: "gitlab.example.com", port: 443, relative_url_root: "", primary: false, ...> ``` By running the command above, `primary` should be `true` when executed in the **primary** node, and `false` on any **secondary** node. -## How do I fix the message, "ERROR: replication slots can only be used if max_replication_slots > 0"? +## Fixing replication errors + +The following sections outline troubleshooting steps for fixing replication +errors. + +### Message: "ERROR: replication slots can only be used if max_replication_slots > 0"? This means that the `max_replication_slots` PostgreSQL variable needs to be set on the **primary** database. In GitLab 9.4, we have made this setting default to 1. You may need to increase this value if you have more -**secondary** nodes. Be sure to restart PostgreSQL for this to take +**secondary** nodes. + +Be sure to restart PostgreSQL for this to take effect. See the [PostgreSQL replication setup][database-pg-replication] guide for more details. -## How do I fix the message, "FATAL: could not start WAL streaming: ERROR: replication slot "geo_secondary_my_domain_com" does not exist"? +### Message: "FATAL: could not start WAL streaming: ERROR: replication slot "geo_secondary_my_domain_com" does not exist"? This occurs when PostgreSQL does not have a replication slot for the -**secondary** node by that name. You may want to rerun the [replication +**secondary** node by that name. + +You may want to rerun the [replication process](database.md) on the **secondary** node . -## How do I fix the message, "Command exceeded allowed execution time" when setting up replication? +### Message: "Command exceeded allowed execution time" when setting up replication? This may happen while [initiating the replication process][database-start-replication] on the **secondary** node, and indicates that your initial dataset is too large to be replicated in the default timeout (30 minutes). @@ -153,7 +177,7 @@ sudo gitlab-ctl \ This will give the initial replication up to six hours to complete, rather than the default thirty minutes. Adjust as required for your installation. -## How do I fix the message, "PANIC: could not write to file 'pg_xlog/xlogtemp.123': No space left on device" +### Message: "PANIC: could not write to file 'pg_xlog/xlogtemp.123': No space left on device" Determine if you have any unused replication slots in the **primary** database. This can cause large amounts of log data to build up in `pg_xlog`. Removing the unused slots can reduce the amount of space used in the `pg_xlog`. @@ -184,11 +208,12 @@ Slots where `active` is `f` are not active. SELECT pg_drop_replication_slot('<name_of_extra_slot>'); ``` -## Very large repositories never successfully synchronize on the **secondary** node +### Very large repositories never successfully synchronize on the **secondary** node GitLab places a timeout on all repository clones, including project imports and Geo synchronization operations. If a fresh `git clone` of a repository on the primary takes more than a few minutes, you may be affected by this. + To increase the timeout, add the following line to `/etc/gitlab/gitlab.rb` on the **secondary** node: @@ -205,7 +230,7 @@ sudo gitlab-ctl reconfigure This will increase the timeout to three hours (10800 seconds). Choose a time long enough to accommodate a full clone of your largest repositories. -## How to reset Geo **secondary** node replication +### Reseting Geo **secondary** node replication If you get a **secondary** node in a broken state and want to reset the replication state, to start again from scratch, there are a few steps that can help you: @@ -289,12 +314,16 @@ to start again from scratch, there are a few steps that can help you: gitlab-ctl start ``` -## How do I fix a "Foreign Data Wrapper (FDW) is not configured" error? +## Fixing Foreign Data Wrapper errors + +This section documents ways to fix potential Foreign Data Wrapper errors. + +### "Foreign Data Wrapper (FDW) is not configured" error When setting up Geo, you might see this warning in the `gitlab-rake gitlab:geo:check` output: -``` +```text GitLab Geo tracking database Foreign Data Wrapper schema is up-to-date? ... foreign data wrapper is not configured ``` @@ -307,7 +336,7 @@ There are a few key points to remember: By default, the Geo secondary and tracking database are running on the same host on different ports. That is, 5432 and 5431 respectively. -### Checking configuration +#### Checking configuration NOTE: **Note:** The following steps are for Omnibus installs only. Using Geo with source-based installs was **deprecated** in GitLab 11.5. @@ -419,7 +448,7 @@ should see something like this: - `geo_postgresql['fdw_external_user']` - `geo_postgresql['fdw_external_password']` -### Manual reload of FDW schema +#### Manual reload of FDW schema If you're still unable to get FDW working, you may want to try a manual reload of the FDW schema. To manually reload the FDW schema: @@ -459,9 +488,25 @@ reload of the FDW schema. To manually reload the FDW schema: [database-start-replication]: database.md#step-3-initiate-the-replication-process [database-pg-replication]: database.md#postgresql-replication -## Common errors +### "Geo database has an outdated FDW remote schema" error + +GitLab can error with a `Geo database has an outdated FDW remote schema` message. + +For example: -This section documents common errors reported in the admin UI and how to fix them. +```text +Geo database has an outdated FDW remote schema. It contains 229 of 236 expected tables. Please refer to Geo Troubleshooting. +``` + +To resolve this, run the following command: + +```sh +sudo gitlab-rake geo:db:refresh_foreign_tables +``` + +## Fixing common errors + +This section documents common errors reported in the Admin UI and how to fix them. ### Geo database configuration file is missing @@ -470,7 +515,6 @@ GitLab cannot find or doesn't have permission to access the `database_geo.yml` c In an Omnibus GitLab installation, the file should be in `/var/opt/gitlab/gitlab-rails/etc`. If it doesn't exist or inadvertent changes have been made to it, run `sudo gitlab-ctl reconfigure` to restore it to its correct state. - If this path is mounted on a remote volume, please check your volume configuration and that it has correct permissions. ### Geo node has a database that is writable which is an indication it is not configured for replication with the primary node. @@ -503,7 +547,7 @@ Make sure you follow the [Geo database replication](database.md) instructions fo If you are using GitLab Omnibus installation, something might have failed during upgrade. You can: -- Run `sudo gitlab-ctl reconfigure`. +- Run `sudo gitlab-ctl reconfigure`. - Manually trigger the database migration by running: `sudo gitlab-rake geo:db:migrate` as root on the **secondary** node. ### Geo database is not configured to use Foreign Data Wrapper @@ -511,4 +555,4 @@ If you are using GitLab Omnibus installation, something might have failed during This error means the Geo Tracking Database doesn't have the FDW server and credentials configured. -See [How do I fix a "Foreign Data Wrapper (FDW) is not configured" error?](#how-do-i-fix-a-foreign-data-wrapper-fdw-is-not-configured-error). +See ["Foreign Data Wrapper (FDW) is not configured" error?](#foreign-data-wrapper-fdw-is-not-configured-error). diff --git a/doc/administration/high_availability/README.md b/doc/administration/high_availability/README.md index d9c80b1ec59..0c4f926c579 100644 --- a/doc/administration/high_availability/README.md +++ b/doc/administration/high_availability/README.md @@ -65,6 +65,7 @@ larger one. - 1 Redis node - 1 NFS/Gitaly storage server - 2 or more GitLab application nodes (Unicorn, Workhorse, Sidekiq) +- 1 Monitoring node (Prometheus, Grafana) #### Installation Instructions @@ -76,6 +77,7 @@ you can continue with the next step. 1. [Redis](redis.md#redis-in-a-scaled-environment) 1. [Gitaly](gitaly.md) (recommended) or [NFS](nfs.md) 1. [GitLab application nodes](gitlab.md) +1. [Monitoring node (Prometheus and Grafana)](monitoring_node.md) ### Full Scaling @@ -90,6 +92,7 @@ in size, indicating that there is contention or not enough resources. - 2 or more NFS/Gitaly storage servers - 2 or more Sidekiq nodes - 2 or more GitLab application nodes (Unicorn, Workhorse) +- 1 Monitoring node (Prometheus, Grafana) ## High Availability Architecture Examples @@ -133,6 +136,7 @@ the contention. - 3 Consul/Sentinel nodes - 2 or more GitLab application nodes (Unicorn, Workhorse, Sidekiq, PGBouncer) - 1 NFS/Gitaly server +- 1 Monitoring node (Prometheus, Grafana) ![Horizontal architecture diagram](img/horizontal.png) @@ -192,6 +196,7 @@ with the added complexity of many more nodes to configure, manage and monitor. - 2 or more API nodes (All requests to `/api`) - 2 or more Web nodes (All other web requests) - 2 or more NFS/Gitaly servers +- 1 Monitoring node (Prometheus, Grafana) ![Fully Distributed architecture diagram](img/fully-distributed.png) @@ -205,4 +210,5 @@ separately: 1. [NFS Client and Host setup](nfs_host_client_setup.md) 1. [Configure the GitLab application servers](gitlab.md) 1. [Configure the load balancers](load_balancer.md) +1. [Monitoring node (Prometheus and Grafana)](monitoring_node.md) diff --git a/doc/administration/high_availability/database.md b/doc/administration/high_availability/database.md index 2c051b660ee..4db53353218 100644 --- a/doc/administration/high_availability/database.md +++ b/doc/administration/high_availability/database.md @@ -82,7 +82,8 @@ deploy the bundled PostgreSQL. 1. Note the PostgreSQL node's IP address or hostname, port, and plain text password. These will be necessary when configuring the GitLab application servers later. - +1. [Enable monitoring](#enable-monitoring) + Advanced configuration options are supported and can be added if needed. @@ -399,6 +400,7 @@ check the [Troubleshooting section](#troubleshooting) before proceeding. ``` 1. [Reconfigure GitLab] for the changes to take effect. +1. [Enable Monitoring](#enable-monitoring) > Please note: > @@ -1086,6 +1088,25 @@ the previous section: the `gitlab` database user 1. [Reconfigure GitLab] for the changes to take effect +## Enable Monitoring + +> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0. + +If you enable Monitoring, it must be enabled on **all** database servers. + +1. Create/edit `/etc/gitlab/gitlab.rb` and add the following configuration: + + ```ruby + # Enable service discovery for Prometheus + consul['monitoring_service_discovery'] = true + + # Set the network addresses that the exporters will listen on + node_exporter['listen_address'] = '0.0.0.0:9100' + postgres_exporter['listen_address'] = '0.0.0.0:9187' + ``` + +1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. + ## Troubleshooting #### Consul and PostgreSQL changes not taking effect. diff --git a/doc/administration/high_availability/gitaly.md b/doc/administration/high_availability/gitaly.md index 1d8e6c999cb..90e5f71d835 100644 --- a/doc/administration/high_availability/gitaly.md +++ b/doc/administration/high_availability/gitaly.md @@ -19,3 +19,28 @@ Continue configuration of other components by going back to: - [Scaled Architectures](README.md#scalable-architecture-examples) - [High Availability Architectures](README.md#high-availability-architecture-examples) + +## Enable Monitoring + +> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0. + + 1. Create/edit `/etc/gitlab/gitlab.rb` and add the following configuration: + + ```ruby + # Enable service discovery for Prometheus + consul['enable'] = true + consul['monitoring_service_discovery'] = true + + # Replace placeholders + # Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z + # with the addresses of the Consul server nodes + consul['configuration'] = { + retry_join: %w(Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z), + } + + # Set the network addresses that the exporters will listen on + node_exporter['listen_address'] = '0.0.0.0:9100' + gitaly['prometheus_listen_addr'] = "0.0.0.0:9236" + ``` + + 1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. diff --git a/doc/administration/high_availability/gitlab.md b/doc/administration/high_availability/gitlab.md index 7e3ff741071..0e655e49922 100644 --- a/doc/administration/high_availability/gitlab.md +++ b/doc/administration/high_availability/gitlab.md @@ -76,6 +76,8 @@ registry['gid'] = 9002 ``` +1. [Enable monitoring](#enable-monitoring) + > **Note:** To maintain uniformity of links across HA clusters, the `external_url` on the first application server as well as the additional application servers should point to the external url that users will use to access GitLab. @@ -88,7 +90,8 @@ [Nginx documentation](https://docs.gitlab.com/omnibus/settings/nginx.html#enable-https) for more information. > - > **Note:** It is best to set the `uid` and `gid`s prior to the initial reconfigure of GitLab. Omnibus will not recursively `chown` directories if set after the initial reconfigure. + > **Note:** It is best to set the `uid` and `gid`s prior to the initial reconfigure + of GitLab. Omnibus will not recursively `chown` directories if set after the initial reconfigure. ## First GitLab application server @@ -129,6 +132,46 @@ need some extra configuration. 1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. +## Enable Monitoring + +> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0. + +If you enable Monitoring, it must be enabled on **all** GitLab servers. + +1. Create/edit `/etc/gitlab/gitlab.rb` and add the following configuration: + + ```ruby + # Enable service discovery for Prometheus + consul['enable'] = true + consul['monitoring_service_discovery'] = true + + # Replace placeholders + # Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z + # with the addresses of the Consul server nodes + consul['configuration'] = { + retry_join: %w(Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z), + } + + # Set the network addresses that the exporters will listen on + node_exporter['listen_address'] = '0.0.0.0:9100' + gitlab_workhorse['prometheus_listen_addr'] = '0.0.0.0:9229' + sidekiq['listen_address'] = "0.0.0.0" + unicorn['listen'] = '0.0.0.0' + + # Add the monitoring node's IP address to the monitoring whitelist and allow it to scrape the NGINX metrics + # Replace placeholder + # monitoring.gitlab.example.com + # with the addresses gathered for the monitoring node + gitlab_rails['monitoring_whitelist'] = ['monitoring.gitlab.example.com'] + nginx['status']['options']['allow'] = ['monitoring.gitlab.example.com'] + ``` + +1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. + +> **Warning:** After changing `unicorn['listen']` in `gitlab.rb`, and running `sudo gitlab-ctl reconfigure`, + it can take an extended period of time for unicorn to complete reloading after receiving a `HUP`. + For more information, see the [issue](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/4401). + ## Troubleshooting - `mount: wrong fs type, bad option, bad superblock on` diff --git a/doc/administration/high_availability/monitoring_node.md b/doc/administration/high_availability/monitoring_node.md new file mode 100644 index 00000000000..d16bf7dc0f0 --- /dev/null +++ b/doc/administration/high_availability/monitoring_node.md @@ -0,0 +1,67 @@ +# Configuring a Monitoring node for Scaling and High Availability + +> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0. + +## Standalone Monitoring node using GitLab Omnibus + +The GitLab Omnibus package can be used to configure a standalone Monitoring node running Prometheus and Grafana. +The monitoring node is not highly available. See [Scaling and High Availability](README.md) +for an overview of GitLab scaling and high availability options. + +The steps below are the minimum necessary to configure a Monitoring node running Prometheus and Grafana with +Omnibus: + +1. SSH into the Monitoring node. +1. [Download/install](https://about.gitlab.com/installation) the Omnibus GitLab + package you want using **steps 1 and 2** from the GitLab downloads page. + - Do not complete any other steps on the download page. + +1. Edit `/etc/gitlab/gitlab.rb` and add the contents: + + ```ruby + external_url 'http://gitlab.example.com' + + # Enable Prometheus + prometheus['enable'] = true + prometheus['listen_address'] = '0.0.0.0:9090' + prometheus['monitor_kubernetes'] = false + + # Enable Grafana + grafana['enable'] = true + grafana['admin_password'] = 'toomanysecrets' + + # Enable service discovery for Prometheus + consul['enable'] = true + consul['monitoring_service_discovery'] = true + + # Replace placeholders + # Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z + # with the addresses of the Consul server nodes + consul['configuration'] = { + retry_join: %w(Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z), + } + + # Disable all other services + gitlab_rails['auto_migrate'] = false + alertmanager['enable'] = false + gitaly['enable'] = false + gitlab_monitor['enable'] = false + gitlab_workhorse['enable'] = false + nginx['enable'] = true + postgres_exporter['enable'] = false + postgresql['enable'] = false + redis['enable'] = false + redis_exporter['enable'] = false + sidekiq['enable'] = false + unicorn['enable'] = false + node_exporter['enable'] = false + ``` + +1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. + +## Migrating to Service Discovery + +Once monitoring using Service Discovery is enabled with `consul['monitoring_service_discovery'] = true`, +ensure that `prometheus['scrape_configs']` is not set in `/etc/gitlab/gitlab.rb`. Setting both +`consul['monitoring_service_discovery'] = true` and `prometheus['scrape_configs']` in `/etc/gitlab/gitlab.rb` +will result in errors. diff --git a/doc/administration/high_availability/redis.md b/doc/administration/high_availability/redis.md index 1aaa709fc8f..f61a8834af3 100644 --- a/doc/administration/high_availability/redis.md +++ b/doc/administration/high_availability/redis.md @@ -74,6 +74,7 @@ Omnibus: 1. Note the Redis node's IP address or hostname, port, and Redis password. These will be necessary when configuring the GitLab application servers later. +1. [Enable Monitoring](#enable-monitoring) Advanced configuration options are supported and can be added if needed. @@ -749,6 +750,33 @@ gitlab_rails['redis_sentinels'] = [ [Reconfigure Omnibus GitLab][reconfigure] for the changes to take effect. +## Enable Monitoring + +> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0. + + If you enable Monitoring, it must be enabled on **all** Redis servers. + + 1. Create/edit `/etc/gitlab/gitlab.rb` and add the following configuration: + + ```ruby + # Enable service discovery for Prometheus + consul['enable'] = true + consul['monitoring_service_discovery'] = true + + # Replace placeholders + # Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z + # with the addresses of the Consul server nodes + consul['configuration'] = { + retry_join: %w(Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z), + } + + # Set the network addresses that the exporters will listen on + node_exporter['listen_address'] = '0.0.0.0:9100' + redis_exporter['listen_address'] = '0.0.0.0:9121' + ``` + + 1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. + ## Advanced configuration Omnibus GitLab configures some things behind the curtains to make the sysadmins' diff --git a/doc/ci/docker/using_docker_images.md b/doc/ci/docker/using_docker_images.md index f6b84dca734..e4dc289dbdb 100644 --- a/doc/ci/docker/using_docker_images.md +++ b/doc/ci/docker/using_docker_images.md @@ -478,7 +478,7 @@ To define which should be used, the GitLab Runner process reads the configuratio - A [variable](../variables/README.md#gitlab-cicd-environment-variables) in `.gitlab-ci.yml`. - A project's variables stored on the projects **Settings > CI/CD** page. - `DOCKER_AUTH_CONFIG` variable provided as environment variable in `config.toml` of the Runner. -- `config.json` file placed in `$HOME/docker` directory of the user running GitLab Runner process. +- `config.json` file placed in `$HOME/.docker` directory of the user running GitLab Runner process. If the `--user` flag is provided to run the GitLab Runner child processes as unprivileged user, the home directory of the main GitLab Runner process user will be used. diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index df455857dee..c8c92002be2 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -27,8 +27,7 @@ CI/CD's pipelines. Using variables means no hardcoded values. ### Predefined environment variables -GitLab CI/CD has a default set of -[predefined variables](predefined_variables.md) +GitLab CI/CD has a [default set of predefined variables](predefined_variables.md) which can be used without any specification needed. You can call issues numbers, user names, branch names, pipeline and commit IDs, and much more. @@ -36,7 +35,7 @@ pipeline and commit IDs, and much more. Predefined environment variables are the ones that GitLab provides out of the box for the local environment of the Runner. -GitLab reads the .gitlab-ci.yml file, sends the information +GitLab reads the `.gitlab-ci.yml` file, sends the information to the Runner (which runs the script commands), under which the variables are exposed. @@ -44,6 +43,9 @@ For example, two jobs under the same pipeline can share the same `CI_PIPELINE_ID` variable, but each one has its own `CI_JOB_ID` variable. +NOTE: **Note:** +Find here the full [**predefined variables reference table**](predefined_variables.md). + ### Custom environment variables When your use case requires a specific variable, you can @@ -480,7 +482,7 @@ Below you can find supported syntax reference: > Example: `$VARIABLE == "some value"` - > Example: `$VARIABLE != "some value"` _(added in 11.11)_ + > Example: `$VARIABLE != "some value"` (introduced in GitLab 11.11) You can use equality operator `==` or `!=` to compare a variable content to a string. We support both, double quotes and single quotes to define a string @@ -491,7 +493,7 @@ Below you can find supported syntax reference: > Example: `$VARIABLE == null` - > Example: `$VARIABLE != null` _(added in 11.11)_ + > Example: `$VARIABLE != null` (introduced in GitLab 11.11) It sometimes happens that you want to check whether a variable is defined or not. To do that, you can compare a variable to `null` keyword, like @@ -502,7 +504,7 @@ Below you can find supported syntax reference: > Example: `$VARIABLE == ""` - > Example: `$VARIABLE != ""` _(added in 11.11)_ + > Example: `$VARIABLE != ""` (introduced in GitLab 11.11) If you want to check whether a variable is defined, but is empty, you can simply compare it against an empty string, like `$VAR == ''` or non-empty @@ -512,7 +514,7 @@ Below you can find supported syntax reference: > Example: `$VARIABLE_1 == $VARIABLE_2` - > Example: `$VARIABLE_1 != $VARIABLE_2` _(added in 11.11)_ + > Example: `$VARIABLE_1 != $VARIABLE_2` (introduced in GitLab 11.11) It is possible to compare two variables. This is going to compare values of these variables. @@ -528,11 +530,11 @@ Below you can find supported syntax reference: `$STAGING` value needs to a string, with length higher than zero. Variable that contains only whitespace characters is not an empty variable. -1. Pattern matching _(added in 11.0)_ +1. Pattern matching (introduced in GitLab 11.0) > Example: `$VARIABLE =~ /^content.*/` - > Example: `$VARIABLE_1 !~ /^content.*/` _(added in 11.11)_ + > Example: `$VARIABLE_1 !~ /^content.*/` (introduced in GitLab 11.11) It is possible perform pattern matching against a variable and regular expression. Expression like this evaluates to truth if matches are found @@ -541,7 +543,7 @@ Below you can find supported syntax reference: Pattern matching is case-sensitive by default. Use `i` flag modifier, like `/pattern/i` to make a pattern case-insensitive. -1. Conjunction / Disjunction +1. Conjunction / Disjunction ([introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27925) in GitLab 12.0) > Example: `$VARIABLE1 =~ /^content.*/ && $VARIABLE2 == "something"` diff --git a/doc/development/architecture.md b/doc/development/architecture.md index a43a40152db..d14a760f972 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -141,13 +141,13 @@ Component statuses are linked to configuration documentation for each component. | [Consul](#consul) | Database node discovery, failover | [⚙][consul-omnibus] | [❌][consul-charts] | [❌][consul-charts] | [✅](../user/gitlab_com/index.md#consul) | ❌ | ❌ | EE Only | | [GitLab self-monitoring: Prometheus](#prometheus) | Time-series database, metrics collection, and query service | [✅][prometheus-omnibus] | [✅][prometheus-charts] | [⚙][prometheus-charts] | [✅](../user/gitlab_com/index.md#prometheus) | ❌ | ❌ | CE & EE | | [GitLab self-monitoring: Alertmanager](#alertmanager) | Deduplicates, groups, and routes alerts from Prometheus | [⚙][alertmanager-omnibus] | [✅][alertmanager-charts] | [⚙][alertmanager-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | -| [GitLab self-monitoring: Grafana](#grafana) | Metrics dashboard | [⚙][grafana-omnibus] | [⤓][grafana-charts] | [⤓][grafana-charts] | [✅](https://dashboards.gitlab.com/d/RZmbBr7mk/gitlab-triage?refresh=30s) | ❌ | ❌ | CE & EE | +| [GitLab self-monitoring: Grafana](#grafana) | Metrics dashboard | [✅][grafana-omnibus] | [⤓][grafana-charts] | [⤓][grafana-charts] | [✅](https://dashboards.gitlab.com/d/RZmbBr7mk/gitlab-triage?refresh=30s) | ❌ | ❌ | CE & EE | | [GitLab self-monitoring: Sentry](#sentry) | Track errors generated by the GitLab instance | [⤓][sentry-omnibus] | [❌][sentry-charts] | [❌][sentry-charts] | [✅](https://about.gitlab.com/handbook/support/workflows/services/gitlab_com/500_errors.html#searching-sentry) | [⤓][gitlab-yml] | [⤓][gitlab-yml] | CE & EE | | [GitLab self-monitoring: Jaeger](#jaeger) | View traces generated by the GitLab instance | [❌][jaeger-omnibus] | [❌][jaeger-charts] | [❌][jaeger-charts] | [❌](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/4104) | [⤓][jaeger-source] | [⚙][jaeger-gdk] | CE & EE | | [Redis Exporter](#redis-exporter) | Prometheus endpoint with Redis metrics | [✅][redis-exporter-omnibus] | [✅][redis-exporter-charts] | [✅][redis-exporter-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | | [Postgres Exporter](#postgres-exporter) | Prometheus endpoint with PostgreSQL metrics | [✅][postgres-exporter-omnibus] | [✅][postgres-exporter-charts] | [✅][postgres-exporter-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | | [PgBouncer Exporter](#pgbouncer-exporter) | Prometheus endpoint with PgBouncer metrics | [⚙][pgbouncer-exporter-omnibus] | [❌][pgbouncer-exporter-charts] | [❌][pgbouncer-exporter-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | -| [GitLab Monitor](#gitlab-monitor) | Generates a variety of GitLab metrics | [✅][gitlab-monitor-omnibus] | [❌][gitab-monitor-charts] | [❌][gitab-monitor-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | +| [GitLab Monitor](#gitlab-monitor) | Generates a variety of GitLab metrics | [✅][gitlab-monitor-omnibus] | [✅][gitab-monitor-charts] | [✅][gitab-monitor-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | | [Node Exporter](#node-exporter) | Prometheus endpoint with system metrics | [✅][node-exporter-omnibus] | [❌][node-exporter-charts] | [❌][node-exporter-charts] | [✅](https://about.gitlab.com/handbook/engineering/monitoring/) | ❌ | ❌ | CE & EE | | [Mattermost](#mattermost) | Open-source Slack alternative | [⚙][mattermost-omnibus] | [⤓][mattermost-charts] | [⤓][mattermost-charts] | [⤓](../user/project/integrations/mattermost.md) | ❌ | ❌ | CE & EE | | [MinIO](#minio) | Object storage service | [⤓][minio-omnibus] | [✅][minio-charts] | [✅][minio-charts] | [✅](https://about.gitlab.com/handbook/engineering/infrastructure/production-architecture/#storage-architecture) | ❌ | [⚙][minio-gdk] | CE & EE | @@ -681,7 +681,7 @@ We've also detailed [our architecture of GitLab.com](https://about.gitlab.com/ha [pgbouncer-exporter-omnibus]: ../administration/monitoring/prometheus/pgbouncer_exporter.md [pgbouncer-exporter-charts]: https://docs.gitlab.com/charts/installation/deployment.html#postgresql [gitlab-monitor-omnibus]: ../administration/monitoring/prometheus/gitlab_monitor_exporter.md -[gitab-monitor-charts]: https://gitlab.com/charts/gitlab/issues/319 +[gitab-monitor-charts]: https://docs.gitlab.com/charts/charts/gitlab/gitlab-monitor/index.html [node-exporter-omnibus]: ../administration/monitoring/prometheus/node_exporter.md [node-exporter-charts]: https://gitlab.com/charts/gitlab/issues/1332 [mattermost-omnibus]: https://docs.gitlab.com/omnibus/gitlab-mattermost/ diff --git a/doc/development/testing_guide/end_to_end/index.md b/doc/development/testing_guide/end_to_end/index.md index afd81ff00b2..527cd350633 100644 --- a/doc/development/testing_guide/end_to_end/index.md +++ b/doc/development/testing_guide/end_to_end/index.md @@ -126,6 +126,18 @@ See [Review Apps][review-apps] for more details about Review Apps. [helm-chart]: https://gitlab.com/charts/gitlab/ [cng]: https://gitlab.com/gitlab-org/build/CNG +## How do I run the tests? + +There are two main options for running the tests. If you simply want to run the +existing tests against a live GitLab instance or against a pre-built docker image +you can use the [GitLab QA orchestrator][gitlab-qa-readme]. See also [examples +of the test scenarios you can run via the orchestrator](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#examples). + +On the other hand, if you would like to run against a local development GitLab +environment, you can use the [GitLab Development Kit (GDK)](https://gitlab.com/gitlab-org/gitlab-development-kit/). +Please refer to the instructions in the [QA README](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/qa/README.md#how-can-i-use-it) +and the section below. + ## How do I write tests? In order to write new tests, you first need to learn more about GitLab QA diff --git a/doc/user/admin_area/settings/visibility_and_access_controls.md b/doc/user/admin_area/settings/visibility_and_access_controls.md index a1229484388..63879935fd8 100644 --- a/doc/user/admin_area/settings/visibility_and_access_controls.md +++ b/doc/user/admin_area/settings/visibility_and_access_controls.md @@ -4,12 +4,15 @@ type: reference # Visibility and access controls -GitLab allows admins to: +GitLab allows administrators to: - Control access and visibility to GitLab resources including branches and projects. - Select from which hosting sites code can be imported into GitLab. - Select the protocols permitted to access GitLab. - Enable or disable repository mirroring. +- Prevent non-administrators from deleting projects + ([introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/5615) in GitLab 12.0). + **[PREMIUM ONLY]** To access the visibility and access control options: diff --git a/doc/user/application_security/container_scanning/index.md b/doc/user/application_security/container_scanning/index.md index a24374dff1d..4a2fb1d7190 100644 --- a/doc/user/application_security/container_scanning/index.md +++ b/doc/user/application_security/container_scanning/index.md @@ -40,6 +40,9 @@ To enable Container Scanning in your pipeline, you need: [`kubernetes`](https://docs.gitlab.com/runner/install/kubernetes.html#running-privileged-containers-for-the-runners) executor running in privileged mode. If you're using the shared Runners on GitLab.com, this is enabled by default. +- Docker `18.09.03` or higher installed on the machine where the Runners are + running. If you're using the shared Runners on GitLab.com, this is already + the case. - To [build and push](../../../ci/docker/using_docker_build.md#container-registry-examples) your Docker image to your project's [Container Registry](../../project/container_registry.md). The name of the Docker image should match the following scheme: @@ -202,3 +205,20 @@ vulnerabilities in your groups and projects. Read more about the Once a vulnerability is found, you can interact with it. Read more on how to [interact with the vulnerabilities](../index.md#interacting-with-the-vulnerabilities). + +## Troubleshooting + +### docker: Error response from daemon: failed to copy xattrs + +When the GitLab Runner uses the Docker executor and NFS is used +(e.g., `/var/lib/docker` is on an NFS mount), Container Scanning might fail with +an error like the following: + +``` +docker: Error response from daemon: failed to copy xattrs: failed to set xattr "security.selinux" on /path/to/file: operation not supported. +``` + +This is a result of a bug in Docker which is now [fixed](https://github.com/containerd/continuity/pull/138 "fs: add WithAllowXAttrErrors CopyOpt"). +To prevent the error, ensure the Docker version that the Runner is using is +`18.09.03` or higher. For more information, see +[issue #10241](https://gitlab.com/gitlab-org/gitlab-ee/issues/10241 "Investigate why Container Scanning is not working with NFS mounts"). diff --git a/doc/user/application_security/dependency_scanning/index.md b/doc/user/application_security/dependency_scanning/index.md index 34d4507210e..a4e5b19bdc7 100644 --- a/doc/user/application_security/dependency_scanning/index.md +++ b/doc/user/application_security/dependency_scanning/index.md @@ -346,7 +346,7 @@ the report JSON unless stated otherwise. Presence of optional fields depends on | `vulnerabilities[].scanner` | A node that describes the analyzer used to find this vulnerability. | | `vulnerabilities[].scanner.id` | Id of the scanner as a snake_case string. | | `vulnerabilities[].scanner.name` | Name of the scanner, for display purposes. | -| `vulnerabilities[].location` | A node that tells where the vulnerability is located. | +| `vulnerabilities[].location` | A node that tells where the vulnerability is located. | | `vulnerabilities[].location.file` | Path to the dependencies file (e.g., `yarn.lock`). Optional. | | `vulnerabilities[].location.dependency` | A node that describes the dependency of a project where the vulnerability is located. | | `vulnerabilities[].location.dependency.package` | A node that provides the information on the package where the vulnerability is located. | @@ -379,17 +379,17 @@ Once a vulnerability is found, you can interact with it. Read more on how to ## Dependency List -> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/10075) -in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/10075) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0. -An additional benefit of Dependency Scanning is the ability to get a list of your project's dependencies with their versions. +An additional benefit of Dependency Scanning is the ability to get a list of your +project's dependencies with their versions. This list can be generated only for +[languages and package managers](#supported-languages-and-package-managers) +supported by Gemnasium. -This list can be generated only for [languages and package managers](#supported-languages-and-package-managers) supported by [Gemnasium](https://gitlab.com/gitlab-org/security-products/gemnasium/general). - -To see the generated dependency list, navigate to the Dependency List page under your project's left sidebar menu **Project > Dependency List**. +To see the generated dependency list, navigate to your project's **Project > Dependency List**. ## Contributing to the vulnerability database You can search the [gemnasium-db](https://gitlab.com/gitlab-org/security-products/gemnasium-db) project to find a vulnerability in the Gemnasium database. -You can also [submit new vulnerabilities](https://gitlab.com/gitlab-org/security-products/gemnasium-db/blob/master/CONTRIBUTING.md).
\ No newline at end of file +You can also [submit new vulnerabilities](https://gitlab.com/gitlab-org/security-products/gemnasium-db/blob/master/CONTRIBUTING.md). diff --git a/doc/user/application_security/license_management/img/license_management_add_license.png b/doc/user/application_security/license_management/img/license_management_add_license.png Binary files differnew file mode 100644 index 00000000000..1e1a698515b --- /dev/null +++ b/doc/user/application_security/license_management/img/license_management_add_license.png diff --git a/doc/user/application_security/license_management/img/license_management_search.png b/doc/user/application_security/license_management/img/license_management_search.png Binary files differnew file mode 100644 index 00000000000..7b6006cef9d --- /dev/null +++ b/doc/user/application_security/license_management/img/license_management_search.png diff --git a/doc/user/application_security/license_management/img/license_management_settings.png b/doc/user/application_security/license_management/img/license_management_settings.png Binary files differindex b5490e59074..1a2bfa78a03 100644 --- a/doc/user/application_security/license_management/img/license_management_settings.png +++ b/doc/user/application_security/license_management/img/license_management_settings.png diff --git a/doc/user/application_security/license_management/index.md b/doc/user/application_security/license_management/index.md index 7a583016586..957c4ede981 100644 --- a/doc/user/application_security/license_management/index.md +++ b/doc/user/application_security/license_management/index.md @@ -262,6 +262,8 @@ To approve or blacklist a license: navigate to the project's **Settings > CI/CD** and expand the **License Management** section. 1. Click the **Add a license** button. + + ![License Management Add License](img/license_management_add_license.png) 1. In the **License name** dropdown, either: - Select one of the available licenses. You can search for licenses in the field at the top of the list. @@ -270,8 +272,22 @@ To approve or blacklist a license: 1. Select the **Approve** or **Blacklist** radio button to approve or blacklist respectively the selected license. + + +To modify an existing license: + +1. In the **License Management** list, click the **Approved/Declined** dropdown to change it to the desired status. + ![License Management Settings](img/license_management_settings.png) +Searching for Licenses: + +1. Use the **Search** box to search for a specific license. + + ![License Management Search](img/license_management_search.png) + + + ## License Management report under pipelines > [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/5491) diff --git a/doc/user/group/index.md b/doc/user/group/index.md index abd95eddf63..4fde45da6c4 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -268,9 +268,10 @@ be unique. To change your group path: -1. Navigate to your group's **Settings > General**. -1. Enter a new name under **Group path**. -1. Click **Save group**. +1. Navigate to your group's **Settings > General** page. +1. Expand the **Path, transfer, remove** section. +1. Enter a new name under **Change group path**. +1. Click **Change group path**. CAUTION: **Caution:** It is currently not possible to rename a namespace if it contains a diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index a4d4fb91f71..a0fe97f2b9d 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -520,9 +520,7 @@ service account of the cluster integration. ### Troubleshooting failed deployment jobs GitLab will create a namespace and service account specifically for your -deployment jobs. On project level clusters, this happens when the cluster -is created. On group level clusters, resources are created immediately -before the deployment job starts. +deployment jobs. This happens immediately before the deployment job starts. However, sometimes GitLab can not create them. In such instances, your job will fail with the message: @@ -532,6 +530,14 @@ This job failed because the necessary resources were not successfully created. To find the cause of this error when creating a namespace and service account, check the [logs](../../../administration/logs.md#kuberneteslog). +NOTE: **NOTE:** +As of GitLab 12.1 we require [`cluster-admin`](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) +tokens for all project level clusters unless you unselect the +[GitLab-managed cluster](#gitlab-managed-clusters) option. If you +want to manage namespaces and service accounts yourself and don't +want to provide a `cluster-admin` token to GitLab you must unselect this +option or you will get the above error. + Common reasons for failure include: - The token you gave GitLab did not have [`cluster-admin`](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) diff --git a/doc/user/project/deploy_boards.md b/doc/user/project/deploy_boards.md index b7f6a855cb6..175384bc985 100644 --- a/doc/user/project/deploy_boards.md +++ b/doc/user/project/deploy_boards.md @@ -59,6 +59,8 @@ specific environment, there are lot of uses cases. To name a few: To display the Deploy Boards for a specific [environment] you should: +1. Have [defined an environment](../../ci/environments.md#defining-environments) with a deploy stage. + 1. Have a Kubernetes cluster up and running. NOTE: **Running on OpenShift:** @@ -86,7 +88,10 @@ To display the Deploy Boards for a specific [environment] you should: Kubernetes. NOTE: **Note:** - Matching based on the Kubernetes `app` label was removed in [GitLab 12.1](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14020) + Matching based on the Kubernetes `app` label was removed in [GitLab + 12.1](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14020). + To migrate, please apply the required annotations (see above) and + re-deploy your application. ![Deploy Boards Kubernetes Label](img/deploy_boards_kubernetes_label.png) diff --git a/doc/user/project/description_templates.md b/doc/user/project/description_templates.md index 05ad15476ab..ca59fe3cc7d 100644 --- a/doc/user/project/description_templates.md +++ b/doc/user/project/description_templates.md @@ -58,6 +58,7 @@ changes you made after picking the template and return it to its initial status. ## Setting a default template for issues and merge requests **[STARTER]** > **Notes:** +> > - This feature was introduced before [description templates](#overview) and is > available in [GitLab Starter][products]. It can be enabled > in the project's settings. @@ -65,7 +66,7 @@ changes you made after picking the template and return it to its initial status. > - Templates for merge requests were [introduced][ee-7478ece] in GitLab EE 6.9. The visibility of issues and/or merge requests should be set to either "Everyone -with access" or "Only team members" in your project's **Settings** otherwise the +with access" or "Only Project Members" in your project's **Settings** otherwise the template text areas won't show. This is the default behavior so in most cases you should be fine. diff --git a/doc/user/project/quick_actions.md b/doc/user/project/quick_actions.md index 1d640966013..6c430ff7cd9 100644 --- a/doc/user/project/quick_actions.md +++ b/doc/user/project/quick_actions.md @@ -35,7 +35,7 @@ discussions, and descriptions: | `/label ~label1 ~label2` | Add label(s). Label names can also start without ~ but mixed syntax is not supported. | ✓ | ✓ | | `/unlabel ~label1 ~label2` | Remove all or specific label(s)| ✓ | ✓ | | `/relabel ~label1 ~label2` | Replace label | ✓ | ✓ | -| <code>/copy_metadata #issue | !merge_request</code> | Copy labels and milestone from other issue or merge request in the project | ✓ | ✓ | +| <code>/copy_metadata <#issue | !merge_request></code> | Copy labels and milestone from other issue or merge request in the project | ✓ | ✓ | | <code>/estimate <1w 3d 2h 14m></code> | Set time estimate | ✓ | ✓ | | `/remove_estimate` | Remove time estimate | ✓ | ✓ | | <code>/spend <time(1h 30m | -1h 5m)> <date(YYYY-MM-DD)></code> | Add or subtract spent time; optionally, specify the date that time was spent on | ✓ | ✓ | @@ -44,14 +44,14 @@ discussions, and descriptions: | `/unlock` | Unlock the discussion | ✓ | ✓ | | <code>/due <in 2 days | this Friday | December 31st></code>| Set due date | ✓ | | | `/remove_due_date` | Remove due date | ✓ | | -| `/weight 0,1,2, ...` | Set weight **[STARTER]** | ✓ | | +| <code>/weight <0 | 1 | 2 | ...></code> | Set weight **[STARTER]** | ✓ | | | `/clear_weight` | Clears weight **[STARTER]** | ✓ | | -| `/epic <&epic | group&epic | Epic URL>` | Add to epic **[ULTIMATE]** | ✓ | | +| <code>/epic <&epic | group&epic | Epic URL></code> | Add to epic **[ULTIMATE]** | ✓ | | | `/remove_epic` | Removes from epic **[ULTIMATE]** | ✓ | | | `/promote` | Promote issue to epic **[ULTIMATE]** | ✓ | | | `/confidential` | Make confidential | ✓ | | -| `/duplicate #issue` | Mark this issue as a duplicate of another issue | ✓ | -| `/move path/to/project` | Move this issue to another project | ✓ | | +| `/duplicate <#issue>` | Mark this issue as a duplicate of another issue | ✓ | +| `/move <path/to/project>` | Move this issue to another project | ✓ | | | `/target_branch <Local branch Name>` | Set target branch | | ✓ | | `/wip` | Toggle the Work In Progress status | | ✓ | | `/approve` | Approve the merge request | | ✓ | @@ -85,3 +85,5 @@ The following quick actions are applicable for epics threads and description: | `/label ~label1 ~label2` | Add label(s) | | `/unlabel ~label1 ~label2` | Remove all or specific label(s) | | `/relabel ~label1 ~label2` | Replace label | +| <code>/child_epic <&epic | group&epic | Epic URL></code> | Adds child epic to epic ([introduced in GitLab 12.0](https://gitlab.com/gitlab-org/gitlab-ee/issues/7330)) | +| <code>/remove_child_epic <&epic | group&epic | Epic URL></code> | Removes child epic from epic ([introduced in GitLab 12.0](https://gitlab.com/gitlab-org/gitlab-ee/issues/7330)) | diff --git a/doc/user/project/web_ide/index.md b/doc/user/project/web_ide/index.md index ef4eb45de66..b2bf85335c5 100644 --- a/doc/user/project/web_ide/index.md +++ b/doc/user/project/web_ide/index.md @@ -67,8 +67,8 @@ shows you a preview of the merge request diff if you commit your changes. > [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19279) in [GitLab Core][ce] 11.0. -You can use the Web IDE to quickly fix failing tests by opening -the branch or merge request in the Web IDE and opening the logs of the failed +You can use the Web IDE to quickly fix failing tests by opening +the branch or merge request in the Web IDE and opening the logs of the failed job. You can access the status of all jobs for the most recent pipeline and job traces for the current commit by clicking the **Pipelines** button in the top right. @@ -80,8 +80,8 @@ left. > [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19318) in [GitLab Core][ce] 11.0. -To switch between your authored and assigned merge requests, click the -dropdown in the top of the sidebar to open a list of merge requests. You will +To switch between your authored and assigned merge requests, click the +dropdown in the top of the sidebar to open a list of merge requests. You will need to commit or discard all your changes before switching to a different merge request. @@ -89,9 +89,9 @@ request. > [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20850) in [GitLab Core][ce] 11.2. -To switch between branches of the current project repository, click the dropdown -in the top of the sidebar to open a list of branches. -You will need to commit or discard all your changes before switching to a +To switch between branches of the current project repository, click the dropdown +in the top of the sidebar to open a list of branches. +You will need to commit or discard all your changes before switching to a different branch. ## Client Side Evaluation @@ -117,7 +117,7 @@ GitLab.com ![Admin Client Side Evaluation setting](img/admin_clientside_evaluation.png) Once you have done that, you can preview projects with a `package.json` file and -a `main` entry point inside the Web IDE. An example `package.json` is shown +a `main` entry point inside the Web IDE. An example `package.json` is shown below. ```json @@ -135,24 +135,20 @@ below. CAUTION: **Warning:** Interactive Web Terminals for the Web IDE is currently in **Beta**. +Shared Runners [do not yet support Interactive Web Terminals](https://gitlab.com/gitlab-org/gitlab-ce/issues/52611), +so you would need to use your own private Runner(s) to make use of this feature. -[Interactive web terminals](../../../ci/interactive_web_terminal/index.md) -give the user access to a terminal to interact with the Runner directly from +[Interactive Web Terminals](../../../ci/interactive_web_terminal/index.md) +give the project [Maintainers](../../permissions.md#project-members-permissions) +user access to a terminal to interact with the Runner directly from GitLab, including through the Web IDE. -Only project [**maintainers**](../../permissions.md#project-members-permissions) -can run Interactive Web Terminals through the Web IDE. - -CAUTION: **Warning:** -GitLab.com [does not support Interactive Web Terminals yet](https://gitlab.com/gitlab-org/gitlab-ce/issues/52611). -Shared Runners in private instances are not supported either. - ### Runner configuration Some things need to be configured in the runner for the interactive web terminal to work: -- The Runner needs to have +- The Runner needs to have [`[session_server]` configured properly](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-session_server-section). - If you are using a reverse proxy with your GitLab instance, web terminals need to be [enabled](../../../administration/integration/terminal.md#enabling-and-disabling-terminal-support). **[ULTIMATE ONLY]** @@ -204,7 +200,7 @@ the selected branch of the Web IDE. If there is no configuration file in a branch, an error message will be shown. -### Running Interactive Terminals in the Web IDE +### Running interactive terminals in the Web IDE If Interactive Terminals are available for the current user, the **Terminal** button will be visible in the right sidebar of the Web IDE. Click this button to open @@ -212,7 +208,7 @@ or close the terminal tab. Once open, the tab will show the **Start Web Terminal** button. This button may be disabled if the environment is not configured correctly. If so, a status -message will describe the issue. Here are some reasons why **Start Web Terminal** +message will describe the issue. Here are some reasons why **Start Web Terminal** may be disabled: - `.gitlab/.gitlab-webide.yml` does not exist or is set up incorrectly. @@ -231,45 +227,27 @@ While the terminal is running, it can be stopped by clicking **Stop Terminal**. This will disconnect the terminal and stop the runner's terminal job. From here, click **Restart Terminal** to start a new terminal session. -### File Syncing to Web Terminal +### File syncing to web terminal > [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/5276) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0. -File changes in the Web IDE can be synced to a running Web Terminal. +File changes in the Web IDE can be synced to a running web terminal. This enables users to test their code changes in a preconfigured terminal environment. NOTE: **Note:** Only file changes in the Web IDE are synced to the terminal. Changes made in the terminal are **not** synced to the Web IDE. +This feature is only available for Kubernetes Runners. -Once you have [configured the Web Terminal for File Syncing](#configuring-file-syncing), -then when the Web terminal is started, a **Terminal** status will be visible -in the status bar. - -![Web IDE Client Side Evaluation](img/terminal_status.png) - -Changes made to your files via the Web IDE will sync to the running terminal -when: - -- <kbd>Ctrl</kbd> + <kbd>S</kbd> (or <kbd>Cmd</kbd> + <kbd>S</kbd> on Mac) - is pressed while editing a file. -- Anything outside the file editor is clicked after editing a file. -- A file or folder is created, deleted, or renamed. - -### Configuring File Syncing - -NOTE: **Note:** -This feature is only available for Kubernetes runners. - -To enable file syncing to the Web Terminal, the `.gitlab/.gitlab-webide.yml` -file needs to have a `webide-file-sync` service configured. Here is an example +To enable file syncing to the web terminal, the `.gitlab/.gitlab-webide.yml` +file needs to have a `webide-file-sync` service configured. Here is an example configuration for a Node JS project which uses this service: ```yaml terminal: # This can be any image that has the necessary runtime environment for your project. - image: + image: name: node:10-alpine services: - name: registry.gitlab.com/gitlab-org/webide-file-sync:latest @@ -281,18 +259,30 @@ terminal: - number: 3000 ``` -> **Notes:** -> - For now, the `webide-file-sync` executable must start **after** the project -> directory is available. This is why we need to add `sleep 5` to the `command`. -> See [this issue](https://gitlab.com/gitlab-org/webide-file-sync/issues/7) for -> more info. -> - `$CI_PROJECT_DIR` is a -> [predefined environment variable](../../../ci/variables/predefined_variables.md) -> for GitLab Runners. This is where your project's repository will be. +- The `webide-file-sync` executable must start **after** the project + directory is available. This is why we need to add `sleep 5` to the `command`. + See [this issue](https://gitlab.com/gitlab-org/webide-file-sync/issues/7) for + more info. +- `$CI_PROJECT_DIR` is a + [predefined environment variable](../../../ci/variables/predefined_variables.md) + for GitLab Runners. This is where your project's repository will be. + +Once you have configured the web terminal for file syncing, then when the web +terminal is started, a **Terminal** status will be visible in the status bar. + +![Web IDE Client Side Evaluation](img/terminal_status.png) + +Changes made to your files via the Web IDE will sync to the running terminal +when: + +- <kbd>Ctrl</kbd> + <kbd>S</kbd> (or <kbd>Cmd</kbd> + <kbd>S</kbd> on Mac) + is pressed while editing a file. +- Anything outside the file editor is clicked after editing a file. +- A file or folder is created, deleted, or renamed. ### Limitations -Interactive Terminals is in a beta phase and will continue to be improved upon in upcoming +Interactive Terminals is in a beta phase and will continue to be improved upon in upcoming releases. In the meantime, please note that the user is limited to having only one active terminal at a time. diff --git a/lib/api/pages_domains.rb b/lib/api/pages_domains.rb index 78442f465bd..4227a106a95 100644 --- a/lib/api/pages_domains.rb +++ b/lib/api/pages_domains.rb @@ -90,14 +90,15 @@ module API end params do requires :domain, type: String, desc: 'The domain' - optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate' - optional :key, allow_blank: false, types: [File, String], desc: 'The key' - all_or_none_of :certificate, :key + optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate', as: :user_provided_certificate + optional :key, allow_blank: false, types: [File, String], desc: 'The key', as: :user_provided_key + all_or_none_of :user_provided_certificate, :user_provided_key end post ":id/pages/domains" do authorize! :update_pages, user_project pages_domain_params = declared(params, include_parent_namespaces: false) + pages_domain = user_project.pages_domains.create(pages_domain_params) if pages_domain.persisted? @@ -110,8 +111,8 @@ module API desc 'Updates a pages domain' params do requires :domain, type: String, desc: 'The domain' - optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate' - optional :key, allow_blank: false, types: [File, String], desc: 'The key' + optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate', as: :user_provided_certificate + optional :key, allow_blank: false, types: [File, String], desc: 'The key', as: :user_provided_key end put ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do authorize! :update_pages, user_project @@ -119,8 +120,8 @@ module API pages_domain_params = declared(params, include_parent_namespaces: false) # Remove empty private key if certificate is not empty. - if pages_domain_params[:certificate] && !pages_domain_params[:key] - pages_domain_params.delete(:key) + if pages_domain_params[:user_provided_certificate] && !pages_domain_params[:user_provided_key] + pages_domain_params.delete(:user_provided_key) end if pages_domain.update(pages_domain_params) diff --git a/lib/banzai/filter/relative_link_filter.rb b/lib/banzai/filter/relative_link_filter.rb index 199b3533cf4..80c84c0f622 100644 --- a/lib/banzai/filter/relative_link_filter.rb +++ b/lib/banzai/filter/relative_link_filter.rb @@ -17,6 +17,8 @@ module Banzai include Gitlab::Utils::StrongMemoize def call + return doc if context[:system_note] + @uri_types = {} clear_memoization(:linkable_files) diff --git a/lib/gitaly/server.rb b/lib/gitaly/server.rb index 7b238623418..907c6e1b605 100644 --- a/lib/gitaly/server.rb +++ b/lib/gitaly/server.rb @@ -2,8 +2,18 @@ module Gitaly class Server - def self.all - Gitlab.config.repositories.storages.keys.map { |s| Gitaly::Server.new(s) } + class << self + def all + Gitlab.config.repositories.storages.keys.map { |s| Gitaly::Server.new(s) } + end + + def count + all.size + end + + def filesystems + all.map(&:filesystem_type).compact.uniq + end end attr_reader :storage @@ -36,6 +46,10 @@ module Gitaly storage_status&.writeable end + def filesystem_type + storage_status&.fs_type + end + def address Gitlab::GitalyClient.address(@storage) rescue RuntimeError => e diff --git a/lib/gitlab.rb b/lib/gitlab.rb index ccaf06c5d6a..fd4bbd69468 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_dependency 'gitlab/popen' +require_dependency File.expand_path('gitlab/popen', __dir__) module Gitlab def self.root @@ -60,11 +60,15 @@ module Gitlab end def self.ee? - if ENV['IS_GITLAB_EE'].present? - Gitlab::Utils.to_boolean(ENV['IS_GITLAB_EE']) - else - Object.const_defined?(:License) - end + @is_ee ||= + if ENV['IS_GITLAB_EE'].present? + Gitlab::Utils.to_boolean(ENV['IS_GITLAB_EE']) + else + # We may use this method when the Rails environment is not loaded. This + # means that checking the presence of the License class could result in + # this method returning `false`, even for an EE installation. + root.join('ee/app/models/license.rb').exist? + end end def self.http_proxy_env? diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb index c9f0ed66a54..8047ef4fa15 100644 --- a/lib/gitlab/bitbucket_import/importer.rb +++ b/lib/gitlab/bitbucket_import/importer.rb @@ -11,6 +11,7 @@ module Gitlab { title: 'task', color: '#7F8C8D' }].freeze attr_reader :project, :client, :errors, :users + attr_accessor :logger def initialize(project) @project = project @@ -19,6 +20,7 @@ module Gitlab @labels = {} @errors = [] @users = {} + @logger = Gitlab::Import::Logger.build end def execute @@ -41,6 +43,18 @@ module Gitlab }.to_json) end + def store_pull_request_error(pull_request, ex) + backtrace = Gitlab::Profiler.clean_backtrace(ex.backtrace) + error = { type: :pull_request, iid: pull_request.iid, errors: ex.message, trace: backtrace, raw_response: pull_request.raw } + + log_error(error) + # Omit the details from the database to avoid blowing up usage in the error column + error.delete(:trace) + error.delete(:raw_response) + + errors << error + end + def gitlab_user_id(project, username) find_user_id(username) || project.creator_id end @@ -176,7 +190,7 @@ module Gitlab import_pull_request_comments(pull_request, merge_request) if merge_request.persisted? rescue StandardError => e - errors << { type: :pull_request, iid: pull_request.iid, errors: e.message, trace: e.backtrace.join("\n"), raw_response: pull_request.raw } + store_pull_request_error(pull_request, e) end end @@ -254,6 +268,18 @@ module Gitlab updated_at: comment.updated_at } end + + def log_error(details) + logger.error(log_base_data.merge(details)) + end + + def log_base_data + { + class: self.class.name, + project_id: project.id, + project_path: project.full_path + } + end end end end diff --git a/lib/gitlab/ci/ansi2html.rb b/lib/gitlab/ci/ansi2html.rb index fc3223e7442..55411b5a8c4 100644 --- a/lib/gitlab/ci/ansi2html.rb +++ b/lib/gitlab/ci/ansi2html.rb @@ -200,7 +200,9 @@ module Gitlab css_classes = %w[section line] + sections.map { |section| "s_#{section}" } end - write_in_tag %{<br/>} + ensure_open_new_tag + write_raw %{<br/>} + close_open_tags write_raw %{<span class="#{css_classes.join(' ')}"></span>} if css_classes.any? @lineno_in_section += 1 open_new_tag diff --git a/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb b/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb index 531c9ce4256..e6e0aaab60b 100644 --- a/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb +++ b/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb @@ -8,7 +8,6 @@ module Gitlab def unmet? deployment_cluster.present? && deployment_cluster.managed? && - !deployment_cluster.project_type? && (kubernetes_namespace.new_record? || kubernetes_namespace.service_account_token.blank?) end diff --git a/lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb b/lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb index eb32dffc454..e4cf360a1c1 100644 --- a/lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb +++ b/lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb @@ -34,7 +34,7 @@ module Gitlab end def self.eager_matching_with_escape_characters? - Feature.enabled?(:ci_variables_complex_expressions) + Feature.enabled?(:ci_variables_complex_expressions, default_enabled: true) end end end diff --git a/lib/gitlab/ci/pipeline/expression/lexer.rb b/lib/gitlab/ci/pipeline/expression/lexer.rb index 23aa1ca4a36..22c210ae26b 100644 --- a/lib/gitlab/ci/pipeline/expression/lexer.rb +++ b/lib/gitlab/ci/pipeline/expression/lexer.rb @@ -73,7 +73,7 @@ module Gitlab end def available_lexemes - Feature.enabled?(:ci_variables_complex_expressions) ? NEW_LEXEMES : LEXEMES + Feature.enabled?(:ci_variables_complex_expressions, default_enabled: true) ? NEW_LEXEMES : LEXEMES end end end diff --git a/lib/gitlab/ci/pipeline/expression/parser.rb b/lib/gitlab/ci/pipeline/expression/parser.rb index 0679ed329e5..589bf32a4d7 100644 --- a/lib/gitlab/ci/pipeline/expression/parser.rb +++ b/lib/gitlab/ci/pipeline/expression/parser.rb @@ -13,7 +13,7 @@ module Gitlab end def tree - if Feature.enabled?(:ci_variables_complex_expressions) + if Feature.enabled?(:ci_variables_complex_expressions, default_enabled: true) rpn_parse_tree else reverse_descent_parse_tree diff --git a/lib/gitlab/json_cache.rb b/lib/gitlab/json_cache.rb index 9a0b2b35112..d01183d7845 100644 --- a/lib/gitlab/json_cache.rb +++ b/lib/gitlab/json_cache.rb @@ -22,10 +22,10 @@ module Gitlab expanded_cache_key = [namespace, key].compact if cache_key_with_version - expanded_cache_key << Rails.version + expanded_cache_key << [Gitlab::VERSION, Rails.version] end - expanded_cache_key.join(':') + expanded_cache_key.flatten.join(':').freeze end def expire(key) diff --git a/lib/gitlab/kubernetes.rb b/lib/gitlab/kubernetes.rb index 1103a4eed1d..22bd00751bc 100644 --- a/lib/gitlab/kubernetes.rb +++ b/lib/gitlab/kubernetes.rb @@ -43,6 +43,14 @@ module Gitlab }) end + def filter_by_legacy_label(items, app, env) + legacy_items = filter_by_label(items, { app: env }) + + non_legacy_items = filter_by_project_environment(legacy_items, app, env) + + legacy_items - non_legacy_items + end + # Converts a pod (as returned by the kubernetes API) into a terminal def terminals_for_pod(api_url, namespace, pod) metadata = pod.fetch("metadata", {}) diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 9aa2e972adf..0180fe7fa71 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -136,8 +136,9 @@ module Gitlab def components_usage_data { - gitlab_pages: { enabled: Gitlab.config.pages.enabled, version: Gitlab::Pages::VERSION }, git: { version: Gitlab::Git.version }, + gitaly: { version: Gitaly::Server.all.first.server_version, servers: Gitaly::Server.count, filesystems: Gitaly::Server.filesystems }, + gitlab_pages: { enabled: Gitlab.config.pages.enabled, version: Gitlab::Pages::VERSION }, database: { adapter: Gitlab::Database.adapter_name, version: Gitlab::Database.version } } end diff --git a/lib/system_check/ldap_check.rb b/lib/system_check/ldap_check.rb index 619fb3cccb8..938026424ed 100644 --- a/lib/system_check/ldap_check.rb +++ b/lib/system_check/ldap_check.rb @@ -33,8 +33,13 @@ module SystemCheck $stdout.puts "LDAP users with access to your GitLab server (only showing the first #{limit} results)" users = adapter.users(adapter.config.uid, '*', limit) - users.each do |user| - $stdout.puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}" + + if should_sanitize? + $stdout.puts "\tUser output sanitized. Found #{users.length} users of #{limit} limit." + else + users.each do |user| + $stdout.puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}" + end end end rescue Net::LDAP::ConnectionRefusedError, Errno::ECONNREFUSED => e diff --git a/locale/gitlab.pot b/locale/gitlab.pot index e89b1e754f2..b04cb999dc3 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -2849,10 +2849,13 @@ msgstr "" msgid "ContainerRegistry|Once you log in, you’re free to create and upload a container image using the common %{build} and %{push} commands" msgstr "" -msgid "ContainerRegistry|Remove repository" +msgid "ContainerRegistry|Remove image" msgstr "" -msgid "ContainerRegistry|Remove tag" +msgid "ContainerRegistry|Remove image and tags" +msgstr "" + +msgid "ContainerRegistry|Remove repository" msgstr "" msgid "ContainerRegistry|Size" @@ -2870,6 +2873,12 @@ msgstr "" msgid "ContainerRegistry|With the Docker Container Registry integrated into GitLab, every project can have its own space to store its Docker images." msgstr "" +msgid "ContainerRegistry|You are about to delete the image <b>%{title}</b>. This will delete the image and all tags pointing to this image." +msgstr "" + +msgid "ContainerRegistry|You are about to remove repository <b>%{title}</b>. Once you confirm, this repository will be permanently deleted." +msgstr "" + msgid "ContainerRegistry|You can also use a %{deploy_token} for read-only access to the registry images." msgstr "" @@ -4408,9 +4417,6 @@ msgstr "" msgid "February" msgstr "" -msgid "Fields on this page are now uneditable, you can configure" -msgstr "" - msgid "File" msgid_plural "Files" msgstr[0] "" @@ -5645,7 +5651,7 @@ msgstr "" msgid "Kubernetes error: %{error_code}" msgstr "" -msgid "Kubernetes service integration has been deprecated. %{deprecated_message_content} your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page" +msgid "Kubernetes service integration has been disabled. Fields on this page are not used by GitLab, you can configure your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page" msgstr "" msgid "LFS" @@ -6937,13 +6943,13 @@ msgstr "" msgid "Pagination|Last »" msgstr "" -msgid "Pagination|Next" +msgid "Pagination|Next ›" msgstr "" -msgid "Pagination|Prev" +msgid "Pagination|« First" msgstr "" -msgid "Pagination|« First" +msgid "Pagination|‹ Prev" msgstr "" msgid "Parameter" @@ -7330,6 +7336,9 @@ msgstr "" msgid "Please wait while we import the repository for you. Refresh at will." msgstr "" +msgid "Pre-release" +msgstr "" + msgid "Preferences" msgstr "" @@ -9945,9 +9954,6 @@ msgstr "" msgid "The X509 Certificate to use when mutual TLS is required to communicate with the external authorization service. If left blank, the server certificate is still validated when accessing over HTTPS." msgstr "" -msgid "The certificate will be shown here once it has been obtained from Let's Encrypt. This process may take up to an hour to complete." -msgstr "" - msgid "The character highlighter helps you keep the subject line to %{titleLength} characters and wrap the body at %{bodyLength} so they are readable in git." msgstr "" @@ -10002,7 +10008,7 @@ msgstr "" msgid "The import will time out after %{timeout}. For repositories that take longer, use a clone/push combination." msgstr "" -msgid "The instance-level Kubernetes service integration is deprecated. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>." +msgid "The instance-level Kubernetes service integration is disabled. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>." msgstr "" msgid "The invitation could not be accepted." @@ -10281,9 +10287,6 @@ msgstr "" msgid "This branch has changed since you started editing. Would you like to create a new branch?" msgstr "" -msgid "This certificate is automatically managed by Let's Encrypt" -msgstr "" - msgid "This commit is part of merge request %{link_to_merge_request}. Comments created here will be created in the context of that merge request." msgstr "" diff --git a/package.json b/package.json index 38b07610296..54998cc81dd 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,7 @@ "nodemon": "^1.18.9", "pixelmatch": "^4.0.2", "postcss": "^7.0.14", - "prettier": "1.16.4", + "prettier": "1.18.2", "stylelint": "^9.10.1", "stylelint-config-recommended": "^2.1.0", "stylelint-scss": "^3.5.4", diff --git a/qa/README.md b/qa/README.md index ef6f202464d..124a79a36b4 100644 --- a/qa/README.md +++ b/qa/README.md @@ -34,8 +34,23 @@ using `package-and-qa` manual action, to test if everything works fine. ## How can I use it? -You can use GitLab QA to exercise tests on any live instance! For example, the -following call would login to a local [GDK] instance and run all specs in +You can use GitLab QA to exercise tests on any live instance! If you don't +have an instance available you can follow the instructions below to use +the [GitLab Development Kit (GDK)][GDK]. +This is the recommended option if you would like to contribute to the tests. + +### Run the end-to-end tests in a local development environment + +Follow the GDK instructions to [prepare](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/prepare.md) +and [install](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/set-up-gdk.md) +your local GitLab development environment. + +Once you have GDK running, switch to the `qa` directory. E.g., if you setup +GDK to develop in the main `gitlab-ce` repo, the GitLab source code will be +in a `gitlab` directory and so the end-to-end test code will be in `gitlab/qa`. + +From there you can run the tests. For example, the +following call would login to the GDK instance and run all specs in `qa/specs/features`: ``` diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index c7f814c58c0..5ad5f9cdeea 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -120,7 +120,9 @@ describe Admin::ApplicationSettingsController do describe 'verify panel actions' do shared_examples 'renders correct panels' do it 'renders correct action on error' do - allow_any_instance_of(ApplicationSettings::UpdateService).to receive(:execute).and_return(false) + expect_next_instance_of(ApplicationSettings::UpdateService) do |service| + allow(service).to receive(:execute).and_return(false) + end patch action, params: { application_setting: { unused_param: true } } @@ -128,7 +130,10 @@ describe Admin::ApplicationSettingsController do end it 'redirects to same panel on success' do - allow_any_instance_of(ApplicationSettings::UpdateService).to receive(:execute).and_return(true) + expect_next_instance_of(ApplicationSettings::UpdateService) do |service| + allow(service).to receive(:execute).and_return(true) + end + referer_path = public_send("#{action}_admin_application_settings_path") request.env["HTTP_REFERER"] = referer_path diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb index fa49438287f..35cbab57037 100644 --- a/spec/controllers/projects/clusters_controller_spec.rb +++ b/spec/controllers/projects/clusters_controller_spec.rb @@ -340,7 +340,6 @@ describe Projects::ClustersController do describe 'security' do before do - allow(ClusterConfigureWorker).to receive(:perform_async) stub_kubeclient_get_namespace('https://kubernetes.example.com', namespace: 'my-namespace') end @@ -438,7 +437,6 @@ describe Projects::ClustersController do end before do - allow(ClusterConfigureWorker).to receive(:perform_async) stub_kubeclient_get_namespace('https://kubernetes.example.com', namespace: 'my-namespace') end diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 32607fc5f56..f82e3c8c7dc 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -320,6 +320,90 @@ describe Projects::IssuesController do end end + describe 'PUT #reorder' do + let(:group) { create(:group, projects: [project]) } + let!(:issue1) { create(:issue, project: project, relative_position: 10) } + let!(:issue2) { create(:issue, project: project, relative_position: 20) } + let!(:issue3) { create(:issue, project: project, relative_position: 30) } + + before do + sign_in(user) + end + + context 'when user has access' do + before do + project.add_developer(user) + end + + context 'with valid params' do + it 'reorders issues and returns a successful 200 response' do + reorder_issue(issue1, + move_after_id: issue2.id, + move_before_id: issue3.id, + group_full_path: group.full_path) + + [issue1, issue2, issue3].map(&:reload) + + expect(response).to have_gitlab_http_status(200) + expect(issue1.relative_position) + .to be_between(issue2.relative_position, issue3.relative_position) + end + end + + context 'with invalid params' do + it 'returns a unprocessable entity 422 response for invalid move ids' do + reorder_issue(issue1, move_after_id: 99, move_before_id: 999) + + expect(response).to have_gitlab_http_status(422) + end + + it 'returns a not found 404 response for invalid issue id' do + reorder_issue(object_double(issue1, iid: 999), + move_after_id: issue2.id, + move_before_id: issue3.id) + + expect(response).to have_gitlab_http_status(404) + end + + it 'returns a unprocessable entity 422 response for issues not in group' do + another_group = create(:group) + + reorder_issue(issue1, + move_after_id: issue2.id, + move_before_id: issue3.id, + group_full_path: another_group.full_path) + + expect(response).to have_gitlab_http_status(422) + end + end + end + + context 'with unauthorized user' do + before do + project.add_guest(user) + end + + it 'responds with 404' do + reorder_issue(issue1, move_after_id: issue2.id, move_before_id: issue3.id) + + expect(response).to have_gitlab_http_status(:not_found) + end + end + + def reorder_issue(issue, move_after_id: nil, move_before_id: nil, group_full_path: nil) + put :reorder, + params: { + namespace_id: project.namespace.to_param, + project_id: project, + id: issue.iid, + move_after_id: move_after_id, + move_before_id: move_before_id, + group_full_path: group_full_path + }, + format: :json + end + end + describe 'PUT #update' do subject do put :update, diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 34cbf0c8723..0eca663a683 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -1001,6 +1001,8 @@ describe Projects::MergeRequestsController do before do project.add_developer(user) sign_in(user) + + expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original end it 'returns 200' do diff --git a/spec/controllers/projects/pages_domains_controller_spec.rb b/spec/controllers/projects/pages_domains_controller_spec.rb index ff3afd51cd8..032f4f1418f 100644 --- a/spec/controllers/projects/pages_domains_controller_spec.rb +++ b/spec/controllers/projects/pages_domains_controller_spec.rb @@ -15,7 +15,10 @@ describe Projects::PagesDomainsController do end let(:pages_domain_params) do - build(:pages_domain, domain: 'my.otherdomain.com').slice(:key, :certificate, :domain) + attributes_for(:pages_domain, domain: 'my.otherdomain.com').slice(:key, :certificate, :domain).tap do |params| + params[:user_provided_key] = params.delete(:key) + params[:user_provided_certificate] = params.delete(:certificate) + end end before do @@ -84,48 +87,59 @@ describe Projects::PagesDomainsController do controller.instance_variable_set(:@domain, pages_domain) end - let(:pages_domain_params) do - attributes_for(:pages_domain).slice(:key, :certificate) - end - let(:params) do request_params.merge(id: pages_domain.domain, pages_domain: pages_domain_params) end - it 'updates the domain' do - expect(pages_domain) - .to receive(:update) - .with(ActionController::Parameters.new(pages_domain_params).permit!) - .and_return(true) + context 'with valid params' do + let(:pages_domain_params) do + attributes_for(:pages_domain, :with_trusted_chain).slice(:key, :certificate).tap do |params| + params[:user_provided_key] = params.delete(:key) + params[:user_provided_certificate] = params.delete(:certificate) + end + end + + it 'updates the domain' do + expect do + patch(:update, params: params) + end.to change { pages_domain.reload.certificate }.to(pages_domain_params[:user_provided_certificate]) + end + + it 'redirects to the project page' do + patch(:update, params: params) - patch(:update, params: params) + expect(flash[:notice]).to eq 'Domain was updated' + expect(response).to redirect_to(project_pages_path(project)) + end end - it 'redirects to the project page' do - patch(:update, params: params) + context 'with key parameter' do + before do + pages_domain.update!(key: nil, certificate: nil, certificate_source: 'gitlab_provided') + end - expect(flash[:notice]).to eq 'Domain was updated' - expect(response).to redirect_to(project_pages_path(project)) + it 'marks certificate as provided by user' do + expect do + patch(:update, params: params) + end.to change { pages_domain.reload.certificate_source }.from('gitlab_provided').to('user_provided') + end end context 'the domain is invalid' do - it 'renders the edit action' do - allow(pages_domain).to receive(:update).and_return(false) + let(:pages_domain_params) { { user_provided_certificate: 'blabla' } } + it 'renders the edit action' do patch(:update, params: params) expect(response).to render_template('edit') end end - context 'the parameters include the domain' do - it 'renders 400 Bad Request' do - expect(pages_domain) - .to receive(:update) - .with(hash_not_including(:domain)) - .and_return(true) - - patch(:update, params: params.deep_merge(pages_domain: { domain: 'abc' })) + context 'when parameters include the domain' do + it 'does not update domain' do + expect do + patch(:update, params: params.deep_merge(pages_domain: { domain: 'abc' })) + end.not_to change { pages_domain.reload.domain } end end end diff --git a/spec/factories/pages_domains.rb b/spec/factories/pages_domains.rb index db8384877b0..8da19a37a6a 100644 --- a/spec/factories/pages_domains.rb +++ b/spec/factories/pages_domains.rb @@ -180,5 +180,9 @@ Iy6oRpHaCF/2obZdIdgf9rlyz0fkqyHJc9GkioSoOhJZxEV2SgAkap8yS0sX2tJ9 ZDXgrA== -----END CERTIFICATE-----' end + + trait :letsencrypt do + certificate_source { :gitlab_provided } + end end end diff --git a/spec/fast_spec_helper.rb b/spec/fast_spec_helper.rb index 0b5ab16ad71..91ef7653822 100644 --- a/spec/fast_spec_helper.rb +++ b/spec/fast_spec_helper.rb @@ -3,6 +3,7 @@ require 'bundler/setup' ENV['GITLAB_ENV'] = 'test' ENV['IN_MEMORY_APPLICATION_SETTINGS'] = 'true' +require 'active_support/dependencies' require_relative '../config/settings' require_relative 'support/rspec' require 'active_support/all' diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb index 29545779a34..dafec29dfcc 100644 --- a/spec/features/admin/admin_users_spec.rb +++ b/spec/features/admin/admin_users_spec.rb @@ -419,6 +419,32 @@ describe "Admin::Users" do end end end + + describe 'Email verification status' do + let!(:secondary_email) do + create :email, email: 'secondary@example.com', user: user + end + + it 'displays the correct status for an unverified email address' do + user.update(confirmed_at: nil, unconfirmed_email: user.email) + visit admin_user_path(user) + + expect(page).to have_content("#{user.email} Unverified") + + expect(page).to have_content("#{secondary_email.email} Unverified") + end + + it 'displays the correct status for a verified email address' do + visit admin_user_path(user) + expect(page).to have_content("#{user.email} Verified") + + secondary_email.confirm + expect(secondary_email.confirmed?).to be_truthy + + visit admin_user_path(user) + expect(page).to have_content("#{secondary_email.email} Verified") + end + end end describe "GET /admin/users/:id/edit" do diff --git a/spec/features/container_registry_spec.rb b/spec/features/container_registry_spec.rb index 6f9901815e1..21d97aba0c5 100644 --- a/spec/features/container_registry_spec.rb +++ b/spec/features/container_registry_spec.rb @@ -42,6 +42,8 @@ describe "Container Registry", :js do .to receive(:delete_tags!).and_return(true) click_on(class: 'js-remove-repo') + expect(find('.modal .modal-title')).to have_content 'Remove repository' + find('.modal .modal-footer .btn-danger').click end it 'user removes a specific tag from container repository' do @@ -54,6 +56,8 @@ describe "Container Registry", :js do .to receive(:delete).and_return(true) click_on(class: 'js-delete-registry') + expect(find('.modal .modal-title')).to have_content 'Remove image' + find('.modal .modal-footer .btn-danger').click end end diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb index e4a3a1a8c92..974e0f84681 100644 --- a/spec/features/projects/clusters/gcp_spec.rb +++ b/spec/features/projects/clusters/gcp_spec.rb @@ -118,7 +118,6 @@ describe 'Gcp Cluster', :js do context 'when user changes cluster parameters' do before do - allow(ClusterConfigureWorker).to receive(:perform_async) fill_in 'cluster_platform_kubernetes_attributes_namespace', with: 'my-namespace' page.within('#js-cluster-details') { click_button 'Save changes' } end diff --git a/spec/features/projects/pages_lets_encrypt_spec.rb b/spec/features/projects/pages_lets_encrypt_spec.rb index baa217cbe58..a5f8702302c 100644 --- a/spec/features/projects/pages_lets_encrypt_spec.rb +++ b/spec/features/projects/pages_lets_encrypt_spec.rb @@ -2,124 +2,119 @@ require 'spec_helper' describe "Pages with Let's Encrypt", :https_pages_enabled do + include LetsEncryptHelpers + let(:project) { create(:project) } let(:user) { create(:user) } let(:role) { :maintainer } - let(:certificate_pem) do - <<~PEM - -----BEGIN CERTIFICATE----- - MIICGzCCAYSgAwIBAgIBATANBgkqhkiG9w0BAQUFADAbMRkwFwYDVQQDExB0ZXN0 - LWNlcnRpZmljYXRlMB4XDTE2MDIxMjE0MzIwMFoXDTIwMDQxMjE0MzIwMFowGzEZ - MBcGA1UEAxMQdGVzdC1jZXJ0aWZpY2F0ZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw - gYkCgYEApL4J9L0ZxFJ1hI1LPIflAlAGvm6ZEvoT4qKU5Xf2JgU7/2geNR1qlNFa - SvCc08Knupp5yTgmvyK/Xi09U0N82vvp4Zvr/diSc4A/RA6Mta6egLySNT438kdT - nY2tR5feoTLwQpX0t4IMlwGQGT5h6Of2fKmDxzuwuyffcIHqLdsCAwEAAaNvMG0w - DAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUxl9WSxBprB0z0ibJs3rXEk0+95AwCwYD - VR0PBAQDAgXgMBEGCWCGSAGG+EIBAQQEAwIGQDAeBglghkgBhvhCAQ0EERYPeGNh - IGNlcnRpZmljYXRlMA0GCSqGSIb3DQEBBQUAA4GBAGC4T8SlFHK0yPSa+idGLQFQ - joZp2JHYvNlTPkRJ/J4TcXxBTJmArcQgTIuNoBtC+0A/SwdK4MfTCUY4vNWNdese - 5A4K65Nb7Oh1AdQieTBHNXXCdyFsva9/ScfQGEl7p55a52jOPs0StPd7g64uvjlg - YHi2yesCrOvVXt+lgPTd - -----END CERTIFICATE----- - PEM - end + let(:certificate_pem) { attributes_for(:pages_domain)[:certificate] } - let(:certificate_key) do - <<~KEY - -----BEGIN PRIVATE KEY----- - MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKS+CfS9GcRSdYSN - SzyH5QJQBr5umRL6E+KilOV39iYFO/9oHjUdapTRWkrwnNPCp7qaeck4Jr8iv14t - PVNDfNr76eGb6/3YknOAP0QOjLWunoC8kjU+N/JHU52NrUeX3qEy8EKV9LeCDJcB - kBk+Yejn9nypg8c7sLsn33CB6i3bAgMBAAECgYA2D26w80T7WZvazYr86BNMePpd - j2mIAqx32KZHzt/lhh40J/SRtX9+Kl0Y7nBoRR5Ja9u/HkAIxNxLiUjwg9r6cpg/ - uITEF5nMt7lAk391BuI+7VOZZGbJDsq2ulPd6lO+C8Kq/PI/e4kXcIjeH6KwQsuR - 5vrXfBZ3sQfflaiN4QJBANBt8JY2LIGQF8o89qwUpRL5vbnKQ4IzZ5+TOl4RLR7O - AQpJ81tGuINghO7aunctb6rrcKJrxmEH1whzComybrMCQQDKV49nOBudRBAIgG4K - EnLzsRKISUHMZSJiYTYnablof8cKw1JaQduw7zgrUlLwnroSaAGX88+Jw1f5n2Lh - Vlg5AkBDdUGnrDLtYBCDEQYZHblrkc7ZAeCllDOWjxUV+uMqlCv8A4Ey6omvY57C - m6I8DkWVAQx8VPtozhvHjUw80rZHAkB55HWHAM3h13axKG0htCt7klhPsZHpx6MH - EPjGlXIT+aW2XiPmK3ZlCDcWIenE+lmtbOpI159Wpk8BGXs/s/xBAkEAlAY3ymgx - 63BDJEwvOb2IaP8lDDxNsXx9XJNVvQbv5n15vNsLHbjslHfAhAbxnLQ1fLhUPqSi - nNp/xedE1YxutQ== - -----END PRIVATE KEY----- - KEY - end + let(:certificate_key) { attributes_for(:pages_domain)[:key] } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) + stub_lets_encrypt_settings + project.add_role(user, role) sign_in(user) project.namespace.update(owner: user) allow_any_instance_of(Project).to receive(:pages_deployed?) { true } end - context 'when the page_auto_ssl feature flag is enabled' do - before do - stub_feature_flags(pages_auto_ssl: true) + context 'when the auto SSL management is initially disabled' do + let(:domain) do + create(:pages_domain, auto_ssl_enabled: false, project: project) end - context 'when the auto SSL management is initially disabled' do - let(:domain) do - create(:pages_domain, auto_ssl_enabled: false, project: project) - end + it 'enables auto SSL and dynamically updates the form accordingly', :js do + visit edit_project_pages_domain_path(project, domain) - it 'enables auto SSL and dynamically updates the form accordingly', :js do - visit edit_project_pages_domain_path(project, domain) + expect(domain.auto_ssl_enabled).to eq false - expect(domain.auto_ssl_enabled).to eq false + expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'false' + expect(page).to have_field 'Certificate (PEM)', type: 'textarea' + expect(page).to have_field 'Key (PEM)', type: 'textarea' - expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'false' - expect(page).to have_field 'Certificate (PEM)', type: 'textarea' - expect(page).to have_field 'Key (PEM)', type: 'textarea' + find('.js-auto-ssl-toggle-container .project-feature-toggle').click - find('.js-auto-ssl-toggle-container .project-feature-toggle').click + expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true' + expect(page).not_to have_field 'Certificate (PEM)', type: 'textarea' + expect(page).not_to have_field 'Key (PEM)', type: 'textarea' - expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true' - expect(page).not_to have_field 'Certificate (PEM)', type: 'textarea' - expect(page).not_to have_field 'Key (PEM)', type: 'textarea' - expect(page).to have_content "The certificate will be shown here once it has been obtained from Let's Encrypt. This process may take up to an hour to complete." + click_on 'Save Changes' - click_on 'Save Changes' + expect(domain.reload.auto_ssl_enabled).to eq true + end + end - expect(domain.reload.auto_ssl_enabled).to eq true - end + context 'when the auto SSL management is initially enabled' do + let(:domain) do + create(:pages_domain, :letsencrypt, auto_ssl_enabled: true, project: project) end - context 'when the auto SSL management is initially enabled' do - let(:domain) do - create(:pages_domain, auto_ssl_enabled: true, project: project) - end + it 'disables auto SSL and dynamically updates the form accordingly', :js do + visit edit_project_pages_domain_path(project, domain) - it 'disables auto SSL and dynamically updates the form accordingly', :js do - visit edit_project_pages_domain_path(project, domain) + expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true' + expect(page).not_to have_field 'Certificate (PEM)', type: 'textarea' + expect(page).not_to have_field 'Key (PEM)', type: 'textarea' - expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true' - expect(page).to have_field 'Certificate (PEM)', type: 'textarea', disabled: true - expect(page).not_to have_field 'Key (PEM)', type: 'textarea' + find('.js-auto-ssl-toggle-container .project-feature-toggle').click - find('.js-auto-ssl-toggle-container .project-feature-toggle').click + expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'false' + expect(page).to have_field 'Certificate (PEM)', type: 'textarea' + expect(page).to have_field 'Key (PEM)', type: 'textarea' - expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'false' - expect(page).to have_field 'Certificate (PEM)', type: 'textarea' - expect(page).to have_field 'Key (PEM)', type: 'textarea' + fill_in 'Certificate (PEM)', with: certificate_pem + fill_in 'Key (PEM)', with: certificate_key - fill_in 'Certificate (PEM)', with: certificate_pem - fill_in 'Key (PEM)', with: certificate_key + click_on 'Save Changes' - click_on 'Save Changes' + expect(domain.reload.auto_ssl_enabled).to eq false + end + end - expect(domain.reload.auto_ssl_enabled).to eq false + shared_examples 'user sees private keys only for user provided certificate' do + before do + visit edit_project_pages_domain_path(project, domain) + end + + shared_examples 'user do not see private key' do + it 'user do not see private key' do + expect(find_field('Key (PEM)', visible: :all, disabled: :all).value).to be_blank + end + end + + context 'when auto_ssl is enabled for domain' do + let(:domain) { create(:pages_domain, :letsencrypt, project: project, auto_ssl_enabled: true) } + + include_examples 'user do not see private key' + end + + context 'when auto_ssl is disabled for domain' do + let(:domain) { create(:pages_domain, :letsencrypt, project: project) } + + include_examples 'user do not see private key' + end + + context 'when certificate is provided by user' do + let(:domain) { create(:pages_domain, project: project) } + + it 'user sees private key' do + expect(find_field('Key (PEM)').value).not_to be_blank end end end - context 'when the page_auto_ssl feature flag is disabled' do + include_examples 'user sees private keys only for user provided certificate' + + context 'when letsencrypt is disabled' do let(:domain) do create(:pages_domain, auto_ssl_enabled: false, project: project) end before do - stub_feature_flags(pages_auto_ssl: false) + stub_application_setting(lets_encrypt_terms_of_service_accepted: false) visit edit_project_pages_domain_path(project, domain) end @@ -127,5 +122,7 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do it "does not render the Let's Encrypt field", :js do expect(page).not_to have_selector '.js-auto-ssl-toggle-container' end + + include_examples 'user sees private keys only for user provided certificate' end end diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb index 9bb0ba81ef5..c4b3ddb2088 100644 --- a/spec/features/projects/pages_spec.rb +++ b/spec/features/projects/pages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -shared_examples 'pages domain editing' do +shared_examples 'pages settings editing' do let(:project) { create(:project) } let(:user) { create(:user) } let(:role) { :maintainer } @@ -321,19 +321,15 @@ shared_examples 'pages domain editing' do end describe 'Pages' do - context 'when pages_auto_ssl feature flag is disabled' do - before do - stub_feature_flags(pages_auto_ssl: false) - end + include LetsEncryptHelpers - include_examples 'pages domain editing' - end + include_examples 'pages settings editing' - context 'when pages_auto_ssl feature flag is enabled' do + context 'when letsencrypt support is enabled' do before do - stub_feature_flags(pages_auto_ssl: true) + stub_lets_encrypt_settings end - include_examples 'pages domain editing' + include_examples 'pages settings editing' end end diff --git a/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb b/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb index 28d83a8b961..c50fd93e4cb 100644 --- a/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb +++ b/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb @@ -15,6 +15,8 @@ describe 'User activates JetBrains TeamCity CI' do it 'activates service' do check('Active') + check('Push') + check('Merge request') fill_in('Teamcity url', with: 'http://teamcity.example.com') fill_in('Build type', with: 'GitlabTest_Build') fill_in('Username', with: 'user') diff --git a/spec/frontend/vue_shared/components/paginated_list_spec.js b/spec/frontend/vue_shared/components/paginated_list_spec.js new file mode 100644 index 00000000000..31ac362d35f --- /dev/null +++ b/spec/frontend/vue_shared/components/paginated_list_spec.js @@ -0,0 +1,56 @@ +import PaginatedList from '~/vue_shared/components/paginated_list.vue'; +import { PREV, NEXT } from '~/vue_shared/components/pagination/constants'; +import { mount } from '@vue/test-utils'; + +describe('Pagination links component', () => { + let wrapper; + let glPaginatedList; + + const template = ` + <div class="slot" slot-scope="{ listItem }"> + <span class="item">Item Name: {{listItem.id}}</span> + </div> + `; + + const props = { + prevText: PREV, + nextText: NEXT, + }; + + beforeEach(() => { + wrapper = mount(PaginatedList, { + scopedSlots: { + default: template, + }, + propsData: { + list: [{ id: 'foo' }, { id: 'bar' }], + props, + }, + }); + + [glPaginatedList] = wrapper.vm.$children; + }); + + afterEach(() => { + wrapper.destroy(); + }); + + describe('Paginated List Component', () => { + describe('props', () => { + // We test attrs and not props because we pass through to child component using v-bind:"$attrs" + it('should pass prevText to GitLab UI paginated list', () => { + expect(glPaginatedList.$attrs['prev-text']).toBe(props.prevText); + }); + it('should pass nextText to GitLab UI paginated list', () => { + expect(glPaginatedList.$attrs['next-text']).toBe(props.nextText); + }); + }); + + describe('rendering', () => { + it('it renders the gl-paginated-list', () => { + expect(wrapper.contains('ul.list-group')).toBe(true); + expect(wrapper.findAll('li.list-group-item').length).toBe(2); + }); + }); + }); +}); diff --git a/spec/helpers/appearances_helper_spec.rb b/spec/helpers/appearances_helper_spec.rb index a3511e078ce..ed3e31b3c53 100644 --- a/spec/helpers/appearances_helper_spec.rb +++ b/spec/helpers/appearances_helper_spec.rb @@ -8,6 +8,22 @@ describe AppearancesHelper do allow(helper).to receive(:current_user).and_return(user) end + describe '.current_appearance' do + it 'memoizes empty appearance' do + expect(Appearance).to receive(:current).once + + 2.times { helper.current_appearance } + end + + it 'memoizes custom appearance' do + create(:appearance) + + expect(Appearance).to receive(:current).once.and_call_original + + 2.times { helper.current_appearance } + end + end + describe '#header_message' do it 'returns nil when header message field is not set' do create(:appearance) diff --git a/spec/javascripts/jobs/components/stages_dropdown_spec.js b/spec/javascripts/jobs/components/stages_dropdown_spec.js index 52bb5161123..86b7a8d7848 100644 --- a/spec/javascripts/jobs/components/stages_dropdown_spec.js +++ b/spec/javascripts/jobs/components/stages_dropdown_spec.js @@ -101,9 +101,7 @@ describe('Stages Dropdown', () => { }); it(`renders the pipeline info text like "Pipeline #123 for !456 with source_branch into target_branch"`, () => { - const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${ - pipeline.merge_request.source_branch - } into ${pipeline.merge_request.target_branch}`; + const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch} into ${pipeline.merge_request.target_branch}`; const actual = trimText(vm.$el.querySelector('.js-pipeline-info').innerText); expect(actual).toBe(expected); @@ -144,9 +142,7 @@ describe('Stages Dropdown', () => { }); it(`renders the pipeline info like "Pipeline #123 for !456 with source_branch"`, () => { - const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${ - pipeline.merge_request.source_branch - }`; + const expected = `Pipeline #${pipeline.id} for !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch}`; const actual = trimText(vm.$el.querySelector('.js-pipeline-info').innerText); expect(actual).toBe(expected); diff --git a/spec/javascripts/notes/components/diff_with_note_spec.js b/spec/javascripts/notes/components/diff_with_note_spec.js index 0752bd05904..f849fe9d8bb 100644 --- a/spec/javascripts/notes/components/diff_with_note_spec.js +++ b/spec/javascripts/notes/components/diff_with_note_spec.js @@ -47,6 +47,19 @@ describe('diff_with_note', () => { vm = mountComponentWithStore(Component, { props, store }); }); + it('removes trailing "+" char', () => { + const richText = vm.$el.querySelectorAll('.line_holder')[4].querySelector('.line_content') + .textContent[0]; + + expect(richText).not.toEqual('+'); + }); + + it('removes trailing "-" char', () => { + const richText = vm.$el.querySelector('#LC13').parentNode.textContent[0]; + + expect(richText).not.toEqual('-'); + }); + it('shows text diff', () => { expect(selectors.container).toHaveClass('text-file'); expect(selectors.diffTable).toExist(); diff --git a/spec/javascripts/pages/labels/components/promote_label_modal_spec.js b/spec/javascripts/pages/labels/components/promote_label_modal_spec.js index 08a8362797b..75912612255 100644 --- a/spec/javascripts/pages/labels/components/promote_label_modal_spec.js +++ b/spec/javascripts/pages/labels/components/promote_label_modal_spec.js @@ -26,9 +26,7 @@ describe('Promote label modal', () => { it('contains the proper description', () => { expect(vm.text).toContain( - `Promoting ${labelMockData.labelTitle} will make it available for all projects inside ${ - labelMockData.groupName - }`, + `Promoting ${labelMockData.labelTitle} will make it available for all projects inside ${labelMockData.groupName}`, ); }); diff --git a/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js b/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js index 2ac73ef3024..3d25a278cef 100644 --- a/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js +++ b/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js @@ -24,9 +24,7 @@ describe('Promote milestone modal', () => { it('contains the proper description', () => { expect(vm.text).toContain( - `Promoting ${ - milestoneMockData.milestoneTitle - } will make it available for all projects inside ${milestoneMockData.groupName}.`, + `Promoting ${milestoneMockData.milestoneTitle} will make it available for all projects inside ${milestoneMockData.groupName}.`, ); }); diff --git a/spec/javascripts/registry/components/collapsible_container_spec.js b/spec/javascripts/registry/components/collapsible_container_spec.js index a3f7ff76dc7..9ed4b04324a 100644 --- a/spec/javascripts/registry/components/collapsible_container_spec.js +++ b/spec/javascripts/registry/components/collapsible_container_spec.js @@ -12,6 +12,8 @@ describe('collapsible registry container', () => { let mock; const Component = Vue.extend(collapsibleComponent); + const findDeleteBtn = () => vm.$el.querySelector('.js-remove-repo'); + beforeEach(() => { mock = new MockAdapter(axios); @@ -67,7 +69,25 @@ describe('collapsible registry container', () => { describe('delete repo', () => { it('should be possible to delete a repo', () => { - expect(vm.$el.querySelector('.js-remove-repo')).not.toBeNull(); + expect(findDeleteBtn()).not.toBeNull(); + }); + + describe('clicked on delete', () => { + beforeEach(done => { + findDeleteBtn().click(); + Vue.nextTick(done); + }); + + it('should open confirmation modal', () => { + expect(vm.$el.querySelector('#confirm-repo-deletion-modal')).not.toBeNull(); + }); + + it('should call deleteItem when confirming deletion', () => { + spyOn(vm, 'deleteItem').and.returnValue(Promise.resolve()); + vm.$el.querySelector('#confirm-repo-deletion-modal .btn-danger').click(); + + expect(vm.deleteItem).toHaveBeenCalledWith(vm.repo); + }); }); }); }); diff --git a/spec/javascripts/registry/components/table_registry_spec.js b/spec/javascripts/registry/components/table_registry_spec.js index 7f5252a7d6c..d366c67a1b9 100644 --- a/spec/javascripts/registry/components/table_registry_spec.js +++ b/spec/javascripts/registry/components/table_registry_spec.js @@ -3,10 +3,14 @@ import tableRegistry from '~/registry/components/table_registry.vue'; import store from '~/registry/stores'; import { repoPropsData } from '../mock_data'; +const [firstImage] = repoPropsData.list; + describe('table registry', () => { let vm; let Component; + const findDeleteBtn = () => vm.$el.querySelector('.js-delete-registry'); + beforeEach(() => { Component = Vue.extend(tableRegistry); vm = new Component({ @@ -37,8 +41,30 @@ describe('table registry', () => { expect(textRendered).toContain(repoPropsData.list[0].size); }); - it('should be possible to delete a registry', () => { - expect(vm.$el.querySelector('.table tbody tr .js-delete-registry')).toBeDefined(); + describe('delete registry', () => { + it('should be possible to delete a registry', () => { + expect(findDeleteBtn()).toBeDefined(); + }); + + describe('clicked on delete', () => { + beforeEach(done => { + findDeleteBtn().click(); + Vue.nextTick(done); + }); + + it('should open confirmation modal and set itemToBeDeleted properly', () => { + expect(vm.itemToBeDeleted).toEqual(firstImage); + expect(vm.$el.querySelector('#confirm-image-deletion-modal')).not.toBeNull(); + }); + + it('should call deleteItem and reset itemToBeDeleted when confirming deletion', () => { + spyOn(vm, 'deleteItem').and.returnValue(Promise.resolve()); + vm.$el.querySelector('#confirm-image-deletion-modal .btn-danger').click(); + + expect(vm.deleteItem).toHaveBeenCalledWith(firstImage); + expect(vm.itemToBeDeleted).toBeNull(); + }); + }); }); describe('pagination', () => { diff --git a/spec/javascripts/registry/stores/actions_spec.js b/spec/javascripts/registry/stores/actions_spec.js index c9aa82dba90..0613ec8e0f1 100644 --- a/spec/javascripts/registry/stores/actions_spec.js +++ b/spec/javascripts/registry/stores/actions_spec.js @@ -105,4 +105,28 @@ describe('Actions Registry Store', () => { ); }); }); + + describe('deleteItem', () => { + it('should perform DELETE request on destroyPath', done => { + const destroyPath = `${TEST_HOST}/mygroup/myproject/container_registry/1.json`; + let deleted = false; + mock.onDelete(destroyPath).replyOnce(() => { + deleted = true; + return [200]; + }); + testAction( + actions.deleteItem, + { + destroyPath, + }, + mockedState, + ) + .then(() => { + expect(mock.history.delete.length).toBe(1); + expect(deleted).toBe(true); + done(); + }) + .catch(done.fail); + }); + }); }); diff --git a/spec/javascripts/releases/components/release_block_spec.js b/spec/javascripts/releases/components/release_block_spec.js index 36b181f24ef..e98c665f99d 100644 --- a/spec/javascripts/releases/components/release_block_spec.js +++ b/spec/javascripts/releases/components/release_block_spec.js @@ -78,8 +78,10 @@ describe('Release block', () => { }; let vm; + const factory = props => mountComponent(Component, { release: props }); + beforeEach(() => { - vm = mountComponent(Component, { release }); + vm = factory(release); }); afterEach(() => { @@ -149,4 +151,14 @@ describe('Release block', () => { ); }); }); + + describe('with pre_release flag', () => { + beforeEach(() => { + vm = factory(Object.assign({}, release, { pre_release: true })); + }); + + it('renders pre-release badge', () => { + expect(vm.$el.textContent).toContain('Pre-release'); + }); + }); }); diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js index 75017d20473..fe831094ecf 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js @@ -222,9 +222,7 @@ describe('MRWidgetPipeline', () => { sourceBranchLink: mockCopy.source_branch_link, }); - const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${ - pipeline.commit.short_id - } on ${mockCopy.source_branch_link}`; + const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${pipeline.commit.short_id} on ${mockCopy.source_branch_link}`; const actual = trimText(vm.$el.querySelector('.js-pipeline-info-container').innerText); @@ -247,11 +245,7 @@ describe('MRWidgetPipeline', () => { sourceBranchLink: mockCopy.source_branch_link, }); - const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${ - pipeline.commit.short_id - } on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch} into ${ - pipeline.merge_request.target_branch - }`; + const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${pipeline.commit.short_id} on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch} into ${pipeline.merge_request.target_branch}`; const actual = trimText(vm.$el.querySelector('.js-pipeline-info-container').innerText); @@ -274,9 +268,7 @@ describe('MRWidgetPipeline', () => { sourceBranchLink: mockCopy.source_branch_link, }); - const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${ - pipeline.commit.short_id - } on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch}`; + const expected = `Pipeline #${pipeline.id} ${pipeline.details.status.label} for ${pipeline.commit.short_id} on !${pipeline.merge_request.iid} with ${pipeline.merge_request.source_branch}`; const actual = trimText(vm.$el.querySelector('.js-pipeline-info-container').innerText); diff --git a/spec/javascripts/vue_shared/components/table_pagination_spec.js b/spec/javascripts/vue_shared/components/table_pagination_spec.js index 42abb4d83f0..258530f32f7 100644 --- a/spec/javascripts/vue_shared/components/table_pagination_spec.js +++ b/spec/javascripts/vue_shared/components/table_pagination_spec.js @@ -217,7 +217,7 @@ describe('Pagination component', () => { change: spy, }); - expect(component.$el.querySelector('.js-next-button').textContent.trim()).toEqual('Next'); + expect(component.$el.querySelector('.js-next-button').textContent.trim()).toEqual('Next ›'); component.$el.querySelector('.js-next-button .page-link').click(); @@ -237,7 +237,7 @@ describe('Pagination component', () => { change: spy, }); - expect(component.$el.querySelector('.js-next-button').textContent.trim()).toEqual('Next'); + expect(component.$el.querySelector('.js-next-button').textContent.trim()).toEqual('Next ›'); component.$el.querySelector('.js-next-button .page-link').click(); diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb index dad0a5535c0..8ff971114d6 100644 --- a/spec/lib/banzai/filter/relative_link_filter_spec.rb +++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb @@ -101,6 +101,13 @@ describe Banzai::Filter::RelativeLinkFilter do .to eq "/#{project_path}/blob/#{ref}/doc/api/README.md" end + it 'does not modify relative URLs in system notes' do + path = "#{project_path}/merge_requests/1/diffs" + doc = filter(link(path), system_note: true) + + expect(doc.at_css('a')['href']).to eq path + end + it 'ignores absolute URLs with two leading slashes' do doc = filter(link('//doc/api/README.md')) expect(doc.at_css('a')['href']).to eq '//doc/api/README.md' diff --git a/spec/lib/gitaly/server_spec.rb b/spec/lib/gitaly/server_spec.rb index 292ab870dad..34bd43cb3ab 100644 --- a/spec/lib/gitaly/server_spec.rb +++ b/spec/lib/gitaly/server_spec.rb @@ -47,6 +47,12 @@ describe Gitaly::Server do end end + describe "#filesystem_type" do + subject { server.filesystem_type } + + it { is_expected.to be_present } + end + describe 'request memoization' do context 'when requesting multiple properties', :request_store do it 'uses memoization for the info request' do diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb index 2e90f6c7f71..35700e0b588 100644 --- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb @@ -98,12 +98,8 @@ describe Gitlab::BitbucketImport::Importer do describe '#import_pull_requests' do let(:source_branch_sha) { sample.commits.last } let(:target_branch_sha) { sample.commits.first } - - before do - allow(subject).to receive(:import_wiki) - allow(subject).to receive(:import_issues) - - pull_request = instance_double( + let(:pull_request) do + instance_double( Bitbucket::Representation::PullRequest, iid: 10, source_branch_sha: source_branch_sha, @@ -116,6 +112,11 @@ describe Gitlab::BitbucketImport::Importer do author: 'other', created_at: Time.now, updated_at: Time.now) + end + + before do + allow(subject).to receive(:import_wiki) + allow(subject).to receive(:import_issues) # https://gitlab.com/gitlab-org/gitlab-test/compare/c1acaa58bbcbc3eafe538cb8274ba387047b69f8...5937ac0a7beb003549fc5fd26fc247ad @inline_note = instance_double( @@ -167,6 +168,20 @@ describe Gitlab::BitbucketImport::Importer do expect(reply_note.note).to eq(@reply.note) end + context 'when importing a pull request throws an exception' do + before do + allow(pull_request).to receive(:raw).and_return('hello world') + allow(subject.client).to receive(:pull_request_comments).and_raise(HTTParty::Error) + end + + it 'logs an error without the backtrace' do + subject.execute + + expect(subject.errors.count).to eq(1) + expect(subject.errors.first.keys).to match_array(%i(type iid errors)) + end + end + context "when branches' sha is not found in the repository" do let(:source_branch_sha) { 'a' * Commit::MIN_SHA_LENGTH } let(:target_branch_sha) { 'b' * Commit::MIN_SHA_LENGTH } diff --git a/spec/lib/gitlab/ci/ansi2html_spec.rb b/spec/lib/gitlab/ci/ansi2html_spec.rb index 3d57ce431ab..aa4e358b148 100644 --- a/spec/lib/gitlab/ci/ansi2html_spec.rb +++ b/spec/lib/gitlab/ci/ansi2html_spec.rb @@ -141,11 +141,11 @@ describe Gitlab::Ci::Ansi2html do end it "replaces newlines with line break tags" do - expect(convert_html("\n")).to eq('<span class=""><br/><span class=""></span></span>') + expect(convert_html("\n")).to eq('<span class=""></span><br/><span class=""></span>') end it "groups carriage returns with newlines" do - expect(convert_html("\r\n")).to eq('<span class=""><br/><span class=""></span></span>') + expect(convert_html("\r\n")).to eq('<span class=""></span><br/><span class=""></span>') end describe "incremental update" do @@ -193,7 +193,7 @@ describe Gitlab::Ci::Ansi2html do let(:pre_text) { "Hello\r" } let(:pre_html) { "<span class=\"\">Hello\r</span>" } let(:text) { "\nWorld" } - let(:html) { "<span class=\"\"><br/><span class=\"\">World</span></span>" } + let(:html) { "<span class=\"\"></span><br/><span class=\"\">World</span>" } it_behaves_like 'stateable converter' end @@ -232,7 +232,7 @@ describe Gitlab::Ci::Ansi2html do it 'prints light red' do text = "#{section_start}\e[91mHello\e[0m\n#{section_end}" header = %{<span class="term-fg-l-red section js-section-header section-header js-s-#{class_name(section_name)}">Hello</span>} - line_break = %{<span class="section js-section-header section-header js-s-#{class_name(section_name)}"><br/></span>} + line_break = %{<span class="section js-section-header section-header js-s-#{class_name(section_name)}"></span><br/>} line = %{<span class="section line s_#{class_name(section_name)}"></span>} empty_line = %{<span class="section js-s-#{class_name(section_name)}"></span>} html = "#{section_start_html}#{header}#{line_break}#{line}#{empty_line}#{section_end_html}" diff --git a/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb b/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb index 5ac5122e800..c5bc81a2b9e 100644 --- a/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb +++ b/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb @@ -45,12 +45,6 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do it { is_expected.to be_truthy } end end - - context 'and cluster is project type' do - let(:cluster) { create(:cluster, :project) } - - it { is_expected.to be_falsey } - end end context 'and no cluster to deploy to' do diff --git a/spec/lib/gitlab/ci/trace/stream_spec.rb b/spec/lib/gitlab/ci/trace/stream_spec.rb index 35250632e86..0d03eef99c8 100644 --- a/spec/lib/gitlab/ci/trace/stream_spec.rb +++ b/spec/lib/gitlab/ci/trace/stream_spec.rb @@ -65,9 +65,9 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do result = stream.html expect(result).to eq( - "<span class=\"\">ヾ(´༎ຶД༎ຶ`)ノ<br/><span class=\"\"></span></span>"\ - "<span class=\"term-fg-green\">許功蓋</span><span class=\"\"><br/>"\ - "<span class=\"\"></span></span>") + "<span class=\"\">ヾ(´༎ຶД༎ຶ`)ノ</span><br/><span class=\"\"></span>"\ + "<span class=\"term-fg-green\">許功蓋</span><span class=\"\"></span><br/>"\ + "<span class=\"\"></span>") expect(result.encoding).to eq(Encoding.default_external) end end @@ -306,8 +306,8 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do shared_examples_for 'htmls' do it "returns html" do expect(stream.html).to eq( - "<span class=\"\">12<br/><span class=\"\">34<br/>"\ - "<span class=\"\">56</span></span></span>") + "<span class=\"\">12</span><br/><span class=\"\">34</span><br/>"\ + "<span class=\"\">56</span>") end it "returns html for last line only" do diff --git a/spec/lib/gitlab/highlight_spec.rb b/spec/lib/gitlab/highlight_spec.rb index fe0e9702f8a..4676db6b8d8 100644 --- a/spec/lib/gitlab/highlight_spec.rb +++ b/spec/lib/gitlab/highlight_spec.rb @@ -18,9 +18,10 @@ describe Gitlab::Highlight do end describe '#highlight' do + let(:plain_text_file_name) { "test.txt" } + let(:plain_text_content) { "plain text contents" } let(:file_name) { 'test.lisp' } - let(:no_context_content) { ":type \"assem\"))" } - let(:content) { "(make-pathname :defaults name\n#{no_context_content}" } + let(:content) { "(make-pathname :defaults name\n:type \"assem\")" } let(:multiline_content) do %q( def test(input): @@ -32,22 +33,22 @@ describe Gitlab::Highlight do it 'highlights' do expected = %Q[<span id="LC1" class="line" lang="common_lisp"><span class="p">(</span><span class="nb">make-pathname</span> <span class="ss">:defaults</span> <span class="nv">name</span></span> -<span id="LC2" class="line" lang="common_lisp"><span class="ss">:type</span> <span class="s">"assem"</span><span class="p">))</span></span>] +<span id="LC2" class="line" lang="common_lisp"><span class="ss">:type</span> <span class="s">"assem"</span><span class="p">)</span></span>] expect(described_class.highlight(file_name, content)).to eq(expected) end it 'returns plain version for unknown lexer context' do - result = described_class.highlight(file_name, no_context_content) + result = described_class.highlight(plain_text_file_name, plain_text_content) - expect(result).to eq(%[<span id="LC1" class="line" lang="">:type "assem"))</span>]) + expect(result).to eq(%[<span id="LC1" class="line" lang="plaintext">plain text contents</span>]) end it 'returns plain version for long content' do stub_const('Gitlab::Highlight::MAXIMUM_TEXT_HIGHLIGHT_SIZE', 1) result = described_class.highlight(file_name, content) - expect(result).to eq(%[<span id="LC1" class="line" lang="">(make-pathname :defaults name</span>\n<span id="LC2" class="line" lang="">:type "assem"))</span>]) + expect(result).to eq(%[<span id="LC1" class="line" lang="">(make-pathname :defaults name</span>\n<span id="LC2" class="line" lang="">:type "assem")</span>]) end it 'highlights multi-line comments' do diff --git a/spec/lib/gitlab/json_cache_spec.rb b/spec/lib/gitlab/json_cache_spec.rb index c6a6042c65c..59160741c45 100644 --- a/spec/lib/gitlab/json_cache_spec.rb +++ b/spec/lib/gitlab/json_cache_spec.rb @@ -6,7 +6,7 @@ describe Gitlab::JsonCache do let(:backend) { double('backend').as_null_object } let(:namespace) { 'geo' } let(:key) { 'foo' } - let(:expanded_key) { "#{namespace}:#{key}:#{Rails.version}" } + let(:expanded_key) { "#{namespace}:#{key}:#{Gitlab::VERSION}:#{Rails.version}" } set(:broadcast_message) { create(:broadcast_message) } subject(:cache) { described_class.new(namespace: namespace, backend: backend) } @@ -35,42 +35,68 @@ describe Gitlab::JsonCache do describe '#cache_key' do context 'when namespace is not defined' do - it 'expands out the key with Rails version' do - cache = described_class.new(cache_key_with_version: true) + context 'when cache_key_with_version is true' do + it 'expands out the key with GitLab, and Rails versions' do + cache = described_class.new(cache_key_with_version: true) - cache_key = cache.cache_key(key) + cache_key = cache.cache_key(key) - expect(cache_key).to eq("#{key}:#{Rails.version}") + expect(cache_key).to eq("#{key}:#{Gitlab::VERSION}:#{Rails.version}") + end end - end - context 'when cache_key_with_version is true' do - it 'expands out the key with namespace and Rails version' do - cache = described_class.new(namespace: namespace, cache_key_with_version: true) + context 'when cache_key_with_version is false' do + it 'returns the key' do + cache = described_class.new(namespace: nil, cache_key_with_version: false) - cache_key = cache.cache_key(key) + cache_key = cache.cache_key(key) - expect(cache_key).to eq("#{namespace}:#{key}:#{Rails.version}") + expect(cache_key).to eq(key) + end end end - context 'when cache_key_with_version is false' do - it 'expands out the key with namespace' do - cache = described_class.new(namespace: namespace, cache_key_with_version: false) + context 'when namespace is nil' do + context 'when cache_key_with_version is true' do + it 'expands out the key with GitLab, and Rails versions' do + cache = described_class.new(cache_key_with_version: true) - cache_key = cache.cache_key(key) + cache_key = cache.cache_key(key) - expect(cache_key).to eq("#{namespace}:#{key}") + expect(cache_key).to eq("#{key}:#{Gitlab::VERSION}:#{Rails.version}") + end + end + + context 'when cache_key_with_version is false' do + it 'returns the key' do + cache = described_class.new(namespace: nil, cache_key_with_version: false) + + cache_key = cache.cache_key(key) + + expect(cache_key).to eq(key) + end end end - context 'when namespace is nil, and cache_key_with_version is false' do - it 'returns the key' do - cache = described_class.new(namespace: nil, cache_key_with_version: false) + context 'when namespace is set' do + context 'when cache_key_with_version is true' do + it 'expands out the key with namespace and Rails version' do + cache = described_class.new(namespace: namespace, cache_key_with_version: true) + + cache_key = cache.cache_key(key) - cache_key = cache.cache_key(key) + expect(cache_key).to eq("#{namespace}:#{key}:#{Gitlab::VERSION}:#{Rails.version}") + end + end - expect(cache_key).to eq(key) + context 'when cache_key_with_version is false' do + it 'expands out the key with namespace' do + cache = described_class.new(namespace: namespace, cache_key_with_version: false) + + cache_key = cache.cache_key(key) + + expect(cache_key).to eq("#{namespace}:#{key}") + end end end end diff --git a/spec/lib/gitlab/kubernetes_spec.rb b/spec/lib/gitlab/kubernetes_spec.rb index 45369b91ed6..a7ea942960b 100644 --- a/spec/lib/gitlab/kubernetes_spec.rb +++ b/spec/lib/gitlab/kubernetes_spec.rb @@ -67,6 +67,30 @@ describe Gitlab::Kubernetes do end end + describe '#filter_by_legacy_label' do + let(:non_matching_pod) { kube_pod(environment_slug: 'production', project_slug: 'my-cool-app') } + + let(:non_matching_pod_2) do + kube_pod(environment_slug: 'production', project_slug: 'my-cool-app').tap do |pod| + pod['metadata']['labels']['app'] = 'production' + end + end + + let(:matching_pod) do + kube_pod.tap do |pod| + pod['metadata']['annotations'].delete('app.gitlab.com/env') + pod['metadata']['annotations'].delete('app.gitlab.com/app') + pod['metadata']['labels']['app'] = 'production' + end + end + + it 'returns matching labels' do + items = [non_matching_pod, non_matching_pod_2, matching_pod] + + expect(filter_by_legacy_label(items, 'my-cool-app', 'production')).to contain_exactly(matching_pod) + end + end + describe '#to_kubeconfig' do let(:token) { 'TOKEN' } let(:ca_pem) { 'PEM' } diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index e44463dd767..67d49a30825 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -54,6 +54,7 @@ describe Gitlab::UsageData do gitlab_shared_runners_enabled gitlab_pages git + gitaly database avg_cycle_analytics web_ide_commits @@ -205,6 +206,10 @@ describe Gitlab::UsageData do expect(subject[:git][:version]).to eq(Gitlab::Git.version) expect(subject[:database][:adapter]).to eq(Gitlab::Database.adapter_name) expect(subject[:database][:version]).to eq(Gitlab::Database.version) + expect(subject[:gitaly][:version]).to be_present + expect(subject[:gitaly][:servers]).to be >= 1 + expect(subject[:gitaly][:filesystems]).to be_an(Array) + expect(subject[:gitaly][:filesystems].first).to be_a(String) end end diff --git a/spec/lib/gitlab_spec.rb b/spec/lib/gitlab_spec.rb index e075904b0cc..82b0e819063 100644 --- a/spec/lib/gitlab_spec.rb +++ b/spec/lib/gitlab_spec.rb @@ -97,14 +97,42 @@ describe Gitlab do end describe '.ee?' do + before do + described_class.instance_variable_set(:@is_ee, nil) + end + + after do + described_class.instance_variable_set(:@is_ee, nil) + end + it 'returns true when using Enterprise Edition' do - stub_const('License', Class.new) + root = Pathname.new('dummy') + license_path = double(:path, exist?: true) + + allow(described_class) + .to receive(:root) + .and_return(root) + + allow(root) + .to receive(:join) + .with('ee/app/models/license.rb') + .and_return(license_path) expect(described_class.ee?).to eq(true) end it 'returns false when using Community Edition' do - hide_const('License') + root = double(:path) + license_path = double(:path, exists?: false) + + allow(described_class) + .to receive(:root) + .and_return(Pathname.new('dummy')) + + allow(root) + .to receive(:join) + .with('ee/app/models/license.rb') + .and_return(license_path) expect(described_class.ee?).to eq(false) end diff --git a/spec/mailers/emails/pages_domains_spec.rb b/spec/mailers/emails/pages_domains_spec.rb index 2f594dbf9d1..eae83cd64d3 100644 --- a/spec/mailers/emails/pages_domains_spec.rb +++ b/spec/mailers/emails/pages_domains_spec.rb @@ -9,7 +9,7 @@ describe Emails::PagesDomains do set(:user) { project.creator } shared_examples 'a pages domain email' do - let(:test_recipient) { user } + let(:recipient) { user } it_behaves_like 'an email sent to a user' it_behaves_like 'an email sent from GitLab' diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index cbbb22ad78c..fa1343fe759 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -45,7 +45,7 @@ describe Notify do context 'for a project' do shared_examples 'an assignee email' do - let(:test_recipient) { assignee } + let(:recipient) { assignee } it_behaves_like 'an email sent to a user' @@ -55,7 +55,7 @@ describe Notify do aggregate_failures do expect(sender.display_name).to eq(current_user.name) expect(sender.address).to eq(gitlab_sender) - expect(subject).to deliver_to(assignee.email) + expect(subject).to deliver_to(recipient.notification_email) end end end @@ -99,15 +99,9 @@ describe Notify do end end - context 'when enabled email_author_in_body' do - before do - stub_application_setting(email_author_in_body: true) - end - - it 'contains a link to note author' do - is_expected.to have_body_text(issue.author_name) - is_expected.to have_body_text 'created an issue:' - end + it 'contains a link to issue author' do + is_expected.to have_body_text(issue.author_name) + is_expected.to have_body_text 'created an issue:' end end @@ -314,15 +308,9 @@ describe Notify do end end - context 'when enabled email_author_in_body' do - before do - stub_application_setting(email_author_in_body: true) - end - - it 'contains a link to note author' do - is_expected.to have_body_text merge_request.author_name - is_expected.to have_body_text 'created a merge request:' - end + it 'contains a link to merge request author' do + is_expected.to have_body_text merge_request.author_name + is_expected.to have_body_text 'created a merge request:' end end @@ -559,12 +547,13 @@ describe Notify do let(:host) { Gitlab.config.gitlab.host } context 'in discussion' do - set(:first_note) { create(:discussion_note_on_issue) } - set(:second_note) { create(:discussion_note_on_issue, in_reply_to: first_note) } - set(:third_note) { create(:discussion_note_on_issue, in_reply_to: second_note) } + set(:first_note) { create(:discussion_note_on_issue, project: project) } + set(:second_note) { create(:discussion_note_on_issue, in_reply_to: first_note, project: project) } + set(:third_note) { create(:discussion_note_on_issue, in_reply_to: second_note, project: project) } subject { described_class.note_issue_email(recipient.id, third_note.id) } + it_behaves_like 'an email sent to a user' it_behaves_like 'appearance header and footer enabled' it_behaves_like 'appearance header and footer not enabled' @@ -584,10 +573,11 @@ describe Notify do end context 'individual issue comments' do - set(:note) { create(:note_on_issue) } + set(:note) { create(:note_on_issue, project: project) } subject { described_class.note_issue_email(recipient.id, note.id) } + it_behaves_like 'an email sent to a user' it_behaves_like 'appearance header and footer enabled' it_behaves_like 'appearance header and footer not enabled' @@ -616,13 +606,13 @@ describe Notify do it_behaves_like 'a user cannot unsubscribe through footer link' it 'has the correct subject and body' do - is_expected.to have_referable_subject(project_snippet, reply: true) + is_expected.to have_referable_subject(project_snippet, include_group: true, reply: true) is_expected.to have_body_text project_snippet_note.note end end describe 'project was moved' do - let(:test_recipient) { user } + let(:recipient) { user } subject { described_class.project_was_moved_email(project.id, user.id, "gitlab/gitlab") } it_behaves_like 'an email sent to a user' @@ -823,7 +813,7 @@ describe Notify do it 'has the correct subject and body' do aggregate_failures do - is_expected.to have_subject("Re: #{project.name} | #{commit.title} (#{commit.short_id})") + is_expected.to have_subject("Re: #{project.name} | #{project.group.name} | #{commit.title} (#{commit.short_id})") is_expected.to have_body_text(commit.short_id) end end @@ -849,7 +839,7 @@ describe Notify do it 'has the correct subject and body' do aggregate_failures do - is_expected.to have_referable_subject(merge_request, reply: true) + is_expected.to have_referable_subject(merge_request, include_group: true, reply: true) is_expected.to have_body_text note_on_merge_request_path end end @@ -875,7 +865,7 @@ describe Notify do it 'has the correct subject and body' do aggregate_failures do - is_expected.to have_referable_subject(issue, reply: true) + is_expected.to have_referable_subject(issue, include_group: true, reply: true) is_expected.to have_body_text(note_on_issue_path) end end @@ -907,7 +897,9 @@ describe Notify do end it 'contains an introduction' do - is_expected.to have_body_text 'started a new discussion' + issuable_url = "project_#{note.noteable_type.underscore}_url" + + is_expected.to have_body_text "started a new <a href=\"#{public_send(issuable_url, project, note.noteable, anchor: "note_#{note.id}")}\">discussion</a>" end context 'when a comment on an existing discussion' do @@ -939,7 +931,7 @@ describe Notify do it_behaves_like 'appearance header and footer not enabled' it 'has the correct subject' do - is_expected.to have_subject "Re: #{project.name} | #{commit.title} (#{commit.short_id})" + is_expected.to have_subject "Re: #{project.name} | #{project.group.name} | #{commit.title} (#{commit.short_id})" end it 'contains a link to the commit' do @@ -967,7 +959,7 @@ describe Notify do it_behaves_like 'appearance header and footer not enabled' it 'has the correct subject' do - is_expected.to have_referable_subject(merge_request, reply: true) + is_expected.to have_referable_subject(merge_request, include_group: true, reply: true) end it 'contains a link to the merge request note' do @@ -995,7 +987,7 @@ describe Notify do it_behaves_like 'appearance header and footer not enabled' it 'has the correct subject' do - is_expected.to have_referable_subject(issue, reply: true) + is_expected.to have_referable_subject(issue, include_group: true, reply: true) end it 'contains a link to the issue note' do diff --git a/spec/migrations/migrate_legacy_managed_clusters_to_unmanaged_spec.rb b/spec/migrations/migrate_legacy_managed_clusters_to_unmanaged_spec.rb new file mode 100644 index 00000000000..93426f1f273 --- /dev/null +++ b/spec/migrations/migrate_legacy_managed_clusters_to_unmanaged_spec.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +require 'spec_helper' +require Rails.root.join('db', 'post_migrate', '20190606163724_migrate_legacy_managed_clusters_to_unmanaged.rb') + +describe MigrateLegacyManagedClustersToUnmanaged, :migration do + let(:cluster_type) { 'project_type' } + let(:created_at) { 1.hour.ago } + + let!(:cluster) do + table(:clusters).create!( + name: 'cluster', + cluster_type: described_class::Cluster.cluster_types[cluster_type], + managed: true, + created_at: created_at + ) + end + + it 'marks the cluster as unmanaged' do + migrate! + expect(cluster.reload).not_to be_managed + end + + context 'cluster is not project type' do + let(:cluster_type) { 'group_type' } + + it 'does not update the cluster' do + migrate! + expect(cluster.reload).to be_managed + end + end + + context 'cluster has a kubernetes namespace associated' do + before do + table(:clusters_kubernetes_namespaces).create!( + cluster_id: cluster.id, + namespace: 'namespace' + ) + end + + it 'does not update the cluster' do + migrate! + expect(cluster.reload).to be_managed + end + end + + context 'cluster was recently created' do + let(:created_at) { 2.minutes.ago } + + it 'does not update the cluster' do + migrate! + expect(cluster.reload).to be_managed + end + end +end diff --git a/spec/migrations/migrate_managed_clusters_with_no_token_to_unmanaged_spec.rb b/spec/migrations/migrate_managed_clusters_with_no_token_to_unmanaged_spec.rb new file mode 100644 index 00000000000..b73bd16cb60 --- /dev/null +++ b/spec/migrations/migrate_managed_clusters_with_no_token_to_unmanaged_spec.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +require 'spec_helper' +require Rails.root.join('db', 'post_migrate', '20190613231640_migrate_managed_clusters_with_no_token_to_unmanaged.rb') + +describe MigrateManagedClustersWithNoTokenToUnmanaged, :migration do + let(:cluster_type) { 'project_type' } + let(:created_at) { Date.new(2018, 11, 1).midnight } + + let!(:cluster) do + table(:clusters).create!( + name: 'cluster', + cluster_type: described_class::Cluster.cluster_types[cluster_type], + managed: true, + created_at: created_at + ) + end + + let!(:kubernetes_namespace) do + table(:clusters_kubernetes_namespaces).create!( + cluster_id: cluster.id, + namespace: 'namespace' + ) + end + + it 'marks the cluster as unmanaged' do + migrate! + expect(cluster.reload).not_to be_managed + end + + context 'cluster is not project type' do + let(:cluster_type) { 'group_type' } + + it 'does not update the cluster' do + migrate! + expect(cluster.reload).to be_managed + end + end + + context 'kubernetes namespace has a service account token' do + before do + kubernetes_namespace.update!(encrypted_service_account_token: "TOKEN") + end + + it 'does not update the cluster' do + migrate! + expect(cluster.reload).to be_managed + end + end + + context 'cluster was created after the cutoff' do + let(:created_at) { Date.new(2019, 1, 1).midnight } + + it 'does not update the cluster' do + migrate! + expect(cluster.reload).to be_managed + end + end +end diff --git a/spec/models/clusters/platforms/kubernetes_spec.rb b/spec/models/clusters/platforms/kubernetes_spec.rb index 1fb3a8de808..05b3035e591 100644 --- a/spec/models/clusters/platforms/kubernetes_spec.rb +++ b/spec/models/clusters/platforms/kubernetes_spec.rb @@ -281,14 +281,14 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching it_behaves_like 'setting variables' - it 'sets KUBE_TOKEN' do - expect(subject).to include( + it 'does not set KUBE_TOKEN' do + expect(subject).not_to include( { key: 'KUBE_TOKEN', value: kubernetes.token, public: false, masked: true } ) end end - context 'kubernetes namespace is created with no service account token' do + context 'kubernetes namespace is created with service account token' do let!(:kubernetes_namespace) { create(:cluster_kubernetes_namespace, :with_token, cluster: cluster) } it_behaves_like 'setting variables' @@ -340,32 +340,6 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching end end - context 'namespace is provided' do - let(:namespace) { 'my-project' } - - before do - kubernetes.namespace = namespace - end - - it_behaves_like 'setting variables' - - it 'sets KUBE_TOKEN' do - expect(subject).to include( - { key: 'KUBE_TOKEN', value: kubernetes.token, public: false, masked: true } - ) - end - end - - context 'no namespace provided' do - it_behaves_like 'setting variables' - - it 'sets KUBE_TOKEN' do - expect(subject).to include( - { key: 'KUBE_TOKEN', value: kubernetes.token, public: false, masked: true } - ) - end - end - context 'group level cluster' do let!(:cluster) { create(:cluster, :group, platform_kubernetes: kubernetes) } @@ -510,27 +484,4 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching it { is_expected.to include(pods: []) } end end - - describe '#update_kubernetes_namespace' do - let(:cluster) { create(:cluster, :provided_by_gcp) } - let(:platform) { cluster.platform } - - context 'when namespace is updated' do - it 'calls ConfigureWorker' do - expect(ClusterConfigureWorker).to receive(:perform_async).with(cluster.id).once - - platform.namespace = 'new-namespace' - platform.save - end - end - - context 'when namespace is not updated' do - it 'does not call ConfigureWorker' do - expect(ClusterConfigureWorker).not_to receive(:perform_async) - - platform.username = "new-username" - platform.save - end - end - end end diff --git a/spec/models/concerns/deployment_platform_spec.rb b/spec/models/concerns/deployment_platform_spec.rb index 0e34d8fccf3..96465a51db2 100644 --- a/spec/models/concerns/deployment_platform_spec.rb +++ b/spec/models/concerns/deployment_platform_spec.rb @@ -8,40 +8,7 @@ describe DeploymentPlatform do describe '#deployment_platform' do subject { project.deployment_platform } - context 'with no Kubernetes configuration on CI/CD, no Kubernetes Service and a Kubernetes template configured' do - let!(:kubernetes_service) { create(:kubernetes_service, template: true) } - - it 'returns a platform kubernetes' do - expect(subject).to be_a_kind_of(Clusters::Platforms::Kubernetes) - end - - it 'creates a cluster and a platform kubernetes' do - expect { subject } - .to change { Clusters::Cluster.count }.by(1) - .and change { Clusters::Platforms::Kubernetes.count }.by(1) - end - - it 'includes appropriate attributes for Cluster' do - cluster = subject.cluster - expect(cluster.name).to eq('kubernetes-template') - expect(cluster.project).to eq(project) - expect(cluster.provider_type).to eq('user') - expect(cluster.platform_type).to eq('kubernetes') - end - - it 'creates a platform kubernetes' do - expect { subject }.to change { Clusters::Platforms::Kubernetes.count }.by(1) - end - - it 'copies attributes from Clusters::Platform::Kubernetes template into the new Cluster::Platforms::Kubernetes' do - expect(subject.api_url).to eq(kubernetes_service.api_url) - expect(subject.ca_pem).to eq(kubernetes_service.ca_pem) - expect(subject.token).to eq(kubernetes_service.token) - expect(subject.namespace).to eq(kubernetes_service.namespace) - end - end - - context 'with no Kubernetes configuration on CI/CD, no Kubernetes Service and no Kubernetes template configured' do + context 'with no Kubernetes configuration on CI/CD, no Kubernetes Service' do it { is_expected.to be_nil } end @@ -126,23 +93,5 @@ describe DeploymentPlatform do end end end - - context 'when user configured kubernetes integration from project services' do - let!(:kubernetes_service) { create(:kubernetes_service, project: project) } - - it 'returns the Kubernetes service' do - expect(subject).to eq(kubernetes_service) - end - end - - context 'when the cluster creation fails' do - let!(:kubernetes_service) { create(:kubernetes_service, template: true) } - - before do - allow_any_instance_of(Clusters::Cluster).to receive(:persisted?).and_return(false) - end - - it { is_expected.to be_nil } - end end end diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb index fdc81359d34..4fb7b71a3c7 100644 --- a/spec/models/pages_domain_spec.rb +++ b/spec/models/pages_domain_spec.rb @@ -356,6 +356,102 @@ describe PagesDomain do end end + describe '#user_provided_key' do + subject { domain.user_provided_key } + + context 'when certificate is provided by user' do + let(:domain) { create(:pages_domain) } + + it 'returns key' do + is_expected.to eq(domain.key) + end + end + + context 'when certificate is provided by gitlab' do + let(:domain) { create(:pages_domain, :letsencrypt) } + + it 'returns nil' do + is_expected.to be_nil + end + end + end + + describe '#user_provided_certificate' do + subject { domain.user_provided_certificate } + + context 'when certificate is provided by user' do + let(:domain) { create(:pages_domain) } + + it 'returns key' do + is_expected.to eq(domain.certificate) + end + end + + context 'when certificate is provided by gitlab' do + let(:domain) { create(:pages_domain, :letsencrypt) } + + it 'returns nil' do + is_expected.to be_nil + end + end + end + + shared_examples 'certificate setter' do |attribute, setter_name, old_certificate_source, new_certificate_source| + let(:domain) do + create(:pages_domain, certificate_source: old_certificate_source) + end + + let(:old_value) { domain.public_send(attribute) } + + subject { domain.public_send(setter_name, new_value) } + + context 'when value has been changed' do + let(:new_value) { 'new_value' } + + it "assignes new value to #{attribute}" do + expect do + subject + end.to change { domain.public_send(attribute) }.from(old_value).to('new_value') + end + + it 'changes certificate source' do + expect do + subject + end.to change { domain.certificate_source }.from(old_certificate_source).to(new_certificate_source) + end + end + + context 'when value has not been not changed' do + let(:new_value) { old_value } + + it 'does not change certificate source' do + expect do + subject + end.not_to change { domain.certificate_source }.from(old_certificate_source) + end + end + end + + describe '#user_provided_key=' do + include_examples('certificate setter', 'key', 'user_provided_key=', + 'gitlab_provided', 'user_provided') + end + + describe '#gitlab_provided_key=' do + include_examples('certificate setter', 'key', 'gitlab_provided_key=', + 'user_provided', 'gitlab_provided') + end + + describe '#user_provided_certificate=' do + include_examples('certificate setter', 'certificate', 'user_provided_certificate=', + 'gitlab_provided', 'user_provided') + end + + describe '#gitlab_provided_certificate=' do + include_examples('certificate setter', 'certificate', 'gitlab_provided_certificate=', + 'user_provided', 'gitlab_provided') + end + describe '.for_removal' do subject { described_class.for_removal } diff --git a/spec/models/project_services/kubernetes_service_spec.rb b/spec/models/project_services/kubernetes_service_spec.rb index 34ee1eafd5c..5d7d6c34e67 100644 --- a/spec/models/project_services/kubernetes_service_spec.rb +++ b/spec/models/project_services/kubernetes_service_spec.rb @@ -7,7 +7,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do include ReactiveCachingHelpers let(:project) { create(:kubernetes_project) } - let(:service) { project.deployment_platform } + let(:service) { create(:kubernetes_service, project: project) } describe 'Associations' do it { is_expected.to belong_to :project } @@ -78,7 +78,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do it 'includes an error with a deprecation message' do kubernetes_service.valid? - expect(kubernetes_service.errors[:base].first).to match(/Kubernetes service integration has been deprecated/) + expect(kubernetes_service.errors[:base].first).to match(/Kubernetes service integration has been disabled/) end end @@ -383,13 +383,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do let(:kubernetes_service) { create(:kubernetes_service) } it 'indicates the service is deprecated' do - expect(kubernetes_service.deprecation_message).to match(/Kubernetes service integration has been deprecated/) + expect(kubernetes_service.deprecation_message).to match(/Kubernetes service integration has been disabled/) end context 'if the service is not active' do it 'returns a message' do kubernetes_service.update_attribute(:active, false) - expect(kubernetes_service.deprecation_message).to match(/Fields on this page are now uneditable/) + expect(kubernetes_service.deprecation_message).to match(/Fields on this page are not used by GitLab/) end end end diff --git a/spec/models/project_services/teamcity_service_spec.rb b/spec/models/project_services/teamcity_service_spec.rb index 1c434b25205..3d875bc49e7 100644 --- a/spec/models/project_services/teamcity_service_spec.rb +++ b/spec/models/project_services/teamcity_service_spec.rb @@ -7,10 +7,11 @@ describe TeamcityService, :use_clean_rails_memory_store_caching do include StubRequests let(:teamcity_url) { 'http://gitlab.com/teamcity' } + let(:project) { create(:project) } subject(:service) do described_class.create( - project: create(:project), + project: project, properties: { teamcity_url: teamcity_url, username: 'mic', @@ -207,6 +208,97 @@ describe TeamcityService, :use_clean_rails_memory_store_caching do end end + describe '#execute' do + context 'when push' do + let(:data) do + { + object_kind: 'push', + ref: 'refs/heads/dev-123_branch', + after: '0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e', + total_commits_count: 1 + } + end + + it 'handles push request correctly' do + stub_post_to_build_queue(branch: 'dev-123_branch') + + expect(service.execute(data)).to include('Ok') + end + + it 'returns nil when ref is blank' do + data[:after] = Gitlab::Git::BLANK_SHA + + expect(service.execute(data)).to be_nil + end + + it 'returns nil when there is no content' do + data[:total_commits_count] = 0 + + expect(service.execute(data)).to be_nil + end + + it 'returns nil when a merge request is opened for the same ref' do + create(:merge_request, source_project: project, source_branch: 'dev-123_branch') + + expect(service.execute(data)).to be_nil + end + end + + context 'when merge_request' do + let(:data) do + { + object_kind: 'merge_request', + ref: 'refs/heads/dev-123_branch', + after: '0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e', + total_commits_count: 1, + object_attributes: { + state: 'opened', + source_branch: 'dev-123_branch', + merge_status: 'unchecked' + } + } + end + + it 'handles merge request correctly' do + stub_post_to_build_queue(branch: 'dev-123_branch') + + expect(service.execute(data)).to include('Ok') + end + + it 'returns nil when merge request is not opened' do + data[:object_attributes][:state] = 'closed' + + expect(service.execute(data)).to be_nil + end + + it 'returns nil unless merge request is marked as unchecked' do + data[:object_attributes][:merge_status] = 'can_be_merged' + + expect(service.execute(data)).to be_nil + end + end + + it 'returns nil when event is not supported' do + data = { object_kind: 'foo' } + + expect(service.execute(data)).to be_nil + end + end + + def stub_post_to_build_queue(branch:) + teamcity_full_url = 'http://gitlab.com/teamcity/httpAuth/app/rest/buildQueue' + body ||= %Q(<build branchName=\"#{branch}\"><buildType id=\"foo\"/></build>) + auth = %w(mic password) + + stub_full_request(teamcity_full_url, method: :post).with( + basic_auth: auth, + body: body, + headers: { + 'Content-Type' => 'application/xml' + } + ).to_return(status: 200, body: 'Ok', headers: {}) + end + def stub_request(status: 200, body: nil, build_status: 'success') teamcity_full_url = 'http://gitlab.com/teamcity/httpAuth/app/rest/builds/branch:unspecified:any,revision:123' auth = %w(mic password) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 20b98b5eb85..cc0f5002a1e 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2656,8 +2656,8 @@ describe Project do let!(:cluster) { create(:cluster, :project, :provided_by_gcp) } let(:project) { cluster.project } - it 'returns variables from this service' do - expect(project.deployment_variables).to include( + it 'does not return variables from this service' do + expect(project.deployment_variables).not_to include( { key: 'KUBE_TOKEN', value: project.deployment_platform.token, public: false, masked: true } ) end diff --git a/spec/requests/api/pages_domains_spec.rb b/spec/requests/api/pages_domains_spec.rb index 3eb68a6abb6..449032b95b7 100644 --- a/spec/requests/api/pages_domains_spec.rb +++ b/spec/requests/api/pages_domains_spec.rb @@ -359,6 +359,14 @@ describe API::PagesDomains do expect(pages_domain_secure.certificate).to eq(params_secure_nokey[:certificate]) end + it 'updates certificate source to user_provided if is changed' do + pages_domain.update!(certificate_source: 'gitlab_provided') + + expect do + put api(route_domain, user), params: params_secure + end.to change { pages_domain.reload.certificate_source }.from('gitlab_provided').to('user_provided') + end + it 'fails to update pages domain adding certificate without key' do put api(route_domain, user), params: params_secure_nokey diff --git a/spec/serializers/merge_request_widget_entity_spec.rb b/spec/serializers/merge_request_widget_entity_spec.rb index a27c22191f4..ffbfac9b326 100644 --- a/spec/serializers/merge_request_widget_entity_spec.rb +++ b/spec/serializers/merge_request_widget_entity_spec.rb @@ -32,6 +32,19 @@ describe MergeRequestWidgetEntity do end end + describe 'issues links' do + it 'includes issues links when requested' do + data = described_class.new(resource, request: request, issues_links: true).as_json + + expect(data).to include(:issues_links) + expect(data[:issues_links]).to include(:assign_to_closing, :closing, :mentioned_but_not_closing) + end + + it 'omits issue links by default' do + expect(subject).not_to include(:issues_links) + end + end + describe 'pipeline' do let(:pipeline) { create(:ci_empty_pipeline, project: project, ref: resource.source_branch, sha: resource.source_branch_sha, head_pipeline_of: resource) } diff --git a/spec/services/clusters/gcp/finalize_creation_service_spec.rb b/spec/services/clusters/gcp/finalize_creation_service_spec.rb index 2664649df47..5f91acb8e84 100644 --- a/spec/services/clusters/gcp/finalize_creation_service_spec.rb +++ b/spec/services/clusters/gcp/finalize_creation_service_spec.rb @@ -19,10 +19,6 @@ describe Clusters::Gcp::FinalizeCreationService, '#execute' do subject { described_class.new.execute(provider) } - before do - allow(ClusterConfigureWorker).to receive(:perform_async) - end - shared_examples 'success' do it 'configures provider and kubernetes' do subject @@ -42,12 +38,6 @@ describe Clusters::Gcp::FinalizeCreationService, '#execute' do expect(platform.password).to eq(password) expect(platform.token).to eq(token) end - - it 'calls ClusterConfigureWorker in a ascync fashion' do - expect(ClusterConfigureWorker).to receive(:perform_async).with(cluster.id) - - subject - end end shared_examples 'error' do diff --git a/spec/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service_spec.rb b/spec/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service_spec.rb index a5806559b14..93c0dc37ade 100644 --- a/spec/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service_spec.rb +++ b/spec/services/clusters/gcp/kubernetes/fetch_kubernetes_token_service_spec.rb @@ -17,7 +17,7 @@ describe Clusters::Gcp::Kubernetes::FetchKubernetesTokenService do ) end - subject { described_class.new(kubeclient, service_account_token_name, namespace).execute } + subject { described_class.new(kubeclient, service_account_token_name, namespace, token_retry_delay: 0).execute } before do stub_kubeclient_discover(api_url) @@ -26,8 +26,7 @@ describe Clusters::Gcp::Kubernetes::FetchKubernetesTokenService do context 'when params correct' do let(:decoded_token) { 'xxx.token.xxx' } let(:token) { Base64.encode64(decoded_token) } - - context 'when gitlab-token exists' do + context 'when the secret exists' do before do stub_kubeclient_get_secret( api_url, @@ -50,13 +49,62 @@ describe Clusters::Gcp::Kubernetes::FetchKubernetesTokenService do it { expect { subject }.to raise_error(Kubeclient::HttpError) } end - context 'when gitlab-token does not exist' do + context 'when the secret does not exist on the first try' do + before do + stub_kubeclient_get_secret_not_found_then_found( + api_url, + { + metadata_name: service_account_token_name, + namespace: namespace, + token: token + } + ) + end + + it 'retries and finds the token' do + expect(subject).to eq(decoded_token) + end + end + + context 'when the secret permanently does not exist' do before do stub_kubeclient_get_secret_error(api_url, service_account_token_name, namespace: namespace, status: 404) end it { is_expected.to be_nil } end + + context 'when the secret is missing a token on the first try' do + before do + stub_kubeclient_get_secret_missing_token_then_with_token( + api_url, + { + metadata_name: service_account_token_name, + namespace: namespace, + token: token + } + ) + end + + it 'retries and finds the token' do + expect(subject).to eq(decoded_token) + end + end + + context 'when the secret is permanently missing a token' do + before do + stub_kubeclient_get_secret( + api_url, + { + metadata_name: service_account_token_name, + namespace: namespace, + token: nil + } + ) + end + + it { is_expected.to be_nil } + end end end end diff --git a/spec/services/clusters/update_service_spec.rb b/spec/services/clusters/update_service_spec.rb index 21b37f88fd8..3ee45375dca 100644 --- a/spec/services/clusters/update_service_spec.rb +++ b/spec/services/clusters/update_service_spec.rb @@ -39,7 +39,6 @@ describe Clusters::UpdateService do end before do - allow(ClusterConfigureWorker).to receive(:perform_async) stub_kubeclient_get_namespace('https://kubernetes.example.com', namespace: 'my-namespace') end diff --git a/spec/services/issues/reorder_service_spec.rb b/spec/services/issues/reorder_service_spec.rb new file mode 100644 index 00000000000..b147cdf4e64 --- /dev/null +++ b/spec/services/issues/reorder_service_spec.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Issues::ReorderService do + set(:user) { create(:user) } + set(:project) { create(:project) } + set(:group) { create(:group) } + + shared_examples 'issues reorder service' do + context 'when reordering issues' do + it 'returns false with no params' do + expect(service({}).execute(issue1)).to be_falsey + end + + it 'returns false with both invalid params' do + params = { move_after_id: nil, move_before_id: 1 } + + expect(service(params).execute(issue1)).to be_falsey + end + + it 'sorts issues' do + params = { move_after_id: issue2.id, move_before_id: issue3.id } + + service(params).execute(issue1) + + expect(issue1.relative_position) + .to be_between(issue2.relative_position, issue3.relative_position) + end + end + end + + describe '#execute' do + let(:issue1) { create(:issue, project: project, relative_position: 10) } + let(:issue2) { create(:issue, project: project, relative_position: 20) } + let(:issue3) { create(:issue, project: project, relative_position: 30) } + + context 'when ordering issues in a project' do + let(:parent) { project } + + before do + parent.add_developer(user) + end + + it_behaves_like 'issues reorder service' + end + + context 'when ordering issues in a group' do + let(:project) { create(:project, namespace: group) } + + before do + group.add_developer(user) + end + + it_behaves_like 'issues reorder service' + + context 'when ordering in a group issue list' do + let(:params) { { move_after_id: issue2.id, move_before_id: issue3.id, group_full_path: group.full_path } } + + subject { service(params) } + + it 'sends the board_group_id parameter' do + match_params = { move_between_ids: [issue2.id, issue3.id], board_group_id: group.id } + + expect(Issues::UpdateService) + .to receive(:new).with(project, user, match_params) + .and_return(double(execute: build(:issue))) + + subject.execute(issue1) + end + + it 'sorts issues' do + project2 = create(:project, namespace: group) + issue4 = create(:issue, project: project2) + + subject.execute(issue4) + + expect(issue4.relative_position) + .to be_between(issue2.relative_position, issue3.relative_position) + end + end + end + end + + def service(params) + described_class.new(project, user, params) + end +end diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 22f5607cb9c..28fa5d12d9c 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -687,6 +687,22 @@ describe Issues::UpdateService, :mailer do end end + context 'when moving an issue ', :nested_groups do + it 'raises an error for invalid move ids within a project' do + opts = { move_between_ids: [9000, 9999] } + + expect { described_class.new(issue.project, user, opts).execute(issue) } + .to raise_error(ActiveRecord::RecordNotFound) + end + + it 'raises an error for invalid move ids within a group' do + opts = { move_between_ids: [9000, 9999], board_group_id: create(:group).id } + + expect { described_class.new(issue.project, user, opts).execute(issue) } + .to raise_error(ActiveRecord::RecordNotFound) + end + end + include_examples 'issuable update service' do let(:open_issuable) { issue } let(:closed_issuable) { create(:closed_issue, project: project) } diff --git a/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb b/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb index 6d7be27939c..d5f77f3354b 100644 --- a/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb +++ b/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb @@ -137,6 +137,12 @@ describe PagesDomains::ObtainLetsEncryptCertificateService do expect(pages_domain.certificate).to eq(certificate) end + it 'marks certificate as gitlab_provided' do + service.execute + + expect(pages_domain.certificate_source).to eq("gitlab_provided") + end + it 'removes order from database' do service.execute diff --git a/spec/support/helpers/email_helpers.rb b/spec/support/helpers/email_helpers.rb index ed049daba80..a7175491fa0 100644 --- a/spec/support/helpers/email_helpers.rb +++ b/spec/support/helpers/email_helpers.rb @@ -37,8 +37,19 @@ module EmailHelpers ActionMailer::Base.deliveries.find { |d| d.to.include?(user.notification_email) } end - def have_referable_subject(referable, include_project: true, reply: false) - prefix = (include_project && referable.project ? "#{referable.project.name} | " : '').freeze + def have_referable_subject(referable, include_project: true, include_group: false, reply: false) + context = [] + + context << referable.project.name if include_project && referable.project + context << referable.project.group.name if include_group && referable.project.group + + prefix = + if context.any? + context.join(' | ') + ' | ' + else + '' + end + prefix = "Re: #{prefix}" if reply suffix = "#{referable.title} (#{referable.to_reference})" diff --git a/spec/support/helpers/kubernetes_helpers.rb b/spec/support/helpers/kubernetes_helpers.rb index 011c4df0fe5..3c7bcba2b42 100644 --- a/spec/support/helpers/kubernetes_helpers.rb +++ b/spec/support/helpers/kubernetes_helpers.rb @@ -104,6 +104,26 @@ module KubernetesHelpers .to_return(status: [status, "Internal Server Error"]) end + def stub_kubeclient_get_secret_not_found_then_found(api_url, **options) + options[:metadata_name] ||= "default-token-1" + options[:namespace] ||= "default" + + WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{options[:namespace]}/secrets/#{options[:metadata_name]}") + .to_return(status: [404, "Not Found"]) + .then + .to_return(kube_response(kube_v1_secret_body(options))) + end + + def stub_kubeclient_get_secret_missing_token_then_with_token(api_url, **options) + options[:metadata_name] ||= "default-token-1" + options[:namespace] ||= "default" + + WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{options[:namespace]}/secrets/#{options[:metadata_name]}") + .to_return(kube_response(kube_v1_secret_body(options.merge(token: nil)))) + .then + .to_return(kube_response(kube_v1_secret_body(options))) + end + def stub_kubeclient_get_service_account(api_url, name, namespace: 'default') WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{namespace}/serviceaccounts/#{name}") .to_return(kube_response({})) @@ -184,11 +204,11 @@ module KubernetesHelpers "kind" => "SecretList", "apiVersion": "v1", "metadata": { - "name": options[:metadata_name] || "default-token-1", + "name": options.fetch(:metadata_name, "default-token-1"), "namespace": "kube-system" }, "data": { - "token": options[:token] || Base64.encode64('token-sample-123') + "token": options.fetch(:token, Base64.encode64('token-sample-123')) } } end diff --git a/spec/support/shared_examples/ci_trace_shared_examples.rb b/spec/support/shared_examples/ci_trace_shared_examples.rb index f985b2dcbba..7993b2870e5 100644 --- a/spec/support/shared_examples/ci_trace_shared_examples.rb +++ b/spec/support/shared_examples/ci_trace_shared_examples.rb @@ -5,7 +5,7 @@ shared_examples_for 'common trace features' do end it "returns formatted html" do - expect(trace.html).to eq("<span class=\"\">12<br/><span class=\"\">34</span></span>") + expect(trace.html).to eq("<span class=\"\">12</span><br/><span class=\"\">34</span>") end it "returns last line of formatted html" do diff --git a/spec/support/shared_examples/notify_shared_examples.rb b/spec/support/shared_examples/notify_shared_examples.rb index 897c9106d77..e64c7e37a0c 100644 --- a/spec/support/shared_examples/notify_shared_examples.rb +++ b/spec/support/shared_examples/notify_shared_examples.rb @@ -45,18 +45,18 @@ shared_examples 'an email sent to a user' do let(:group_notification_email) { 'user+group@example.com' } it 'is sent to user\'s global notification email address' do - expect(subject).to deliver_to(test_recipient.notification_email) + expect(subject).to deliver_to(recipient.notification_email) end context 'that is part of a project\'s group' do it 'is sent to user\'s group notification email address when set' do - create(:notification_setting, user: test_recipient, source: project.group, notification_email: group_notification_email) + create(:notification_setting, user: recipient, source: project.group, notification_email: group_notification_email) expect(subject).to deliver_to(group_notification_email) end it 'is sent to user\'s global notification email address when no group email set' do - create(:notification_setting, user: test_recipient, source: project.group, notification_email: '') - expect(subject).to deliver_to(test_recipient.notification_email) + create(:notification_setting, user: recipient, source: project.group, notification_email: '') + expect(subject).to deliver_to(recipient.notification_email) end end @@ -67,17 +67,17 @@ shared_examples 'an email sent to a user' do it 'is sent to user\'s subgroup notification email address when set' do # Set top-level group notification email address to make sure it doesn't get selected - create(:notification_setting, user: test_recipient, source: group, notification_email: group_notification_email) + create(:notification_setting, user: recipient, source: group, notification_email: group_notification_email) subgroup_notification_email = 'user+subgroup@example.com' - create(:notification_setting, user: test_recipient, source: subgroup, notification_email: subgroup_notification_email) + create(:notification_setting, user: recipient, source: subgroup, notification_email: subgroup_notification_email) expect(subject).to deliver_to(subgroup_notification_email) end it 'is sent to user\'s group notification email address when set and subgroup email address not set' do - create(:notification_setting, user: test_recipient, source: subgroup, notification_email: '') - expect(subject).to deliver_to(test_recipient.notification_email) + create(:notification_setting, user: recipient, source: subgroup, notification_email: '') + expect(subject).to deliver_to(recipient.notification_email) end end end @@ -281,18 +281,8 @@ shared_examples 'a note email' do is_expected.to have_body_text note.note end - it 'does not contain note author' do - is_expected.not_to have_body_text note.author_name - end - - context 'when enabled email_author_in_body' do - before do - stub_application_setting(email_author_in_body: true) - end - - it 'contains a link to note author' do - is_expected.to have_body_text note.author_name - end + it 'contains a link to note author' do + is_expected.to have_body_text note.author_name end end diff --git a/spec/tasks/gitlab/check_rake_spec.rb b/spec/tasks/gitlab/check_rake_spec.rb index 06525e3c771..0fcb9b269f3 100644 --- a/spec/tasks/gitlab/check_rake_spec.rb +++ b/spec/tasks/gitlab/check_rake_spec.rb @@ -96,6 +96,15 @@ describe 'check.rake' do subject end + + it 'sanitizes output' do + user = double(dn: 'uid=fake_user1', uid: 'fake_user1') + allow(adapter).to receive(:users).and_return([user]) + stub_env('SANITIZE', 'true') + + expect { subject }.to output(/User output sanitized/).to_stdout + expect { subject }.not_to output('fake_user1').to_stdout + end end end end diff --git a/spec/workers/build_success_worker_spec.rb b/spec/workers/build_success_worker_spec.rb index ffe8796ded9..f4ff8cb15f8 100644 --- a/spec/workers/build_success_worker_spec.rb +++ b/spec/workers/build_success_worker_spec.rb @@ -6,51 +6,7 @@ describe BuildSuccessWorker do describe '#perform' do subject { described_class.new.perform(build.id) } - before do - allow_any_instance_of(Deployment).to receive(:create_ref) - end - context 'when build exists' do - context 'when deployment was not created with the build creation' do # An edge case during the transition period - let!(:build) { create(:ci_build, :deploy_to_production) } - - before do - allow(Deployments::FinishedWorker).to receive(:perform_async) - Deployment.delete_all - build.reload - end - - it 'creates a successful deployment' do - expect(build).not_to be_has_deployment - - subject - - build.reload - expect(build).to be_has_deployment - expect(build.deployment).to be_success - end - end - - context 'when deployment was created with the build creation' do # Counter part of the above edge case - let!(:build) { create(:ci_build, :deploy_to_production) } - - it 'does not create a new deployment' do - expect(build).to be_has_deployment - - expect { subject }.not_to change { Deployment.count } - end - end - - context 'when build is not associated with project' do - let!(:build) { create(:ci_build, project: nil) } - - it 'does not create deployment' do - subject - - expect(build.reload).not_to be_has_deployment - end - end - context 'when the build will stop an environment' do let!(:build) { create(:ci_build, :stop_review_app, environment: environment.name, project: environment.project) } let(:environment) { create(:environment, state: :available) } diff --git a/spec/workers/cluster_provision_worker_spec.rb b/spec/workers/cluster_provision_worker_spec.rb index 9cc2ad12bfc..3f69962f25d 100644 --- a/spec/workers/cluster_provision_worker_spec.rb +++ b/spec/workers/cluster_provision_worker_spec.rb @@ -23,18 +23,11 @@ describe ClusterProvisionWorker do described_class.new.perform(cluster.id) end - - it 'configures kubernetes platform' do - expect(ClusterConfigureWorker).to receive(:perform_async).with(cluster.id) - - described_class.new.perform(cluster.id) - end end context 'when cluster does not exist' do it 'does not provision a cluster' do expect_any_instance_of(Clusters::Gcp::ProvisionService).not_to receive(:execute) - expect(ClusterConfigureWorker).not_to receive(:perform_async) described_class.new.perform(123) end diff --git a/yarn.lock b/yarn.lock index 2e46217ae50..5b725f07c93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8699,10 +8699,10 @@ prettier@1.16.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.3.tgz#8c62168453badef702f34b45b6ee899574a6a65d" integrity sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw== -prettier@1.16.4: - version "1.16.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717" - integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g== +prettier@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" + integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== pretty-format@^24.8.0: version "24.8.0" |