diff options
230 files changed, 1576 insertions, 1059 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80ba8e5c1a1..f9c5ebe7a35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -290,7 +290,7 @@ flaky-examples-check: - scripts/merge-reports ${NEW_FLAKY_SPECS_REPORT} rspec_flaky/new_*_*.json - scripts/detect-new-flaky-examples $NEW_FLAKY_SPECS_REPORT -setup-test-env: +compile-assets: <<: *dedicated-runner <<: *except-docs <<: *use-pg @@ -301,13 +301,25 @@ setup-test-env: - node --version - yarn install --frozen-lockfile --cache-folder .yarn-cache - bundle exec rake gitlab:assets:compile - - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - - scripts/gitaly-test-build # Do not use 'bundle exec' here artifacts: expire_in: 7d paths: - node_modules - public/assets + +setup-test-env: + <<: *dedicated-runner + <<: *except-docs + <<: *use-pg + stage: prepare + cache: + <<: *default-cache + script: + - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' + - scripts/gitaly-test-build # Do not use 'bundle exec' here + artifacts: + expire_in: 7d + paths: - tmp/tests rspec-pg 0 26: *rspec-metadata-pg @@ -664,6 +676,7 @@ lint:javascript:report: <<: *pull-cache stage: post-test dependencies: + - compile-assets - setup-test-env before_script: [] script: diff --git a/CHANGELOG.md b/CHANGELOG.md index d77e73c4203..77f23981c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,196 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 10.4.0 (2018-01-22) + +### Security (8 changes, 1 of them is from the community) + +- Upgrade Ruby to 2.3.6 to include security patches. !16016 +- Prevent a SQL injection in the MilestonesFinder. +- Check user authorization for source and target projects when creating a merge request. +- Fix path traversal in gitlab-ci.yml cache:key. +- Fix writable shared deploy keys. +- Filter out sensitive fields from the project services API. (Robert Schilling) +- Fix RCE via project import mechanism. +- Prevent OAuth login POST requests when a provider has been disabled. + +### Fixed (68 changes, 24 of them are from the community) + +- Update comment on image cursor and icons. !15760 +- Fixes the wording of headers in system info page. !15802 (Gilbert Roulot) +- Reset todo counters when the target is deleted. !15807 +- Execute quick actions (if present) when creating MR from issue. !15810 +- fix build count in pipeline success mail. !15827 (Christiaan Van den Poel) +- Fix error that was preventing users to change the access level of access requests for Groups or Projects. !15832 +- Last push event widget width for fixed layout. !15862 (George Tsiolis) +- Hide link to issues/MRs from labels list if issues/MRs are disabled. !15863 (Sophie Herold) +- Use relative URL for projects to avoid storing domains. !15876 +- Fix gitlab-rake gitlab:import:repos import schedule. !15931 +- Removed incorrect guidance stating blocked users will be removed from groups and project as members. !15947 (CesarApodaca) +- Fix some POST/DELETE requests in IE by switching some bundles to Axios for Ajax requests. !15951 +- Fixing error 500 when member exist but not the user. !15970 +- show None when issue is in closed list and no labels assigned. !15976 (Christiaan Van den Poel) +- Fix tags in the Activity tab not being clickable. !15996 (Mario de la Ossa) +- Disable Vue pagination when only one page of content is available. !15999 (Mario de la Ossa) +- disables shortcut to issue boards when issues are not enabled. !16020 (Christiaan Van den Poel) +- Ignore lost+found folder during backup on a volume. !16036 (Julien Millau) +- Fix abuse reports link url in admin area navbar. !16068 (megos) +- Keep typographic hierarchy in User Settings. !16090 (George Tsiolis) +- Adjust content width for User Settings, GPG Keys. !16093 (George Tsiolis) +- Fix gitlab-rake gitlab:import:repos import schedule. !16115 +- Fix import project url not updating project name. !16120 +- Fix activity inline event line height on mobile. !16121 (George Tsiolis) +- Fix slash commands dropdown description mis-alignment on Firefox. !16125 (Maurizio De Santis) +- Remove unnecessary sidebar element realignment. !16159 (George Tsiolis) +- User#projects_limit remove DB default and added NOT NULL constraint. !16165 (Mario de la Ossa) +- Fix API endpoints to edit wiki pages where project belongs to a group. !16170 +- Fix breadcrumbs in User Settings. !16172 (rfwatson) +- Move 2FA disable button. !16177 (George Tsiolis) +- Fixing bug when wiki last version. !16197 +- Protected branch is now created for default branch on import. !16198 +- Prevent excessive DB load due to faulty DeleteConflictingRedirectRoutes background migration. !16205 +- Force Auto DevOps kubectl version to 1.8.6. !16218 +- Fix missing references to pipeline objects when restoring project with import/export feature. !16221 +- Fix inconsistent downcase of filenames in prefilled `Add` commit messages. !16232 (James Ramsay) +- Default merge request title is set correctly again when external issue tracker is activated. !16356 (Ben305) +- Ensure that emails contain absolute, rather than relative, links to user uploads. !16364 +- Prevent invalid Route path if path is unchanged. !16397 +- Fixing rack request mime type when using rack attack. !16427 +- Prevent RevList failing on non utf8 paths. !16440 +- Fix giant fork icons on forks page. !16474 +- Fix links to uploaded files on wiki pages. !16499 +- Modify `LDAP::Person` to return username value based on attributes. +- Fixed merge request status badge not updating after merging. +- Remove related links in MR widget when empty state. +- Gracefully handle garbled URIs in Markdown. +- Fix hooks not being set up properly for bare import Rake task. +- Fix Mermaid drawings not loading on some browsers. +- Humanize the units of "Showing last X KiB of log" in job trace. +- Avoid leaving a push event empty if payload cannot be created. +- Show authored date rather than committed date on the commit list. +- Fix when branch creation fails don't post system note. (Mateusz Bajorski) +- Fix viewing merge request diffs where the underlying blobs are unavailable. +- Fix 500 error when visiting a commit where the blobs do not exist. +- Set target_branch to the ref branch when creating MR from issue. +- Fix closed text for issues on Todos page. +- [API] Fix creating issue when assignee_id is empty. +- Fix false positive issue references in merge requests caused by header anchor links. +- Fixed chanages dropdown ellipsis positioning. +- Fix shortcut links on help page. +- Clears visual token on second backspace. (Martin Wortschack) +- Fix onion-skin re-entering state. +- fix button alignment on MWPS component. +- Add optional search param for Merge Requests API. +- Normalizing Identity extern_uid when saving the record. +- Fixed typo for issue description field declaration. (Marcus Amargi) +- Fix ANSI 256 bold colors in pipelines job output. + +### Changed (18 changes, 3 of them are from the community) + +- Make mail notifications of discussion notes In-Reply-To of each other. !14289 +- Migrate existing data from KubernetesService to Clusters::Platforms::Kubernetes. !15589 +- Implement checking GCP project billing status in cluster creation form. !15665 +- Present multiple clusters in a single list instead of a tabbed view. !15669 +- Remove soft removals related code. !15789 +- Only mark import and fork jobs as failed once all Sidekiq retries get exhausted. !15844 +- Translate date ranges on contributors page. !15846 +- Update issuable status icons. !15898 +- Update feature toggle design to use icons and make it i18n friendly. !15904 +- Update groups tree to use GitLab SVG icons, add last updated at information for projects. !15980 +- Allow forking a public project to a private group. !16050 +- Expose project_id on /api/v4/pages/domains. !16200 (Luc Didry) +- Display graph values on hover within monitoring page. !16261 +- removed tabindexes from tag form. (Marcus Amargi) +- Move edit button to second row on issue page (and change it to a pencil icon). +- Run background migrations with a minimum interval. +- Provide additional cookies to JIRA service requests to allow Oracle WebGates Basic Auth. (Stanislaw Wozniak) +- Hide markdown toolbar in preview mode. + +### Performance (11 changes) + +- Improve the performance for counting diverging commits. Show 999+ if it is more than 1000 commits. !15963 +- Treat empty markdown and html strings as valid cached text, not missing cache that needs to be updated. +- Cache merged and closed events data in merge_request_metrics table. +- Speed up generation of commit stats by using Rugged native methods. +- Improve search query for issues. +- Improve search query for merge requests. +- Eager load event target authors whenever possible. +- Use simple Next/Prev paging for jobs to avoid large count queries on arbitrarily large sets of historical jobs. +- Improve performance of MR discussions on large diffs. +- Add index on namespaces lower(name) for UsersController#exists. +- Fix timeout when filtering issues by label. + +### Added (26 changes, 8 of them are from the community) + +- Support new chat notifications parameters in Services API. !11435 +- Add online and status attribute to runner api entity. !11750 +- Adds ordering to projects contributors in API. !15469 (Jacopo Beschi @jacopo-beschi) +- Add assets_sync gem to Gemfile. !15734 +- Add a gitlab:tcp_check rake task. !15759 +- add support for sorting in tags api. !15772 (haseebeqx) +- Add Prometheus to available Cluster applications. !15895 +- Validate file status when commiting multiple files. !15922 +- List of avatars should never show +1. !15972 (Jacopo Beschi @jacopo-beschi) +- Do not generate NPM links for private NPM modules in blob view. !16002 (Mario de la Ossa) +- Backport fast database lookup of SSH authorized_keys from EE. !16014 +- Add i18n helpers to branch comparison view. !16031 (James Ramsay) +- Add pause/resume button to project runners. !16032 (Mario de la Ossa) +- Added option to user preferences to enable the multi file editor. !16056 +- Implement project jobs cache reset. !16067 +- Rendering of emoji's in Group-Overview. !16098 (Jacopo Beschi @jacopo-beschi) +- Allow automatic creation of Kubernetes Integration from template. !16104 +- API: get participants from merge_requests & issues. !16187 (Brent Greeff) +- Added option to disable commits stats in the commit endpoint. !16309 +- Disable creation of new Kubernetes Integrations unless they're active or created from template. !41054 +- Added badge to tree & blob views to indicate LFS tracked files. +- Enable ordering of groups and their children by name. +- Add button to run scheduled pipeline immediately. +- Allow user to rebase merge requests. +- Handle GitLab hashed storage repositories using the repo import task. +- Hide runner token in CI/CD settings page. + +### Other (12 changes, 3 of them are from the community) + +- Adds the multi file editor as a new beta feature. !15430 +- Use relative URLs when linking to uploaded files. !15751 +- Add docs for why you might be signed out when using the Remember me token. !15756 +- Replace '.team << [user, role]' with 'add_role(user)' in specs. !16069 (@blackst0ne) +- Add id to modal.vue to support data-toggle="modal". !16189 +- Update scss-lint to 0.56.0. !16278 (Takuya Noguchi) +- Fix web ide user preferences copy and buttons. !41789 +- Update redis-rack to 2.0.4. +- Import some code and functionality from gitlab-shell to improve subprocess handling. +- Update Browse file to Choose file in all occurences. +- Bump mysql2 gem version from 0.4.5 to 0.4.10. (asaparov) +- Use a background migration for issues.closed_at. + + +## 10.3.6 (2018-01-22) + +### Fixed (17 changes, 2 of them are from the community) + +- Fix abuse reports link url in admin area navbar. !16068 (megos) +- Fix gitlab-rake gitlab:import:repos import schedule. !16115 +- Fixing bug when wiki last version. !16197 +- Prevent excessive DB load due to faulty DeleteConflictingRedirectRoutes background migration. !16205 +- Default merge request title is set correctly again when external issue tracker is activated. !16356 (Ben305) +- Prevent invalid Route path if path is unchanged. !16397 +- Fixing rack request mime type when using rack attack. !16427 +- Prevent RevList failing on non utf8 paths. !16440 +- Fix 500 error when visiting a commit where the blobs do not exist. +- Fix viewing merge request diffs where the underlying blobs are unavailable. +- Gracefully handle garbled URIs in Markdown. +- Fix hooks not being set up properly for bare import Rake task. +- Fix Mermaid drawings not loading on some browsers. +- Fixed chanages dropdown ellipsis positioning. +- Avoid leaving a push event empty if payload cannot be created. +- Set target_branch to the ref branch when creating MR from issue. +- Fix shortcut links on help page. + + ## 10.3.5 (2018-01-18) -- No changes. +- Fix error that prevented the 'deploy_keys' migration from working in MySQL databases. ## 10.3.4 (2018-01-10) diff --git a/GITLAB_SHELL_VERSION b/GITLAB_SHELL_VERSION index c68d476cc8e..9b9a244206f 100644 --- a/GITLAB_SHELL_VERSION +++ b/GITLAB_SHELL_VERSION @@ -1 +1 @@ -5.11.0 +6.0.2 diff --git a/GITLAB_WORKHORSE_VERSION b/GITLAB_WORKHORSE_VERSION index 1545d966571..d5c0c991428 100644 --- a/GITLAB_WORKHORSE_VERSION +++ b/GITLAB_WORKHORSE_VERSION @@ -1 +1 @@ -3.5.0 +3.5.1 @@ -1 +1 @@ -10.4.0-pre +10.5.0-pre diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index f2479ec33d7..96e5c8c890c 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -1,32 +1,23 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */ import Milestone from './milestone'; -import NotificationsForm from './notifications_form'; import notificationsDropdown from './notifications_dropdown'; import LineHighlighter from './line_highlighter'; import MergeRequest from './merge_request'; import Sidebar from './right_sidebar'; import Flash from './flash'; -import SecretValues from './behaviors/secret_values'; -import UserCallout from './user_callout'; import BlobViewer from './blob/viewer/index'; import GfmAutoComplete from './gfm_auto_complete'; import Star from './star'; -import TreeView from './tree'; import ZenMode from './zen_mode'; -import initSettingsPanels from './settings_panels'; import PerformanceBar from './performance_bar'; import initNotes from './init_notes'; import initIssuableSidebar from './init_issuable_sidebar'; -import { ajaxGet, convertPermissionToBoolean } from './lib/utils/common_utils'; +import { convertPermissionToBoolean } from './lib/utils/common_utils'; import GlFieldErrors from './gl_field_errors'; -import GLForm from './gl_form'; import Shortcuts from './shortcuts'; -import ShortcutsNavigation from './shortcuts_navigation'; import ShortcutsIssuable from './shortcuts_issuable'; -import U2FAuthenticate from './u2f/authenticate'; import Diff from './diff'; import SearchAutocomplete from './search_autocomplete'; -import Activities from './activities'; (function() { var Dispatcher; @@ -131,7 +122,9 @@ import Activities from './activities'; .catch(fail); break; case 'dashboard:todos:index': - import('./pages/dashboard/todos/index').then(callDefault).catch(fail); + import('./pages/dashboard/todos/index') + .then(callDefault) + .catch(fail); break; case 'admin:jobs:index': import('./pages/admin/jobs/index') @@ -234,15 +227,21 @@ import Activities from './activities'; .catch(fail); break; case 'projects:snippets:show': - initNotes(); - new ZenMode(); + import('./pages/projects/snippets/show') + .then(callDefault) + .catch(fail); break; case 'projects:snippets:new': - case 'projects:snippets:edit': case 'projects:snippets:create': + import('./pages/projects/snippets/new') + .then(callDefault) + .catch(fail); + break; + case 'projects:snippets:edit': case 'projects:snippets:update': - new GLForm($('.snippet-form'), true); - new ZenMode(); + import('./pages/projects/snippets/edit') + .then(callDefault) + .catch(fail); break; case 'snippets:new': import('./pages/snippets/new') @@ -265,8 +264,9 @@ import Activities from './activities'; .catch(fail); break; case 'projects:releases:edit': - new ZenMode(); - new GLForm($('.release-form'), true); + import('./pages/projects/releases/edit') + .then(callDefault) + .catch(fail); break; case 'projects:merge_requests:show': new Diff(); @@ -310,19 +310,10 @@ import Activities from './activities'; shortcut_handler = true; break; case 'projects:show': - shortcut_handler = new ShortcutsNavigation(); - new NotificationsForm(); - new UserCallout({ - setCalloutPerProject: true, - className: 'js-autodevops-banner', - }); - - if ($('#tree-slider').length) new TreeView(); - if ($('.blob-viewer').length) new BlobViewer(); - if ($('.project-show-activity').length) new Activities(); - $('#tree-slider').waitForImages(function() { - ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath); - }); + import('./pages/projects/show') + .then(callDefault) + .catch(fail); + shortcut_handler = true; break; case 'projects:edit': import('./pages/projects/edit') @@ -477,18 +468,15 @@ import Activities from './activities'; .catch(fail); break; case 'projects:settings:repository:show': - // Initialize expandable settings panels - initSettingsPanels(); + import('./pages/projects/settings/repository/show') + .then(callDefault) + .catch(fail); break; case 'projects:settings:ci_cd:show': - // Initialize expandable settings panels - initSettingsPanels(); - - const runnerToken = document.querySelector('.js-secret-runner-token'); - if (runnerToken) { - const runnerTokenSecretValue = new SecretValues(runnerToken); - runnerTokenSecretValue.init(); - } + import('./pages/projects/settings/ci_cd/show') + .then(callDefault) + .catch(fail); + break; case 'groups:settings:ci_cd:show': import('./pages/groups/settings/ci_cd/show') .then(callDefault) @@ -496,13 +484,19 @@ import Activities from './activities'; break; case 'ci:lints:create': case 'ci:lints:show': - import('./pages/ci/lints').then(m => m.default()).catch(fail); + import('./pages/ci/lints') + .then(callDefault) + .catch(fail); break; case 'users:show': - import('./pages/users/show').then(callDefault).catch(fail); + import('./pages/users/show') + .then(callDefault) + .catch(fail); break; case 'admin:conversational_development_index:show': - import('./pages/admin/conversational_development_index/show').then(m => m.default()).catch(fail); + import('./pages/admin/conversational_development_index/show') + .then(callDefault) + .catch(fail); break; case 'snippets:show': import('./pages/snippets/show') @@ -510,7 +504,9 @@ import Activities from './activities'; .catch(fail); break; case 'import:fogbugz:new_user_map': - import('./pages/import/fogbugz/new_user_map').then(m => m.default()).catch(fail); + import('./pages/import/fogbugz/new_user_map') + .then(callDefault) + .catch(fail); break; case 'profiles:personal_access_tokens:index': import('./pages/profiles/personal_access_tokens') @@ -537,18 +533,15 @@ import Activities from './activities'; } switch (path[0]) { case 'sessions': + import('./pages/sessions') + .then(callDefault) + .catch(fail); + break; case 'omniauth_callbacks': - if (!gon.u2f) break; - const u2fAuthenticate = new U2FAuthenticate( - $('#js-authenticate-u2f'), - '#js-login-u2f-form', - gon.u2f, - document.querySelector('#js-login-2fa-device'), - document.querySelector('.js-2fa-form'), - ); - u2fAuthenticate.start(); - // needed in rspec - gl.u2fAuthenticate = u2fAuthenticate; + import('./pages/omniauth_callbacks') + .then(callDefault) + .catch(fail); + break; case 'admin': import('./pages/admin') .then(callDefault) @@ -598,10 +591,6 @@ import Activities from './activities'; break; } break; - case 'dashboard': - case 'root': - new UserCallout(); - break; case 'profiles': import('./pages/profiles/index/') .then(callDefault) diff --git a/app/assets/javascripts/pages/omniauth_callbacks/index.js b/app/assets/javascripts/pages/omniauth_callbacks/index.js new file mode 100644 index 00000000000..54f4e56359a --- /dev/null +++ b/app/assets/javascripts/pages/omniauth_callbacks/index.js @@ -0,0 +1,5 @@ +import initU2F from '../../shared/sessions/u2f'; + +export default () => { + initU2F(); +}; diff --git a/app/assets/javascripts/pages/projects/init_form.js b/app/assets/javascripts/pages/projects/init_form.js new file mode 100644 index 00000000000..0b6c5c1d30b --- /dev/null +++ b/app/assets/javascripts/pages/projects/init_form.js @@ -0,0 +1,7 @@ +import ZenMode from '~/zen_mode'; +import GLForm from '~/gl_form'; + +export default function ($formEl) { + new ZenMode(); // eslint-disable-line no-new + new GLForm($formEl, true); // eslint-disable-line no-new +} diff --git a/app/assets/javascripts/pages/projects/releases/edit/index.js b/app/assets/javascripts/pages/projects/releases/edit/index.js new file mode 100644 index 00000000000..3d997cdfff0 --- /dev/null +++ b/app/assets/javascripts/pages/projects/releases/edit/index.js @@ -0,0 +1,3 @@ +import initForm from '~/pages/projects/init_form'; + +export default initForm($('.release-form')); diff --git a/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js b/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js new file mode 100644 index 00000000000..94b927a1548 --- /dev/null +++ b/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js @@ -0,0 +1,18 @@ +import initSettingsPanels from '~/settings_panels'; +import SecretValues from '~/behaviors/secret_values'; + +export default function () { + // Initialize expandable settings panels + initSettingsPanels(); + const runnerToken = document.querySelector('.js-secret-runner-token'); + if (runnerToken) { + const runnerTokenSecretValue = new SecretValues(runnerToken); + runnerTokenSecretValue.init(); + } + + const secretVariableTable = document.querySelector('.js-secret-variable-table'); + if (secretVariableTable) { + const secretVariableTableValues = new SecretValues(secretVariableTable); + secretVariableTableValues.init(); + } +} diff --git a/app/assets/javascripts/pages/projects/settings/repository/show/index.js b/app/assets/javascripts/pages/projects/settings/repository/show/index.js new file mode 100644 index 00000000000..83b5467fbc0 --- /dev/null +++ b/app/assets/javascripts/pages/projects/settings/repository/show/index.js @@ -0,0 +1,3 @@ +import initSettingsPanels from '~/settings_panels'; + +export default initSettingsPanels; diff --git a/app/assets/javascripts/pages/projects/show/index.js b/app/assets/javascripts/pages/projects/show/index.js new file mode 100644 index 00000000000..92dc1e59651 --- /dev/null +++ b/app/assets/javascripts/pages/projects/show/index.js @@ -0,0 +1,23 @@ +import ShortcutsNavigation from '~/shortcuts_navigation'; +import NotificationsForm from '~/notifications_form'; +import UserCallout from '~/user_callout'; +import TreeView from '~/tree'; +import BlobViewer from '~/blob/viewer/index'; +import Activities from '~/activities'; +import { ajaxGet } from '~/lib/utils/common_utils'; + +export default () => { + new ShortcutsNavigation(); // eslint-disable-line no-new + new NotificationsForm(); // eslint-disable-line no-new + new UserCallout({ // eslint-disable-line no-new + setCalloutPerProject: true, + className: 'js-autodevops-banner', + }); + + if ($('#tree-slider').length) new TreeView(); // eslint-disable-line no-new + if ($('.blob-viewer').length) new BlobViewer(); // eslint-disable-line no-new + if ($('.project-show-activity').length) new Activities(); // eslint-disable-line no-new + $('#tree-slider').waitForImages(() => { + ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath); + }); +}; diff --git a/app/assets/javascripts/pages/projects/snippets/edit/index.js b/app/assets/javascripts/pages/projects/snippets/edit/index.js new file mode 100644 index 00000000000..9edb16dc73b --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/edit/index.js @@ -0,0 +1,3 @@ +import initForm from '~/pages/projects/init_form'; + +export default initForm($('.snippet-form')); diff --git a/app/assets/javascripts/pages/projects/snippets/new/index.js b/app/assets/javascripts/pages/projects/snippets/new/index.js new file mode 100644 index 00000000000..9edb16dc73b --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/new/index.js @@ -0,0 +1,3 @@ +import initForm from '~/pages/projects/init_form'; + +export default initForm($('.snippet-form')); diff --git a/app/assets/javascripts/pages/projects/snippets/show/index.js b/app/assets/javascripts/pages/projects/snippets/show/index.js new file mode 100644 index 00000000000..d8cf5184f8f --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/show/index.js @@ -0,0 +1,7 @@ +import initNotes from '~/init_notes'; +import ZenMode from '~/zen_mode'; + +export default function () { + initNotes(); + new ZenMode(); // eslint-disable-line no-new +} diff --git a/app/assets/javascripts/pages/sessions/index.js b/app/assets/javascripts/pages/sessions/index.js new file mode 100644 index 00000000000..54f4e56359a --- /dev/null +++ b/app/assets/javascripts/pages/sessions/index.js @@ -0,0 +1,5 @@ +import initU2F from '../../shared/sessions/u2f'; + +export default () => { + initU2F(); +}; diff --git a/app/assets/javascripts/shared/sessions/u2f.js b/app/assets/javascripts/shared/sessions/u2f.js new file mode 100644 index 00000000000..1d075f7e872 --- /dev/null +++ b/app/assets/javascripts/shared/sessions/u2f.js @@ -0,0 +1,16 @@ +import U2FAuthenticate from '../../u2f/authenticate'; + +export default () => { + if (!gon.u2f) return; + + const u2fAuthenticate = new U2FAuthenticate( + $('#js-authenticate-u2f'), + '#js-login-u2f-form', + gon.u2f, + document.querySelector('#js-login-2fa-device'), + document.querySelector('.js-2fa-form'), + ); + u2fAuthenticate.start(); + // needed in rspec + gl.u2fAuthenticate = u2fAuthenticate; +}; diff --git a/app/assets/javascripts/templates/issuable_template_selector.js b/app/assets/javascripts/templates/issuable_template_selector.js index 8e167f5bf08..4cc1c96b870 100644 --- a/app/assets/javascripts/templates/issuable_template_selector.js +++ b/app/assets/javascripts/templates/issuable_template_selector.js @@ -32,8 +32,8 @@ export default class IssuableTemplateSelector extends TemplateSelector { this.startLoadingSpinner(); Api.issueTemplate(this.namespacePath, this.projectPath, query.name, this.issuableType, (err, currentTemplate) => { this.currentTemplate = currentTemplate; - if (err) return; // Error handled by global AJAX error handler this.stopLoadingSpinner(); + if (err) return; // Error handled by global AJAX error handler this.setInputValueToTemplateContent(); }); return; diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js deleted file mode 100644 index 5648208f7b1..00000000000 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.js +++ /dev/null @@ -1,47 +0,0 @@ -import eventHub from '../../event_hub'; -import statusIcon from '../mr_widget_status_icon'; - -export default { - name: 'MRWidgetAutoMergeFailed', - props: { - mr: { type: Object, required: true }, - }, - data() { - return { - isRefreshing: false, - }; - }, - components: { - statusIcon, - }, - methods: { - refreshWidget() { - this.isRefreshing = true; - eventHub.$emit('MRWidgetUpdateRequested', () => { - this.isRefreshing = false; - }); - }, - }, - template: ` - <div class="mr-widget-body media"> - <status-icon status="failed" /> - <div class="media-body space-children"> - <span class="bold"> - <template v-if="mr.mergeError">{{mr.mergeError}}.</template> - This merge request failed to be merged automatically - </span> - <button - @click="refreshWidget" - :disabled="isRefreshing" - type="button" - class="btn btn-xs btn-default"> - <i - v-if="isRefreshing" - class="fa fa-spinner fa-spin" - aria-hidden="true" /> - Refresh - </button> - </div> - </div> - `, -}; diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue new file mode 100644 index 00000000000..77dd243d617 --- /dev/null +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue @@ -0,0 +1,52 @@ +<script> + import loadingIcon from '~/vue_shared/components/loading_icon.vue'; + import eventHub from '../../event_hub'; + import statusIcon from '../mr_widget_status_icon'; + + export default { + name: 'MRWidgetAutoMergeFailed', + components: { + statusIcon, + loadingIcon, + }, + props: { + mr: { + type: Object, + required: true, + }, + }, + data() { + return { + isRefreshing: false, + }; + }, + methods: { + refreshWidget() { + this.isRefreshing = true; + eventHub.$emit('MRWidgetUpdateRequested', () => { + this.isRefreshing = false; + }); + }, + }, + }; +</script> +<template> + <div class="mr-widget-body media"> + <status-icon status="warning" /> + <div class="media-body space-children"> + <span class="bold"> + <template v-if="mr.mergeError">{{ mr.mergeError }}.</template> + {{ s__("mrWidget|This merge request failed to be merged automatically") }} + </span> + <button + @click="refreshWidget" + :disabled="isRefreshing" + type="button" + class="btn btn-xs btn-default" + > + <loading-icon v-if="isRefreshing" /> + {{ s__("mrWidget|Refresh") }} + </button> + </div> + </div> +</template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js index dd8b2665b1d..dc19b20aa11 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js @@ -12,7 +12,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" /> + <status-icon status="warning" /> <div class="media-body"> <mr-widget-author-and-time actionText="Closed by" diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.js index 5d468a085cb..7a887bacfa7 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.js @@ -11,7 +11,7 @@ export default { template: ` <div class="mr-widget-body media"> <status-icon - status="failed" + status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.js index c25d6c359bb..fc5f18695b7 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.js @@ -51,7 +51,7 @@ export default { </span> </template> <template v-else> - <status-icon status="failed" :show-disabled-button="true" /> + <status-icon status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span class="bold"> <span diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.js index 1bc0b7e0819..16ff1109e3f 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.js @@ -24,7 +24,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" :show-disabled-button="true" /> + <status-icon status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span class="bold js-branch-text"> <span class="capitalize"> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.js index 1cedf86e811..2c84f423ee2 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.js @@ -7,7 +7,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" :show-disabled-button="true" /> + <status-icon status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span class="bold"> Pipeline blocked. The pipeline for this merge request requires a manual action to proceed diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_failed.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_failed.js index 6853ba4b9f8..cbaa73deffa 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_failed.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_failed.js @@ -7,7 +7,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" :show-disabled-button="true" /> + <status-icon status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span class="bold"> The pipeline for this merge request failed. Please retry the job or push a new commit to fix the failure diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js index f16414ad5c0..e51eef07093 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js @@ -69,7 +69,7 @@ export default { }, iconClass() { if (this.status === 'failed' || !this.commitMessage.length || !this.mr.isMergeAllowed || this.mr.preventMerge) { - return 'failed'; + return 'warning'; } return 'success'; }, diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_sha_mismatch.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_sha_mismatch.js index af19cf6ab87..46687cc85e1 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_sha_mismatch.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_sha_mismatch.js @@ -7,7 +7,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" :show-disabled-button="true" /> + <status-icon status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span class="bold"> The source branch HEAD has recently changed. Please reload the page and review the changes before merging diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions.js index a119ecbbdfe..97b1940f4be 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions.js @@ -10,7 +10,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" :show-disabled-button="true" /> + <status-icon status="warning" :show-disabled-button="true" /> <div class="media-body space-children"> <span class="bold"> There are unresolved discussions. Please resolve these discussions diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_wip.js b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_wip.js index 13461440ef2..b4b0f00445c 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_wip.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_wip.js @@ -37,7 +37,7 @@ export default { }, template: ` <div class="mr-widget-body media"> - <status-icon status="failed" :show-disabled-button="Boolean(mr.removeWIPPath)" /> + <status-icon status="warning" :show-disabled-button="Boolean(mr.removeWIPPath)" /> <div class="media-body space-children"> <span class="bold"> This is a Work in Progress diff --git a/app/assets/javascripts/vue_merge_request_widget/dependencies.js b/app/assets/javascripts/vue_merge_request_widget/dependencies.js index 12610501868..2dd3b2c2f98 100644 --- a/app/assets/javascripts/vue_merge_request_widget/dependencies.js +++ b/app/assets/javascripts/vue_merge_request_widget/dependencies.js @@ -33,7 +33,7 @@ export { default as PipelineBlockedState } from './components/states/mr_widget_p export { default as PipelineFailedState } from './components/states/mr_widget_pipeline_failed'; export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds'; export { default as RebaseState } from './components/states/mr_widget_rebase.vue'; -export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed'; +export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed.vue'; export { default as CheckingState } from './components/states/mr_widget_checking'; export { default as MRWidgetStore } from './stores/mr_widget_store'; export { default as MRWidgetService } from './services/mr_widget_service'; diff --git a/app/assets/stylesheets/framework/layout.scss b/app/assets/stylesheets/framework/layout.scss index fab3270b9f5..d107422e517 100644 --- a/app/assets/stylesheets/framework/layout.scss +++ b/app/assets/stylesheets/framework/layout.scss @@ -1,10 +1,16 @@ html { overflow-y: scroll; - &.touch .tooltip { display: none !important; } + &.touch .tooltip { + display: none !important; + } } body { + // Improves readability for dyslexic users; supported only in Chrome/Safari so far + // scss-lint:disable PropertySpelling + text-decoration-skip: ink; + // scss-lint:enable PropertySpelling &.navless { background-color: $white-light !important; } diff --git a/app/controllers/concerns/group_tree.rb b/app/controllers/concerns/group_tree.rb index b569029283f..fafb10090ca 100644 --- a/app/controllers/concerns/group_tree.rb +++ b/app/controllers/concerns/group_tree.rb @@ -2,7 +2,11 @@ module GroupTree # rubocop:disable Gitlab/ModuleWithInstanceVariables def render_group_tree(groups) @groups = if params[:filter].present? - Gitlab::GroupHierarchy.new(groups.search(params[:filter])) + # We find the ancestors by ID of the search results here. + # Otherwise the ancestors would also have filters applied, + # which would cause them not to be preloaded. + group_ids = groups.search(params[:filter]).select(:id) + Gitlab::GroupHierarchy.new(Group.where(id: group_ids)) .base_and_ancestors else # Only show root groups if no parent-id is given diff --git a/app/finders/group_descendants_finder.rb b/app/finders/group_descendants_finder.rb index 58570a580f1..e72fd8eb3a5 100644 --- a/app/finders/group_descendants_finder.rb +++ b/app/finders/group_descendants_finder.rb @@ -27,12 +27,16 @@ class GroupDescendantsFinder end def execute - # The children array might be extended with the ancestors of projects when - # filtering. In that case, take the maximum so the array does not get limited - # Otherwise, allow paginating through all results + # The children array might be extended with the ancestors of projects and + # subgroups when filtering. In that case, take the maximum so the array does + # not get limited otherwise, allow paginating through all results. # all_required_elements = children - all_required_elements |= ancestors_for_projects if params[:filter] + if params[:filter] + all_required_elements |= ancestors_of_filtered_subgroups + all_required_elements |= ancestors_of_filtered_projects + end + total_count = [all_required_elements.size, paginator.total_count].max Kaminari.paginate_array(all_required_elements, total_count: total_count) @@ -49,8 +53,11 @@ class GroupDescendantsFinder end def paginator - @paginator ||= Gitlab::MultiCollectionPaginator.new(subgroups, projects, - per_page: params[:per_page]) + @paginator ||= Gitlab::MultiCollectionPaginator.new( + subgroups, + projects.with_route, + per_page: params[:per_page] + ) end def direct_child_groups @@ -94,15 +101,21 @@ class GroupDescendantsFinder # # So when searching 'project', on the 'subgroup' page we want to preload # 'nested-group' but not 'subgroup' or 'root' - def ancestors_for_groups(base_for_ancestors) - Gitlab::GroupHierarchy.new(base_for_ancestors) + def ancestors_of_groups(base_for_ancestors) + group_ids = base_for_ancestors.except(:select, :sort).select(:id) + Gitlab::GroupHierarchy.new(Group.where(id: group_ids)) .base_and_ancestors(upto: parent_group.id) end - def ancestors_for_projects + def ancestors_of_filtered_projects projects_to_load_ancestors_of = projects.where.not(namespace: parent_group) groups_to_load_ancestors_of = Group.where(id: projects_to_load_ancestors_of.select(:namespace_id)) - ancestors_for_groups(groups_to_load_ancestors_of) + ancestors_of_groups(groups_to_load_ancestors_of) + .with_selects_for_list(archived: params[:archived]) + end + + def ancestors_of_filtered_subgroups + ancestors_of_groups(subgroups) .with_selects_for_list(archived: params[:archived]) end @@ -112,7 +125,7 @@ class GroupDescendantsFinder # When filtering subgroups, we want to find all matches withing the tree of # descendants to show to the user groups = if params[:filter] - ancestors_for_groups(subgroups_matching_filter) + subgroups_matching_filter else direct_child_groups end @@ -121,8 +134,10 @@ class GroupDescendantsFinder end def direct_child_projects - GroupProjectsFinder.new(group: parent_group, current_user: current_user, params: params) - .execute + GroupProjectsFinder.new(group: parent_group, + current_user: current_user, + options: { only_owned: true }, + params: params).execute end # Finds all projects nested under `parent_group` or any of its descendant diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 45f7d29eb05..8ef561d90e6 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -201,6 +201,7 @@ module ApplicationSettingsHelper :metrics_sample_interval, :metrics_timeout, :password_authentication_enabled_for_web, + :password_authentication_enabled_for_git, :performance_bar_allowed_group_id, :performance_bar_enabled, :plantuml_enabled, diff --git a/app/models/project.rb b/app/models/project.rb index 5d0e61ecaa7..0570bbc8ee3 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1032,6 +1032,8 @@ class Project < ActiveRecord::Base end def fork_source + return nil unless forked? + forked_from_project || fork_network&.root_project end @@ -1438,7 +1440,7 @@ class Project < ActiveRecord::Base # We'd need to keep track of project full path otherwise directory tree # created with hashed storage enabled cannot be usefully imported using # the import rake task. - repository.rugged.config['gitlab.fullpath'] = gl_full_path + repository.raw_repository.write_config(full_path: gl_full_path) rescue Gitlab::Git::Repository::NoRepository => e Rails.logger.error("Error writing to .git/config for project #{full_path} (#{id}): #{e.message}.") nil diff --git a/app/models/repository.rb b/app/models/repository.rb index b4bc0f87458..73c4899cb9b 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -259,15 +259,7 @@ class Repository return if kept_around?(sha) # This will still fail if the file is corrupted (e.g. 0 bytes) - begin - raw_repository.write_ref(keep_around_ref_name(sha), sha, shell: false) - rescue Rugged::ReferenceError => ex - Rails.logger.error "Unable to create #{REF_KEEP_AROUND} reference for repository #{path}: #{ex}" - rescue Rugged::OSError => ex - raise unless ex.message =~ /Failed to create locked file/ && ex.message =~ /File exists/ - - Rails.logger.error "Unable to create #{REF_KEEP_AROUND} reference for repository #{path}: #{ex}" - end + raw_repository.write_ref(keep_around_ref_name(sha), sha, shell: false) end def kept_around?(sha) diff --git a/app/models/user.rb b/app/models/user.rb index 09aa5a7b318..9403da98268 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -318,6 +318,8 @@ class User < ActiveRecord::Base # # Returns an ActiveRecord::Relation. def search(query) + return none if query.blank? + query = query.downcase order = <<~SQL @@ -341,6 +343,8 @@ class User < ActiveRecord::Base # This method uses ILIKE on PostgreSQL and LIKE on MySQL. def search_with_secondary_emails(query) + return none if query.blank? + query = query.downcase email_table = Email.arel_table diff --git a/app/views/projects/commits/_commit.atom.builder b/app/views/projects/commits/_commit.atom.builder index d806acdda13..04914888763 100644 --- a/app/views/projects/commits/_commit.atom.builder +++ b/app/views/projects/commits/_commit.atom.builder @@ -1,7 +1,7 @@ xml.entry do xml.id project_commit_url(@project, id: commit.id) xml.link href: project_commit_url(@project, id: commit.id) - xml.title truncate(commit.title, length: 80) + xml.title truncate(commit.title, length: 80, escape: false) xml.updated commit.committed_date.xmlschema xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(commit.author_email)) @@ -10,5 +10,5 @@ xml.entry do xml.email commit.author_email end - xml.summary markdown(commit.description, pipeline: :single_line) + xml.summary markdown(commit.description, pipeline: :single_line), type: 'html' end diff --git a/app/views/projects/jobs/_empty_state.html.haml b/app/views/projects/jobs/_empty_state.html.haml index 311934d9c33..c66313bdbf3 100644 --- a/app/views/projects/jobs/_empty_state.html.haml +++ b/app/views/projects/jobs/_empty_state.html.haml @@ -1,7 +1,7 @@ - illustration = local_assigns.fetch(:illustration) - illustration_size = local_assigns.fetch(:illustration_size) - title = local_assigns.fetch(:title) -- content = local_assigns.fetch(:content, nil) +- content = local_assigns.fetch(:content) - action = local_assigns.fetch(:action, nil) .row.empty-state @@ -11,8 +11,7 @@ .col-xs-12 .text-content %h4.text-center= title - - if content - %p= content + %p= content - if action .text-center = action diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml index 1e6d6f67e66..eb0773f2d4e 100644 --- a/app/views/projects/jobs/show.html.haml +++ b/app/views/projects/jobs/show.html.haml @@ -95,12 +95,18 @@ title: _('This job requires a manual action'), content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments'), action: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), method: :post, class: 'btn btn-primary', title: _('Trigger this manual action') ) + - elsif @build.created? + = render 'empty_state', + illustration: 'illustrations/job_not_triggered.svg', + illustration_size: 'svg-306', + title: _('This job has not been triggered yet'), + content: _('This job depends on upstream jobs that need to succeed in order for this job to be triggered') - else = render 'empty_state', illustration: 'illustrations/job_not_triggered.svg', illustration_size: 'svg-306', - title: _('This job has not been triggered yet') - + title: _('This job has not started yet'), + content: _('This job is in pending state and is waiting to be picked by a runner') = render "sidebar" .js-build-options{ data: javascript_build_options } diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index d1ecef39475..05539dfed7c 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -24,6 +24,8 @@ .add-to-tree-dropdown %ul.dropdown-menu - if can_edit_tree? + %li.dropdown-header + #{ _('This directory') } %li = link_to project_new_blob_path(@project, @id) do #{ _('New file') } @@ -60,6 +62,8 @@ #{ _('New directory') } %li.divider + %li.dropdown-header + #{ _('This repository') } %li = link_to new_project_branch_path(@project) do #{ _('New branch') } diff --git a/bin/profile-url b/bin/profile-url new file mode 100755 index 00000000000..d8d09641624 --- /dev/null +++ b/bin/profile-url @@ -0,0 +1,57 @@ +#!/usr/bin/env ruby +require 'optparse' + +options = {} + +opt_parser = OptionParser.new do |opt| + opt.banner = <<DOCSTRING +Profile a URL on this GitLab instance. + +Usage: + #{__FILE__} url --output=<profile-html> --sql=<sql-log> [--user=<user>] [--post=<post-data>] + +Example: + #{__FILE__} /dashboard/issues --output=dashboard-profile.html --sql=dashboard.log --user=root +DOCSTRING + opt.separator '' + opt.separator 'Options:' + + opt.on('-o', '--output=/tmp/profile.html', 'profile output filename') do |output| + options[:profile_output] = output + end + + opt.on('-s', '--sql=/tmp/profile_sql.txt', 'SQL output filename') do |sql| + options[:sql_output] = sql + end + + opt.on('-u', '--user=root', 'User to authenticate as') do |username| + options[:username] = username + end + + opt.on('-p', "--post='user=john&pass=test'", 'Send HTTP POST data') do |post_data| + options[:post_data] = post_data + end +end + +opt_parser.parse! +options[:url] = ARGV[0] + +if options[:url].nil? || + options[:profile_output].nil? || + options[:sql_output].nil? + puts opt_parser + exit +end + +require File.expand_path('../config/environment', File.dirname(__FILE__)) + +result = Gitlab::Profiler.profile(options[:url], + logger: Logger.new(options[:sql_output]), + post_data: options[:post_data], + user: User.find_by_username(options[:username]), + private_token: ENV['PRIVATE_TOKEN']) + +printer = RubyProf::CallStackPrinter.new(result) +file = File.open(options[:profile_output], 'w') +printer.print(file) +file.close diff --git a/changelogs/unreleased/13695-order-contributors-in-api.yml b/changelogs/unreleased/13695-order-contributors-in-api.yml deleted file mode 100644 index 26bf8650a4a..00000000000 --- a/changelogs/unreleased/13695-order-contributors-in-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds ordering to projects contributors in API -merge_request: 15469 -author: Jacopo Beschi @jacopo-beschi -type: added diff --git a/changelogs/unreleased/15832-fix-access-level-update-for-requesters.yml b/changelogs/unreleased/15832-fix-access-level-update-for-requesters.yml deleted file mode 100644 index 9d6c958cb3e..00000000000 --- a/changelogs/unreleased/15832-fix-access-level-update-for-requesters.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix error that was preventing users to change the access level of access requests for Groups or Projects -merge_request: 15832 -author: -type: fixed diff --git a/changelogs/unreleased/15922-validate-file-status-when-commiting-multiple-files.yml b/changelogs/unreleased/15922-validate-file-status-when-commiting-multiple-files.yml deleted file mode 100644 index db2bd6e692b..00000000000 --- a/changelogs/unreleased/15922-validate-file-status-when-commiting-multiple-files.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Validate file status when commiting multiple files' -merge_request: 15922 -author: -type: added diff --git a/changelogs/unreleased/15955-improve-search-query.yml b/changelogs/unreleased/15955-improve-search-query.yml deleted file mode 100644 index 80cb8af617f..00000000000 --- a/changelogs/unreleased/15955-improve-search-query.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve search query for merge requests. -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/16036-ignore-lost-found-folder-during-backup-on-a-volume.yml b/changelogs/unreleased/16036-ignore-lost-found-folder-during-backup-on-a-volume.yml deleted file mode 100644 index 833650559a3..00000000000 --- a/changelogs/unreleased/16036-ignore-lost-found-folder-during-backup-on-a-volume.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Ignore lost+found folder during backup on a volume" -merge_request: 16036 -author: Julien Millau -type: fixed
\ No newline at end of file diff --git a/changelogs/unreleased/16117-improve-search-for-issues.yml b/changelogs/unreleased/16117-improve-search-for-issues.yml deleted file mode 100644 index 92d5820ddd2..00000000000 --- a/changelogs/unreleased/16117-improve-search-for-issues.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve search query for issues. -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/20035-pause-resume-runners.yml b/changelogs/unreleased/20035-pause-resume-runners.yml deleted file mode 100644 index 98757e60683..00000000000 --- a/changelogs/unreleased/20035-pause-resume-runners.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add pause/resume button to project runners -merge_request: 16032 -author: Mario de la Ossa -type: added diff --git a/changelogs/unreleased/24347-dont-post-system-note-when-branch-creation-fails.yml b/changelogs/unreleased/24347-dont-post-system-note-when-branch-creation-fails.yml deleted file mode 100644 index 61153ad4f1a..00000000000 --- a/changelogs/unreleased/24347-dont-post-system-note-when-branch-creation-fails.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix when branch creation fails don't post system note -merge_request: -author: Mateusz Bajorski -type: fixed diff --git a/changelogs/unreleased/25317-prioritize-author-date-over-commit.yml b/changelogs/unreleased/25317-prioritize-author-date-over-commit.yml deleted file mode 100644 index a5f6d316a7d..00000000000 --- a/changelogs/unreleased/25317-prioritize-author-date-over-commit.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show authored date rather than committed date on the commit list -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/28004-consider-refactoring-member-view-by-using-presenter.yml b/changelogs/unreleased/28004-consider-refactoring-member-view-by-using-presenter.yml deleted file mode 100644 index 0e91d4ae403..00000000000 --- a/changelogs/unreleased/28004-consider-refactoring-member-view-by-using-presenter.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Refactor member view using a Presenter -merge_request: 9645 -author: TM Lee diff --git a/changelogs/unreleased/31995-project-limit-default-fix.yml b/changelogs/unreleased/31995-project-limit-default-fix.yml deleted file mode 100644 index 4f25eb34b45..00000000000 --- a/changelogs/unreleased/31995-project-limit-default-fix.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: User#projects_limit remove DB default and added NOT NULL constraint -merge_request: 16165 -author: Mario de la Ossa -type: fixed diff --git a/changelogs/unreleased/32364-updating-slack-notification-not-working-by-api.yml b/changelogs/unreleased/32364-updating-slack-notification-not-working-by-api.yml deleted file mode 100644 index e3fae55c6f0..00000000000 --- a/changelogs/unreleased/32364-updating-slack-notification-not-working-by-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Support new chat notifications parameters in Services API -merge_request: 11435 -author: -type: added diff --git a/changelogs/unreleased/33028-event-tag-links.yml b/changelogs/unreleased/33028-event-tag-links.yml deleted file mode 100644 index 1d674200dcd..00000000000 --- a/changelogs/unreleased/33028-event-tag-links.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix tags in the Activity tab not being clickable -merge_request: 15996 -author: Mario de la Ossa -type: fixed diff --git a/changelogs/unreleased/33609-hide-pagination.yml b/changelogs/unreleased/33609-hide-pagination.yml deleted file mode 100644 index 3586b091cb1..00000000000 --- a/changelogs/unreleased/33609-hide-pagination.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Disable Vue pagination when only one page of content is available -merge_request: 15999 -author: Mario de la Ossa -type: fixed diff --git a/changelogs/unreleased/33926-update-issuable-icons.yml b/changelogs/unreleased/33926-update-issuable-icons.yml deleted file mode 100644 index 87076dde545..00000000000 --- a/changelogs/unreleased/33926-update-issuable-icons.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update issuable status icons -merge_request: 15898 -author: -type: changed diff --git a/changelogs/unreleased/34534-switch-to-axios.yml b/changelogs/unreleased/34534-switch-to-axios.yml deleted file mode 100644 index 1200272c9eb..00000000000 --- a/changelogs/unreleased/34534-switch-to-axios.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix some POST/DELETE requests in IE by switching some bundles to Axios for Ajax requests -merge_request: 15951 -author: -type: fixed diff --git a/changelogs/unreleased/36020-private-npm-modules.yml b/changelogs/unreleased/36020-private-npm-modules.yml deleted file mode 100644 index 5c2585a602e..00000000000 --- a/changelogs/unreleased/36020-private-npm-modules.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Do not generate NPM links for private NPM modules in blob view -merge_request: 16002 -author: Mario de la Ossa -type: added diff --git a/changelogs/unreleased/36669-default-mr-title-with-external-issues.yml b/changelogs/unreleased/36669-default-mr-title-with-external-issues.yml deleted file mode 100644 index 6af9ac4b099..00000000000 --- a/changelogs/unreleased/36669-default-mr-title-with-external-issues.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Default merge request title is set correctly again when external issue tracker is activated -merge_request: 16356 -author: Ben305 -type: fixed diff --git a/changelogs/unreleased/36782-replace-team-user-role-with-add_role-user-in-specs.yml b/changelogs/unreleased/36782-replace-team-user-role-with-add_role-user-in-specs.yml deleted file mode 100644 index 8773ac73a75..00000000000 --- a/changelogs/unreleased/36782-replace-team-user-role-with-add_role-user-in-specs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Replace '.team << [user, role]' with 'add_role(user)' in specs -merge_request: 16069 -author: "@blackst0ne" -type: other diff --git a/changelogs/unreleased/36958-enable-ordering-projects-subgroups-by-name.yml b/changelogs/unreleased/36958-enable-ordering-projects-subgroups-by-name.yml deleted file mode 100644 index 8348e3e8ceb..00000000000 --- a/changelogs/unreleased/36958-enable-ordering-projects-subgroups-by-name.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enable ordering of groups and their children by name -merge_request: -author: -type: added diff --git a/changelogs/unreleased/37843-ci-trace-ansi-colours-256-bold-have-no-css-due-wrongly-ansi2html-light-color-variant-conversion-feature.yml b/changelogs/unreleased/37843-ci-trace-ansi-colours-256-bold-have-no-css-due-wrongly-ansi2html-light-color-variant-conversion-feature.yml deleted file mode 100644 index abf98cd2af4..00000000000 --- a/changelogs/unreleased/37843-ci-trace-ansi-colours-256-bold-have-no-css-due-wrongly-ansi2html-light-color-variant-conversion-feature.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix ANSI 256 bold colors in pipelines job output -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/38019-hide-runner-token.yml b/changelogs/unreleased/38019-hide-runner-token.yml deleted file mode 100644 index 11ae0a685ef..00000000000 --- a/changelogs/unreleased/38019-hide-runner-token.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Hide runner token in CI/CD settings page -merge_request: -author: -type: added diff --git a/changelogs/unreleased/38030-add-graph-value-to-hover.yml b/changelogs/unreleased/38030-add-graph-value-to-hover.yml deleted file mode 100644 index 233db2b19c9..00000000000 --- a/changelogs/unreleased/38030-add-graph-value-to-hover.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Display graph values on hover within monitoring page -merge_request: 16261 -author: -type: changed diff --git a/changelogs/unreleased/38145_ux_issues_in_system_info_page.yml b/changelogs/unreleased/38145_ux_issues_in_system_info_page.yml deleted file mode 100644 index d2358750518..00000000000 --- a/changelogs/unreleased/38145_ux_issues_in_system_info_page.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixes the wording of headers in system info page -merge_request: 15802 -author: Gilbert Roulot -type: fixed diff --git a/changelogs/unreleased/38239-update-toggle-design.yml b/changelogs/unreleased/38239-update-toggle-design.yml deleted file mode 100644 index 4d9034e8515..00000000000 --- a/changelogs/unreleased/38239-update-toggle-design.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update feature toggle design to use icons and make it i18n friendly -merge_request: 15904 -author: -type: changed diff --git a/changelogs/unreleased/38318-search-merge-requests-with-api.yml b/changelogs/unreleased/38318-search-merge-requests-with-api.yml deleted file mode 100644 index d8b2f1f25c8..00000000000 --- a/changelogs/unreleased/38318-search-merge-requests-with-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add optional search param for Merge Requests API -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/38541-cancel-alignment.yml b/changelogs/unreleased/38541-cancel-alignment.yml deleted file mode 100644 index c6d5136dd57..00000000000 --- a/changelogs/unreleased/38541-cancel-alignment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: fix button alignment on MWPS component -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/38596-fix-backspace-visual-token-clearing.yml b/changelogs/unreleased/38596-fix-backspace-visual-token-clearing.yml deleted file mode 100644 index 4a9d0b66a8c..00000000000 --- a/changelogs/unreleased/38596-fix-backspace-visual-token-clearing.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Clears visual token on second backspace -merge_request: -author: Martin Wortschack -type: fixed diff --git a/changelogs/unreleased/38893-banzai-upload-filter-relative-urls.yml b/changelogs/unreleased/38893-banzai-upload-filter-relative-urls.yml deleted file mode 100644 index 9ab0a0159e9..00000000000 --- a/changelogs/unreleased/38893-banzai-upload-filter-relative-urls.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use relative URLs when linking to uploaded files -merge_request: 15751 -author: -type: other diff --git a/changelogs/unreleased/39246-fork-and-import-jobs-should-only-be-marked-as-failed-when-the-number-of-retries-was-exhausted.yml b/changelogs/unreleased/39246-fork-and-import-jobs-should-only-be-marked-as-failed-when-the-number-of-retries-was-exhausted.yml deleted file mode 100644 index ce238a2c79f..00000000000 --- a/changelogs/unreleased/39246-fork-and-import-jobs-should-only-be-marked-as-failed-when-the-number-of-retries-was-exhausted.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Only mark import and fork jobs as failed once all Sidekiq retries get exhausted -merge_request: 15844 -author: -type: changed diff --git a/changelogs/unreleased/39298-list-of-avatars-2.yml b/changelogs/unreleased/39298-list-of-avatars-2.yml deleted file mode 100644 index e2095561c0e..00000000000 --- a/changelogs/unreleased/39298-list-of-avatars-2.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: List of avatars should never show +1 -merge_request: 15972 -author: Jacopo Beschi @jacopo-beschi -type: added diff --git a/changelogs/unreleased/39608-comment-on-image-discussions-tab-alignment.yml b/changelogs/unreleased/39608-comment-on-image-discussions-tab-alignment.yml deleted file mode 100644 index 5021fe88caf..00000000000 --- a/changelogs/unreleased/39608-comment-on-image-discussions-tab-alignment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update comment on image cursor and icons -merge_request: 15760 -author: -type: fixed diff --git a/changelogs/unreleased/3968-protected-branch-is-not-set-for-default-branch-on-import.yml b/changelogs/unreleased/3968-protected-branch-is-not-set-for-default-branch-on-import.yml deleted file mode 100644 index e972ac6d54a..00000000000 --- a/changelogs/unreleased/3968-protected-branch-is-not-set-for-default-branch-on-import.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Protected branch is now created for default branch on import -merge_request: 16198 -author: -type: fixed diff --git a/changelogs/unreleased/39957-redirect-to-gpc-page-if-users-try-to-create-a-cluster-but-the-account-is-not-enabled.yml b/changelogs/unreleased/39957-redirect-to-gpc-page-if-users-try-to-create-a-cluster-but-the-account-is-not-enabled.yml deleted file mode 100644 index d8fd1f14bd4..00000000000 --- a/changelogs/unreleased/39957-redirect-to-gpc-page-if-users-try-to-create-a-cluster-but-the-account-is-not-enabled.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Implement checking GCP project billing status in cluster creation form. -merge_request: 15665 -author: -type: changed diff --git a/changelogs/unreleased/40029-better-error-handling-on-issuable-templates.yml b/changelogs/unreleased/40029-better-error-handling-on-issuable-templates.yml new file mode 100644 index 00000000000..519f411d642 --- /dev/null +++ b/changelogs/unreleased/40029-better-error-handling-on-issuable-templates.yml @@ -0,0 +1,5 @@ +--- +title: Stop loading spinner on error of issuable templates +merge_request: 16600 +author: Takuya Noguchi +type: fixed diff --git a/changelogs/unreleased/40031-include-assset_sync-gem.yml b/changelogs/unreleased/40031-include-assset_sync-gem.yml deleted file mode 100644 index 93ce565b32c..00000000000 --- a/changelogs/unreleased/40031-include-assset_sync-gem.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add assets_sync gem to Gemfile -merge_request: 15734 -author: -type: added diff --git a/changelogs/unreleased/40040-decouple-multi-file-editor-from-file-list.yml b/changelogs/unreleased/40040-decouple-multi-file-editor-from-file-list.yml deleted file mode 100644 index e2fade2bfd9..00000000000 --- a/changelogs/unreleased/40040-decouple-multi-file-editor-from-file-list.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds the multi file editor as a new beta feature -merge_request: 15430 -author: -type: feature diff --git a/changelogs/unreleased/40063-markdown-editor-improvements.yml b/changelogs/unreleased/40063-markdown-editor-improvements.yml deleted file mode 100644 index fa2f09408b4..00000000000 --- a/changelogs/unreleased/40063-markdown-editor-improvements.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Hide markdown toolbar in preview mode -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/40190-fix-slash-commands-dropdown-description-mis-alignement-on-firefox.yml b/changelogs/unreleased/40190-fix-slash-commands-dropdown-description-mis-alignement-on-firefox.yml deleted file mode 100644 index 71a606ff607..00000000000 --- a/changelogs/unreleased/40190-fix-slash-commands-dropdown-description-mis-alignement-on-firefox.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Fix slash commands dropdown description mis-alignment on Firefox" -merge_request: 16125 -author: Maurizio De Santis -type: fixed diff --git a/changelogs/unreleased/40228-verify-integrity-of-repositories.yml b/changelogs/unreleased/40228-verify-integrity-of-repositories.yml deleted file mode 100644 index 261d48652db..00000000000 --- a/changelogs/unreleased/40228-verify-integrity-of-repositories.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix gitlab-rake gitlab:import:repos import schedule -merge_request: 15931 -author: -type: fixed diff --git a/changelogs/unreleased/40274-user-settings-breadcrumbs.yml b/changelogs/unreleased/40274-user-settings-breadcrumbs.yml deleted file mode 100644 index 1f381668aca..00000000000 --- a/changelogs/unreleased/40274-user-settings-breadcrumbs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix breadcrumbs in User Settings -merge_request: 16172 -author: rfwatson -type: fixed diff --git a/changelogs/unreleased/40301-rebase.yml b/changelogs/unreleased/40301-rebase.yml deleted file mode 100644 index 1c0fc0cd8ae..00000000000 --- a/changelogs/unreleased/40301-rebase.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow user to rebase merge requests. -merge_request: -author: -type: added diff --git a/changelogs/unreleased/40418-migrate-existing-data-from-kubernetesservice-to-clusters-platforms-kubernetes.yml b/changelogs/unreleased/40418-migrate-existing-data-from-kubernetesservice-to-clusters-platforms-kubernetes.yml deleted file mode 100644 index 5e158d831a6..00000000000 --- a/changelogs/unreleased/40418-migrate-existing-data-from-kubernetesservice-to-clusters-platforms-kubernetes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Migrate existing data from KubernetesService to Clusters::Platforms::Kubernetes -merge_request: 15589 -author: -type: changed diff --git a/changelogs/unreleased/40453-fix-api-endpoints-to-edit-wiki-pages-where-project-belongs-to-a-group.yml b/changelogs/unreleased/40453-fix-api-endpoints-to-edit-wiki-pages-where-project-belongs-to-a-group.yml deleted file mode 100644 index 30917098a95..00000000000 --- a/changelogs/unreleased/40453-fix-api-endpoints-to-edit-wiki-pages-where-project-belongs-to-a-group.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix API endpoints to edit wiki pages where project belongs to a group -merge_request: 16170 -author: -type: fixed diff --git a/changelogs/unreleased/40509_sorting_tags_api.yml b/changelogs/unreleased/40509_sorting_tags_api.yml deleted file mode 100644 index 38b198d0fe3..00000000000 --- a/changelogs/unreleased/40509_sorting_tags_api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: add support for sorting in tags api -merge_request: 15772 -author: haseebeqx -type: added diff --git a/changelogs/unreleased/40533-groups-tree-updates.yml b/changelogs/unreleased/40533-groups-tree-updates.yml deleted file mode 100644 index 1bc0aa90f9e..00000000000 --- a/changelogs/unreleased/40533-groups-tree-updates.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Update groups tree to use GitLab SVG icons, add last updated at information - for projects -merge_request: 15980 -author: -type: changed diff --git a/changelogs/unreleased/40549-render-emoj-in-groups-overview.yml b/changelogs/unreleased/40549-render-emoj-in-groups-overview.yml deleted file mode 100644 index 9b2f58df440..00000000000 --- a/changelogs/unreleased/40549-render-emoj-in-groups-overview.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Rendering of emoji's in Group-Overview -merge_request: 16098 -author: Jacopo Beschi @jacopo-beschi -type: added diff --git a/changelogs/unreleased/40612-cannot-change-project-visibility-from-private-even-when-owner.yml b/changelogs/unreleased/40612-cannot-change-project-visibility-from-private-even-when-owner.yml new file mode 100644 index 00000000000..96bb59d303c --- /dev/null +++ b/changelogs/unreleased/40612-cannot-change-project-visibility-from-private-even-when-owner.yml @@ -0,0 +1,6 @@ +--- +title: Fix bug in which projects with forks could not change visibility settings from + Private to Public +merge_request: 16595 +author: +type: fixed diff --git a/changelogs/unreleased/40622-use-left-right-and-max-count.yml b/changelogs/unreleased/40622-use-left-right-and-max-count.yml deleted file mode 100644 index c4c8f271cbe..00000000000 --- a/changelogs/unreleased/40622-use-left-right-and-max-count.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Improve the performance for counting diverging commits. Show 999+ - if it is more than 1000 commits -merge_request: 15963 -author: -type: performance diff --git a/changelogs/unreleased/40780-choose-file.yml b/changelogs/unreleased/40780-choose-file.yml deleted file mode 100644 index 73e59dfcce8..00000000000 --- a/changelogs/unreleased/40780-choose-file.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update Browse file to Choose file in all occurences -merge_request: -author: -type: other diff --git a/changelogs/unreleased/40871-todo-notification-count-shows-notification-without-having-a-todo.yml b/changelogs/unreleased/40871-todo-notification-count-shows-notification-without-having-a-todo.yml deleted file mode 100644 index ee196629def..00000000000 --- a/changelogs/unreleased/40871-todo-notification-count-shows-notification-without-having-a-todo.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reset todo counters when the target is deleted -merge_request: 15807 -author: -type: fixed diff --git a/changelogs/unreleased/40895-fix-frequent-projects-stale-path.yml b/changelogs/unreleased/40895-fix-frequent-projects-stale-path.yml deleted file mode 100644 index 485133b46a7..00000000000 --- a/changelogs/unreleased/40895-fix-frequent-projects-stale-path.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use relative URL for projects to avoid storing domains -merge_request: 15876 -author: -type: fixed diff --git a/changelogs/unreleased/41016-import-gitlab-shell-projects.yml b/changelogs/unreleased/41016-import-gitlab-shell-projects.yml deleted file mode 100644 index 47a9e9c3eec..00000000000 --- a/changelogs/unreleased/41016-import-gitlab-shell-projects.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Import some code and functionality from gitlab-shell to improve subprocess - handling -merge_request: -author: -type: other diff --git a/changelogs/unreleased/41053-extend-cluster-applications-to-allow-install-to-prometheus.yml b/changelogs/unreleased/41053-extend-cluster-applications-to-allow-install-to-prometheus.yml deleted file mode 100644 index ffb79d7d79f..00000000000 --- a/changelogs/unreleased/41053-extend-cluster-applications-to-allow-install-to-prometheus.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add Prometheus to available Cluster applications -merge_request: 15895 -author: -type: added diff --git a/changelogs/unreleased/41054-disable-creation-of-new-kubernetes-integrations.yml b/changelogs/unreleased/41054-disable-creation-of-new-kubernetes-integrations.yml deleted file mode 100644 index b960b14624c..00000000000 --- a/changelogs/unreleased/41054-disable-creation-of-new-kubernetes-integrations.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Disable creation of new Kubernetes Integrations unless they're active or created - from template -merge_request: 41054 -author: -type: added diff --git a/changelogs/unreleased/41056-create-cluster-from-kubernetes-integration-application-template.yml b/changelogs/unreleased/41056-create-cluster-from-kubernetes-integration-application-template.yml deleted file mode 100644 index 2dd6fc5f1b5..00000000000 --- a/changelogs/unreleased/41056-create-cluster-from-kubernetes-integration-application-template.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow automatic creation of Kubernetes Integration from template -merge_request: 16104 -author: -type: added diff --git a/changelogs/unreleased/41208-commit-atom-feeds-double-escaped.yml b/changelogs/unreleased/41208-commit-atom-feeds-double-escaped.yml new file mode 100644 index 00000000000..76d3c6eda24 --- /dev/null +++ b/changelogs/unreleased/41208-commit-atom-feeds-double-escaped.yml @@ -0,0 +1,5 @@ +--- +title: Allows html text in commits atom feed +merge_request: 16603 +author: Jacopo Beschi @jacopo-beschi +type: fixed diff --git a/changelogs/unreleased/41244-issue-board-shortcut-working-while-no-issues.yml b/changelogs/unreleased/41244-issue-board-shortcut-working-while-no-issues.yml deleted file mode 100644 index b2c3a86551b..00000000000 --- a/changelogs/unreleased/41244-issue-board-shortcut-working-while-no-issues.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: disables shortcut to issue boards when issues are not enabled -merge_request: 16020 -author: Christiaan Van den Poel -type: fixed diff --git a/changelogs/unreleased/41249-clearing-the-cache.yml b/changelogs/unreleased/41249-clearing-the-cache.yml deleted file mode 100644 index 221589a1239..00000000000 --- a/changelogs/unreleased/41249-clearing-the-cache.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Implement project jobs cache reset -merge_request: 16067 -author: -type: added diff --git a/changelogs/unreleased/41268-bump-ruby-to-2-3-6.yml b/changelogs/unreleased/41268-bump-ruby-to-2-3-6.yml deleted file mode 100644 index 188a854ebee..00000000000 --- a/changelogs/unreleased/41268-bump-ruby-to-2-3-6.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade Ruby to 2.3.6 to include security patches -merge_request: 16016 -author: -type: security diff --git a/changelogs/unreleased/41424-gitlab-rake-gitlab-import-repos-schedules-an-import.yml b/changelogs/unreleased/41424-gitlab-rake-gitlab-import-repos-schedules-an-import.yml deleted file mode 100644 index b495754a5a8..00000000000 --- a/changelogs/unreleased/41424-gitlab-rake-gitlab-import-repos-schedules-an-import.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix gitlab-rake gitlab:import:repos import schedule -merge_request: 16115 -author: -type: fixed diff --git a/changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml b/changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml deleted file mode 100644 index f69116382f0..00000000000 --- a/changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix viewing merge request diffs where the underlying blobs are unavailable -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/41491-fix-nil-blob-name-error.yml b/changelogs/unreleased/41491-fix-nil-blob-name-error.yml deleted file mode 100644 index cf7e63ea46a..00000000000 --- a/changelogs/unreleased/41491-fix-nil-blob-name-error.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix 500 error when visiting a commit where the blobs do not exist -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/41673-blank-query-members-api.yml b/changelogs/unreleased/41673-blank-query-members-api.yml new file mode 100644 index 00000000000..677c5e250c8 --- /dev/null +++ b/changelogs/unreleased/41673-blank-query-members-api.yml @@ -0,0 +1,5 @@ +--- +title: Fix error on empty query for Members API +merge_request: 16235 +author: +type: fixed diff --git a/changelogs/unreleased/41727-target-branch-name.yml b/changelogs/unreleased/41727-target-branch-name.yml deleted file mode 100644 index aaedf6f1d12..00000000000 --- a/changelogs/unreleased/41727-target-branch-name.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Set target_branch to the ref branch when creating MR from issue -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/41754-update-scss-lint-to-0-56-0.yml b/changelogs/unreleased/41754-update-scss-lint-to-0-56-0.yml deleted file mode 100644 index b96dd376cec..00000000000 --- a/changelogs/unreleased/41754-update-scss-lint-to-0-56-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update scss-lint to 0.56.0 -merge_request: 16278 -author: Takuya Noguchi -type: other diff --git a/changelogs/unreleased/41789-fix-up-web-ide-user-preference-copy-and-buttons.yml b/changelogs/unreleased/41789-fix-up-web-ide-user-preference-copy-and-buttons.yml deleted file mode 100644 index fe87cd5cadb..00000000000 --- a/changelogs/unreleased/41789-fix-up-web-ide-user-preference-copy-and-buttons.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix web ide user preferences copy and buttons -merge_request: 41789 -author: -type: other diff --git a/changelogs/unreleased/41814-text-decoration-skip.yml b/changelogs/unreleased/41814-text-decoration-skip.yml new file mode 100644 index 00000000000..3e39d26be93 --- /dev/null +++ b/changelogs/unreleased/41814-text-decoration-skip.yml @@ -0,0 +1,5 @@ +--- +title: Improve readability of underlined links for dyslexic users +merge_request: +author: +type: other diff --git a/changelogs/unreleased/41874-closed-todo.yml b/changelogs/unreleased/41874-closed-todo.yml deleted file mode 100644 index 615bd011579..00000000000 --- a/changelogs/unreleased/41874-closed-todo.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix closed text for issues on Todos page -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/41882-respect-only-path-in-relative-link-filter.yml b/changelogs/unreleased/41882-respect-only-path-in-relative-link-filter.yml deleted file mode 100644 index d4b7ec6a3b5..00000000000 --- a/changelogs/unreleased/41882-respect-only-path-in-relative-link-filter.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Ensure that emails contain absolute, rather than relative, links to user uploads -merge_request: 16364 -author: -type: fixed diff --git a/changelogs/unreleased/42025-fix-issue-api.yml b/changelogs/unreleased/42025-fix-issue-api.yml deleted file mode 100644 index abb83bb2fad..00000000000 --- a/changelogs/unreleased/42025-fix-issue-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "[API] Fix creating issue when assignee_id is empty" -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/42031-fix-links-to-uploads-in-wikis.yml b/changelogs/unreleased/42031-fix-links-to-uploads-in-wikis.yml deleted file mode 100644 index 027cb414f23..00000000000 --- a/changelogs/unreleased/42031-fix-links-to-uploads-in-wikis.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix links to uploaded files on wiki pages -merge_request: 16499 -author: -type: fixed diff --git a/changelogs/unreleased/42046-fork-icon.yml b/changelogs/unreleased/42046-fork-icon.yml deleted file mode 100644 index def89ff7b08..00000000000 --- a/changelogs/unreleased/42046-fork-icon.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix giant fork icons on forks page -merge_request: 16474 -author: -type: fixed diff --git a/changelogs/unreleased/42206-permit-password-for-git-param.yml b/changelogs/unreleased/42206-permit-password-for-git-param.yml new file mode 100644 index 00000000000..563dd528ad5 --- /dev/null +++ b/changelogs/unreleased/42206-permit-password-for-git-param.yml @@ -0,0 +1,5 @@ +--- +title: Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController +merge_request: +author: +type: fixed diff --git a/changelogs/unreleased/42231-protected-branches-api-route-returns-404-for-branches-with-dots.yml b/changelogs/unreleased/42231-protected-branches-api-route-returns-404-for-branches-with-dots.yml new file mode 100644 index 00000000000..fbc589ea53d --- /dev/null +++ b/changelogs/unreleased/42231-protected-branches-api-route-returns-404-for-branches-with-dots.yml @@ -0,0 +1,5 @@ +--- +title: Fix protected branches API to accept name parameter with dot +merge_request: +author: +type: fixed diff --git a/changelogs/unreleased/ac-autodevopfix-kubectl-version.yml b/changelogs/unreleased/ac-autodevopfix-kubectl-version.yml deleted file mode 100644 index 0ceeb7ccee1..00000000000 --- a/changelogs/unreleased/ac-autodevopfix-kubectl-version.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Force Auto DevOps kubectl version to 1.8.6 -merge_request: 16218 -author: -type: fixed diff --git a/changelogs/unreleased/add-tcp-check-rake-task.yml b/changelogs/unreleased/add-tcp-check-rake-task.yml deleted file mode 100644 index a7c04bd0d55..00000000000 --- a/changelogs/unreleased/add-tcp-check-rake-task.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add a gitlab:tcp_check rake task -merge_request: 15759 -author: -type: added diff --git a/changelogs/unreleased/anchor-issue-references.yml b/changelogs/unreleased/anchor-issue-references.yml deleted file mode 100644 index 78896427417..00000000000 --- a/changelogs/unreleased/anchor-issue-references.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Fix false positive issue references in merge requests caused by header anchor - links. -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/api-domains-expose-project_id.yml b/changelogs/unreleased/api-domains-expose-project_id.yml deleted file mode 100644 index 22617ffe9b5..00000000000 --- a/changelogs/unreleased/api-domains-expose-project_id.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Expose project_id on /api/v4/pages/domains -merge_request: 16200 -author: Luc Didry -type: changed diff --git a/changelogs/unreleased/bump_mysql_gem.yml b/changelogs/unreleased/bump_mysql_gem.yml deleted file mode 100644 index 58166949d72..00000000000 --- a/changelogs/unreleased/bump_mysql_gem.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bump mysql2 gem version from 0.4.5 to 0.4.10 -merge_request: -author: asaparov -type: other diff --git a/changelogs/unreleased/bvl-fork-public-project-to-private-namespace.yml b/changelogs/unreleased/bvl-fork-public-project-to-private-namespace.yml deleted file mode 100644 index b802625943d..00000000000 --- a/changelogs/unreleased/bvl-fork-public-project-to-private-namespace.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow forking a public project to a private group -merge_request: 16050 -author: -type: changed diff --git a/changelogs/unreleased/bvl-parent-preloading.yml b/changelogs/unreleased/bvl-parent-preloading.yml new file mode 100644 index 00000000000..97c7bbb2a2a --- /dev/null +++ b/changelogs/unreleased/bvl-parent-preloading.yml @@ -0,0 +1,5 @@ +--- +title: Fix issues when rendering groups and their children +merge_request: 16584 +author: +type: fixed diff --git a/changelogs/unreleased/change-issues-closed-at-background-migration.yml b/changelogs/unreleased/change-issues-closed-at-background-migration.yml deleted file mode 100644 index 1c81c6a889e..00000000000 --- a/changelogs/unreleased/change-issues-closed-at-background-migration.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use a background migration for issues.closed_at -merge_request: -author: -type: other diff --git a/changelogs/unreleased/changes-dropdown-ellipsis.yml b/changelogs/unreleased/changes-dropdown-ellipsis.yml deleted file mode 100644 index 7e3f378cc33..00000000000 --- a/changelogs/unreleased/changes-dropdown-ellipsis.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed chanages dropdown ellipsis positioning -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/conditionally-eager-load-event-target-authors.yml b/changelogs/unreleased/conditionally-eager-load-event-target-authors.yml deleted file mode 100644 index a5f1a958fa8..00000000000 --- a/changelogs/unreleased/conditionally-eager-load-event-target-authors.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Eager load event target authors whenever possible -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/da-handle-hashed-storage-repos-using-repo-import-task.yml b/changelogs/unreleased/da-handle-hashed-storage-repos-using-repo-import-task.yml deleted file mode 100644 index 74a00d49ab3..00000000000 --- a/changelogs/unreleased/da-handle-hashed-storage-repos-using-repo-import-task.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Handle GitLab hashed storage repositories using the repo import task -merge_request: -author: -type: added diff --git a/changelogs/unreleased/delay-background-migrations.yml b/changelogs/unreleased/delay-background-migrations.yml deleted file mode 100644 index aa12591e7d2..00000000000 --- a/changelogs/unreleased/delay-background-migrations.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Run background migrations with a minimum interval -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/disable-pages-on-jobs.yml b/changelogs/unreleased/disable-pages-on-jobs.yml deleted file mode 100644 index 629768efce1..00000000000 --- a/changelogs/unreleased/disable-pages-on-jobs.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Use simple Next/Prev paging for jobs to avoid large count queries on arbitrarily - large sets of historical jobs -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/dm-diff-note-for-line-performance.yml b/changelogs/unreleased/dm-diff-note-for-line-performance.yml deleted file mode 100644 index cbc418ab103..00000000000 --- a/changelogs/unreleased/dm-diff-note-for-line-performance.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve performance of MR discussions on large diffs -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/docs-add-why-do-i-get-signed-out-authentication-section.yml b/changelogs/unreleased/docs-add-why-do-i-get-signed-out-authentication-section.yml deleted file mode 100644 index bc245880ed0..00000000000 --- a/changelogs/unreleased/docs-add-why-do-i-get-signed-out-authentication-section.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add docs for why you might be signed out when using the Remember me token -merge_request: 15756 -author: -type: other diff --git a/changelogs/unreleased/feat-add-section-headers-to-plus-button-dropdown.yml b/changelogs/unreleased/feat-add-section-headers-to-plus-button-dropdown.yml new file mode 100644 index 00000000000..3fce53bc941 --- /dev/null +++ b/changelogs/unreleased/feat-add-section-headers-to-plus-button-dropdown.yml @@ -0,0 +1,5 @@ +--- +title: Add section headers to plus button dropdown +merge_request: 16394 +author: George Tsiolis +type: added diff --git a/changelogs/unreleased/feature-40842-provide-oracles-webgate-cookies-to-jira-requests.yml b/changelogs/unreleased/feature-40842-provide-oracles-webgate-cookies-to-jira-requests.yml deleted file mode 100644 index d5ff5bc4627..00000000000 --- a/changelogs/unreleased/feature-40842-provide-oracles-webgate-cookies-to-jira-requests.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Provide additional cookies to JIRA service requests to allow Oracle WebGates - Basic Auth -merge_request: -author: Stanislaw Wozniak -type: changed diff --git a/changelogs/unreleased/feature-api_runners_online.yml b/changelogs/unreleased/feature-api_runners_online.yml deleted file mode 100644 index 08f4dd16f28..00000000000 --- a/changelogs/unreleased/feature-api_runners_online.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add online and status attribute to runner api entity -merge_request: 11750 -author: -type: added diff --git a/changelogs/unreleased/fix-abuse-reports-link-url.yml b/changelogs/unreleased/fix-abuse-reports-link-url.yml deleted file mode 100644 index 44c26f35984..00000000000 --- a/changelogs/unreleased/fix-abuse-reports-link-url.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix abuse reports link url in admin area navbar -merge_request: 16068 -author: megos -type: fixed diff --git a/changelogs/unreleased/fix-activity-inline-event-line-height.yml b/changelogs/unreleased/fix-activity-inline-event-line-height.yml deleted file mode 100644 index 85e69567499..00000000000 --- a/changelogs/unreleased/fix-activity-inline-event-line-height.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix activity inline event line height on mobile -merge_request: 16121 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/fix-create-mr-from-issue-with-template.yml b/changelogs/unreleased/fix-create-mr-from-issue-with-template.yml deleted file mode 100644 index 8668aa18669..00000000000 --- a/changelogs/unreleased/fix-create-mr-from-issue-with-template.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Execute quick actions (if present) when creating MR from issue -merge_request: 15810 -author: -type: fixed diff --git a/changelogs/unreleased/fix-docs-help-shortcut.yml b/changelogs/unreleased/fix-docs-help-shortcut.yml deleted file mode 100644 index 8c172e44160..00000000000 --- a/changelogs/unreleased/fix-docs-help-shortcut.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix shortcut links on help page -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/fix-gb-fix-import-export-restoring-associations.yml b/changelogs/unreleased/fix-gb-fix-import-export-restoring-associations.yml deleted file mode 100644 index 58df0024d61..00000000000 --- a/changelogs/unreleased/fix-gb-fix-import-export-restoring-associations.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Fix missing references to pipeline objects when restoring project with import/export - feature -merge_request: 16221 -author: -type: fixed diff --git a/changelogs/unreleased/fix-last-push-event-widget-layout.yml b/changelogs/unreleased/fix-last-push-event-widget-layout.yml deleted file mode 100644 index ba5b115ca19..00000000000 --- a/changelogs/unreleased/fix-last-push-event-widget-layout.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Last push event widget width for fixed layout -merge_request: 15862 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/fix-move-2fa-disable-button.yml b/changelogs/unreleased/fix-move-2fa-disable-button.yml deleted file mode 100644 index bac98ad5148..00000000000 --- a/changelogs/unreleased/fix-move-2fa-disable-button.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Move 2FA disable button -merge_request: 16177 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/fix-onion-skin-reenter.yml b/changelogs/unreleased/fix-onion-skin-reenter.yml deleted file mode 100644 index 66b12c037b0..00000000000 --- a/changelogs/unreleased/fix-onion-skin-reenter.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix onion-skin re-entering state -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/fix-postgresql-table-grant.yml b/changelogs/unreleased/fix-postgresql-table-grant.yml new file mode 100644 index 00000000000..1c6559f6f73 --- /dev/null +++ b/changelogs/unreleased/fix-postgresql-table-grant.yml @@ -0,0 +1,5 @@ +--- +title: Use has_table_privilege for TRIGGER on PostgreSQL +merge_request: +author: +type: fixed diff --git a/changelogs/unreleased/fix-profile-settings-content-width.yml b/changelogs/unreleased/fix-profile-settings-content-width.yml deleted file mode 100644 index bf164dc587d..00000000000 --- a/changelogs/unreleased/fix-profile-settings-content-width.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adjust content width for User Settings, GPG Keys -merge_request: 16093 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/fix-profile-settings-sidebar-heading.yml b/changelogs/unreleased/fix-profile-settings-sidebar-heading.yml deleted file mode 100644 index 75e0ea5612f..00000000000 --- a/changelogs/unreleased/fix-profile-settings-sidebar-heading.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Keep typographic hierarchy in User Settings -merge_request: 16090 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/fix-remove-unnecessary-sidebar-element-alignment.yml b/changelogs/unreleased/fix-remove-unnecessary-sidebar-element-alignment.yml deleted file mode 100644 index 24f6f62b934..00000000000 --- a/changelogs/unreleased/fix-remove-unnecessary-sidebar-element-alignment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove unnecessary sidebar element realignment -merge_request: 16159 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/fix_build_count_in_pipeline_success_maild.yml b/changelogs/unreleased/fix_build_count_in_pipeline_success_maild.yml deleted file mode 100644 index c39bba62271..00000000000 --- a/changelogs/unreleased/fix_build_count_in_pipeline_success_maild.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: fix build count in pipeline success mail -merge_request: 15827 -author: Christiaan Van den Poel -type: fixed diff --git a/changelogs/unreleased/fj-40053-error-500-members-list.yml b/changelogs/unreleased/fj-40053-error-500-members-list.yml deleted file mode 100644 index 8c82950bd41..00000000000 --- a/changelogs/unreleased/fj-40053-error-500-members-list.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixing error 500 when member exist but not the user -merge_request: 15970 -author: -type: fixed diff --git a/changelogs/unreleased/fj-40279-normalize-ldap-dn-api.yml b/changelogs/unreleased/fj-40279-normalize-ldap-dn-api.yml deleted file mode 100644 index 3fd8b0eb988..00000000000 --- a/changelogs/unreleased/fj-40279-normalize-ldap-dn-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Normalizing Identity extern_uid when saving the record -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/fj-41477-fix-bug-wiki-last-version.yml b/changelogs/unreleased/fj-41477-fix-bug-wiki-last-version.yml deleted file mode 100644 index e4b1343876a..00000000000 --- a/changelogs/unreleased/fj-41477-fix-bug-wiki-last-version.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixing bug when wiki last version -merge_request: 16197 -author: -type: fixed diff --git a/changelogs/unreleased/fj-41598-fixing-request-mime-type.yml b/changelogs/unreleased/fj-41598-fixing-request-mime-type.yml deleted file mode 100644 index 85e4d78b2df..00000000000 --- a/changelogs/unreleased/fj-41598-fixing-request-mime-type.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixing rack request mime type when using rack attack -merge_request: 16427 -author: -type: fixed diff --git a/changelogs/unreleased/fj-41681-add-param-disable-commit-stats-api.yml b/changelogs/unreleased/fj-41681-add-param-disable-commit-stats-api.yml deleted file mode 100644 index dca4dec224c..00000000000 --- a/changelogs/unreleased/fj-41681-add-param-disable-commit-stats-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added option to disable commits stats in the commit endpoint -merge_request: 16309 -author: -type: added diff --git a/changelogs/unreleased/gitaly-git-http-ssh.yml b/changelogs/unreleased/gitaly-git-http-ssh.yml new file mode 100644 index 00000000000..98812e92e2a --- /dev/null +++ b/changelogs/unreleased/gitaly-git-http-ssh.yml @@ -0,0 +1,6 @@ +--- +title: Default to Gitaly for 'git push' HTTP/SSH, and make Gitaly mandatory for SSH + pull +merge_request: 16586 +author: +type: other diff --git a/changelogs/unreleased/index-namespaces-lower-name.yml b/changelogs/unreleased/index-namespaces-lower-name.yml deleted file mode 100644 index ef08b6d6755..00000000000 --- a/changelogs/unreleased/index-namespaces-lower-name.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add index on namespaces lower(name) for UsersController#exists -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/issue-description-field-typo.yml b/changelogs/unreleased/issue-description-field-typo.yml deleted file mode 100644 index 9c4c179876d..00000000000 --- a/changelogs/unreleased/issue-description-field-typo.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed typo for issue description field declaration -merge_request: -author: Marcus Amargi -type: fixed diff --git a/changelogs/unreleased/issue_40500.yml b/changelogs/unreleased/issue_40500.yml deleted file mode 100644 index 35e8938fdad..00000000000 --- a/changelogs/unreleased/issue_40500.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix timeout when filtering issues by label -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/issues-40986-get-participants-from-issues-mr-api.yml b/changelogs/unreleased/issues-40986-get-participants-from-issues-mr-api.yml deleted file mode 100644 index 4cac87b0cdb..00000000000 --- a/changelogs/unreleased/issues-40986-get-participants-from-issues-mr-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'API: get participants from merge_requests & issues' -merge_request: 16187 -author: Brent Greeff -type: added diff --git a/changelogs/unreleased/jej-backport-authorized-keys-to-ce.yml b/changelogs/unreleased/jej-backport-authorized-keys-to-ce.yml deleted file mode 100644 index 4386c631f59..00000000000 --- a/changelogs/unreleased/jej-backport-authorized-keys-to-ce.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Backport fast database lookup of SSH authorized_keys from EE -merge_request: 16014 -author: -type: added diff --git a/changelogs/unreleased/jej-lfs-rev-list-handles-non-utf-paths-41627.yml b/changelogs/unreleased/jej-lfs-rev-list-handles-non-utf-paths-41627.yml deleted file mode 100644 index 24f18c07ac5..00000000000 --- a/changelogs/unreleased/jej-lfs-rev-list-handles-non-utf-paths-41627.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent RevList failing on non utf8 paths -merge_request: 16440 -author: -type: fixed diff --git a/changelogs/unreleased/jivl-activate-repo-cookie-preferences.yml b/changelogs/unreleased/jivl-activate-repo-cookie-preferences.yml deleted file mode 100644 index 778eaa84381..00000000000 --- a/changelogs/unreleased/jivl-activate-repo-cookie-preferences.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added option to user preferences to enable the multi file editor -merge_request: 16056 -author: -type: added diff --git a/changelogs/unreleased/jivl-fix-import-project-url-bug.yml b/changelogs/unreleased/jivl-fix-import-project-url-bug.yml deleted file mode 100644 index 0d97b9c9a53..00000000000 --- a/changelogs/unreleased/jivl-fix-import-project-url-bug.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix import project url not updating project name -merge_request: 16120 -author: -type: fixed diff --git a/changelogs/unreleased/jramsay-4012-i18n-compare.yml b/changelogs/unreleased/jramsay-4012-i18n-compare.yml deleted file mode 100644 index ff15724be39..00000000000 --- a/changelogs/unreleased/jramsay-4012-i18n-compare.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add i18n helpers to branch comparison view -merge_request: 16031 -author: James Ramsay -type: added diff --git a/changelogs/unreleased/jramsay-41590-add-readme-case.yml b/changelogs/unreleased/jramsay-41590-add-readme-case.yml deleted file mode 100644 index 37b2bd44e0e..00000000000 --- a/changelogs/unreleased/jramsay-41590-add-readme-case.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix inconsistent downcase of filenames in prefilled `Add` commit messages -merge_request: 16232 -author: James Ramsay -type: fixed diff --git a/changelogs/unreleased/ldap_username_attributes.yml b/changelogs/unreleased/ldap_username_attributes.yml deleted file mode 100644 index 89bbca58fc9..00000000000 --- a/changelogs/unreleased/ldap_username_attributes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Modify `LDAP::Person` to return username value based on attributes -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/lfs-badge.yml b/changelogs/unreleased/lfs-badge.yml deleted file mode 100644 index e4ed4d6741f..00000000000 --- a/changelogs/unreleased/lfs-badge.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added badge to tree & blob views to indicate LFS tracked files -merge_request: -author: -type: added diff --git a/changelogs/unreleased/mk-fix-permanent-redirect-validation.yml b/changelogs/unreleased/mk-fix-permanent-redirect-validation.yml deleted file mode 100644 index 153b2ccc25c..00000000000 --- a/changelogs/unreleased/mk-fix-permanent-redirect-validation.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent invalid Route path if path is unchanged -merge_request: 16397 -author: -type: fixed diff --git a/changelogs/unreleased/mk-no-op-delete-conflicting-redirects.yml b/changelogs/unreleased/mk-no-op-delete-conflicting-redirects.yml deleted file mode 100644 index 37fdb1df6df..00000000000 --- a/changelogs/unreleased/mk-no-op-delete-conflicting-redirects.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Prevent excessive DB load due to faulty DeleteConflictingRedirectRoutes background - migration -merge_request: 16205 -author: -type: fixed diff --git a/changelogs/unreleased/mr-status-box-update.yml b/changelogs/unreleased/mr-status-box-update.yml deleted file mode 100644 index 68265be16a1..00000000000 --- a/changelogs/unreleased/mr-status-box-update.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed merge request status badge not updating after merging -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/multiple-clusters-single-list.yml b/changelogs/unreleased/multiple-clusters-single-list.yml deleted file mode 100644 index 55743f3c00e..00000000000 --- a/changelogs/unreleased/multiple-clusters-single-list.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Present multiple clusters in a single list instead of a tabbed view -merge_request: 15669 -author: -type: changed diff --git a/changelogs/unreleased/optimize-issues-avoid-noop-empty-cache-updates2.yml b/changelogs/unreleased/optimize-issues-avoid-noop-empty-cache-updates2.yml deleted file mode 100644 index e0c3136be69..00000000000 --- a/changelogs/unreleased/optimize-issues-avoid-noop-empty-cache-updates2.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Treat empty markdown and html strings as valid cached text, not missing cache - that needs to be updated -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/osw-introduce-merge-request-statistics.yml b/changelogs/unreleased/osw-introduce-merge-request-statistics.yml deleted file mode 100644 index fed7c2141fb..00000000000 --- a/changelogs/unreleased/osw-introduce-merge-request-statistics.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Cache merged and closed events data in merge_request_metrics table -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/remove-incorrect-guidance.yml b/changelogs/unreleased/remove-incorrect-guidance.yml deleted file mode 100644 index eeb5745698f..00000000000 --- a/changelogs/unreleased/remove-incorrect-guidance.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Removed incorrect guidance stating blocked users will be removed from groups - and project as members -merge_request: 15947 -author: CesarApodaca -type: fixed diff --git a/changelogs/unreleased/remove-links-mr-empty-state.yml b/changelogs/unreleased/remove-links-mr-empty-state.yml deleted file mode 100644 index c666bc2c81d..00000000000 --- a/changelogs/unreleased/remove-links-mr-empty-state.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove related links in MR widget when empty state -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/remove-soft-removals.yml b/changelogs/unreleased/remove-soft-removals.yml deleted file mode 100644 index aa53d33e502..00000000000 --- a/changelogs/unreleased/remove-soft-removals.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove soft removals related code -merge_request: 15789 -author: -type: changed diff --git a/changelogs/unreleased/remove-tabindexes-from-tag-form.yml b/changelogs/unreleased/remove-tabindexes-from-tag-form.yml deleted file mode 100644 index a15bf2a7a4f..00000000000 --- a/changelogs/unreleased/remove-tabindexes-from-tag-form.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: removed tabindexes from tag form -merge_request: -author: Marcus Amargi -type: changed diff --git a/changelogs/unreleased/sh-add-schedule-pipeline-run-now.yml b/changelogs/unreleased/sh-add-schedule-pipeline-run-now.yml deleted file mode 100644 index 6d06f695f10..00000000000 --- a/changelogs/unreleased/sh-add-schedule-pipeline-run-now.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add button to run scheduled pipeline immediately -merge_request: -author: -type: added diff --git a/changelogs/unreleased/sh-catch-invalid-uri-markdown.yml b/changelogs/unreleased/sh-catch-invalid-uri-markdown.yml deleted file mode 100644 index 9b0233fe988..00000000000 --- a/changelogs/unreleased/sh-catch-invalid-uri-markdown.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Gracefully handle garbled URIs in Markdown -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-bare-import-hooks.yml b/changelogs/unreleased/sh-fix-bare-import-hooks.yml deleted file mode 100644 index deb6c62f738..00000000000 --- a/changelogs/unreleased/sh-fix-bare-import-hooks.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix hooks not being set up properly for bare import Rake task -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-mermaid-start-on-load-typo.yml b/changelogs/unreleased/sh-fix-mermaid-start-on-load-typo.yml deleted file mode 100644 index a2d4ade8e54..00000000000 --- a/changelogs/unreleased/sh-fix-mermaid-start-on-load-typo.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix Mermaid drawings not loading on some browsers -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/sh-make-kib-human.yml b/changelogs/unreleased/sh-make-kib-human.yml deleted file mode 100644 index c40bb34fa4a..00000000000 --- a/changelogs/unreleased/sh-make-kib-human.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Humanize the units of "Showing last X KiB of log" in job trace -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/sh-optimize-commit-stats.yml b/changelogs/unreleased/sh-optimize-commit-stats.yml deleted file mode 100644 index 8c1be1252fb..00000000000 --- a/changelogs/unreleased/sh-optimize-commit-stats.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Speed up generation of commit stats by using Rugged native methods -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/sh-validate-path-project-import.yml b/changelogs/unreleased/sh-validate-path-project-import.yml deleted file mode 100644 index acad66c0ab2..00000000000 --- a/changelogs/unreleased/sh-validate-path-project-import.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Avoid leaving a push event empty if payload cannot be created -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/show-inline-edit-btn.yml b/changelogs/unreleased/show-inline-edit-btn.yml deleted file mode 100644 index 8cfe9b7d75a..00000000000 --- a/changelogs/unreleased/show-inline-edit-btn.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Move edit button to second row on issue page (and change it to a pencil icon) -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/show_proper_labels_in_board_issue_sidebar_when_issue_is_closed.yml b/changelogs/unreleased/show_proper_labels_in_board_issue_sidebar_when_issue_is_closed.yml deleted file mode 100644 index c2ab34b20a5..00000000000 --- a/changelogs/unreleased/show_proper_labels_in_board_issue_sidebar_when_issue_is_closed.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: show None when issue is in closed list and no labels assigned -merge_request: 15976 -author: Christiaan Van den Poel -type: fixed diff --git a/changelogs/unreleased/sophie-h-gitlab-ce-patch-15.yml b/changelogs/unreleased/sophie-h-gitlab-ce-patch-15.yml deleted file mode 100644 index b5e3210c737..00000000000 --- a/changelogs/unreleased/sophie-h-gitlab-ce-patch-15.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Hide link to issues/MRs from labels list if issues/MRs are disabled. -merge_request: 15863 -author: Sophie Herold -type: fixed diff --git a/changelogs/unreleased/tc-correct-email-in-reply-to.yml b/changelogs/unreleased/tc-correct-email-in-reply-to.yml deleted file mode 100644 index 1c8043f6a5c..00000000000 --- a/changelogs/unreleased/tc-correct-email-in-reply-to.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Make mail notifications of discussion notes In-Reply-To of each other -merge_request: 14289 -author: -type: changed diff --git a/changelogs/unreleased/update-redis-rack.yml b/changelogs/unreleased/update-redis-rack.yml deleted file mode 100644 index 6e2e6e203b8..00000000000 --- a/changelogs/unreleased/update-redis-rack.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update redis-rack to 2.0.4 -merge_request: -author: -type: other diff --git a/changelogs/unreleased/winh-modal-target-id.yml b/changelogs/unreleased/winh-modal-target-id.yml deleted file mode 100644 index f8d5b72be50..00000000000 --- a/changelogs/unreleased/winh-modal-target-id.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add id to modal.vue to support data-toggle="modal" -merge_request: 16189 -author: -type: other diff --git a/changelogs/unreleased/winh-translate-contributors-page-dates.yml b/changelogs/unreleased/winh-translate-contributors-page-dates.yml deleted file mode 100644 index 74801bbd86e..00000000000 --- a/changelogs/unreleased/winh-translate-contributors-page-dates.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Translate date ranges on contributors page -merge_request: 15846 -author: -type: changed diff --git a/doc/ci/examples/dast.md b/doc/ci/examples/dast.md index 16ff8d5bb3e..7bf647bbb8b 100644 --- a/doc/ci/examples/dast.md +++ b/doc/ci/examples/dast.md @@ -1,11 +1,12 @@ # Dynamic Application Security Testing with GitLab CI/CD -This example shows how to run [Dynamic Application Security Testing (DAST)](https://en.wikipedia.org/wiki/Dynamic_program_analysis) -on your project's source code by using GitLab CI/CD. +is using the popular open source tool [OWASP ZAProxy](https://github.com/zaproxy/zaproxy) +to perform an analysis on your running web application. -DAST is using the popular open source tool -[OWASP ZAProxy](https://github.com/zaproxy/zaproxy) to perform an analysis. +It can be very useful combined with [Review Apps](../review_apps/index.md). + +## Example All you need is a GitLab Runner with the Docker executor (the shared Runners on GitLab.com will work fine). You can then add a new job to `.gitlab-ci.yml`, @@ -14,22 +15,26 @@ called `dast`: ```yaml dast: image: owasp/zap2docker-stable + variables: + website: "https://example.com" script: - mkdir /zap/wrk/ - - /zap/zap-baseline.py -J gl-dast-report.json -t https://example.com || true + - /zap/zap-baseline.py -J gl-dast-report.json -t $website || true - cp /zap/wrk/gl-dast-report.json . artifacts: paths: [gl-dast-report.json] ``` -The above example will create a `dast` job in your CI pipeline and will allow -you to download and analyze the report artifact in JSON format. +The above example will create a `dast` job in your CI/CD pipeline which will run +the tests on the URL defined in the `website` variable (change it to use your +own) and finally write the results in the `gl-dast-report.json` file. You can +then download and analyze the report artifact in JSON format. TIP: **Tip:** Starting with [GitLab Enterprise Edition Ultimate][ee] 10.4, this information will be automatically extracted and shown right in the merge request widget. To do so, the CI job must be named `dast` and the artifact path must be `gl-dast-report.json`. -[Learn more on dynamic application security testing results shown in merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/dast.html). +[Learn more about DAST results shown in merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/dast.html). [ee]: https://about.gitlab.com/gitlab-ee/ diff --git a/doc/development/performance.md b/doc/development/performance.md index e7c5a6ca07a..c4162a05b77 100644 --- a/doc/development/performance.md +++ b/doc/development/performance.md @@ -36,7 +36,8 @@ graphs/dashboards. GitLab provides built-in tools to aid the process of improving performance: -* [Sherlock](profiling.md#sherlock) +* [Profiling](profiling.md) + * [Sherlock](profiling.md#sherlock) * [GitLab Performance Monitoring](../administration/monitoring/performance/index.md) * [Request Profiling](../administration/monitoring/performance/request_profiling.md) * [QueryRecoder](query_recorder.md) for preventing `N+1` regressions diff --git a/doc/development/profiling.md b/doc/development/profiling.md index af79353b721..97c997e0568 100644 --- a/doc/development/profiling.md +++ b/doc/development/profiling.md @@ -4,6 +4,41 @@ To make it easier to track down performance problems GitLab comes with a set of profiling tools, some of these are available by default while others need to be explicitly enabled. +## Profiling a URL + +There is a `Gitlab::Profiler.profile` method, and corresponding +`bin/profile-url` script, that enable profiling a GET or POST request to a +specific URL, either as an anonymous user (the default) or as a specific user. + +When using the script, command-line documentation is available by passing no +arguments. + +When using the method in an interactive console session, any changes to the +application code within that console session will be reflected in the profiler +output. + +For example: + +```ruby +Gitlab::Profiler.profile('/my-user') +# Returns a RubyProf::Profile for the regular operation of this request +class UsersController; def show; sleep 100; end; end +Gitlab::Profiler.profile('/my-user') +# Returns a RubyProf::Profile where 100 seconds is spent in UsersController#show +``` + +Passing a `logger:` keyword argument to `Gitlab::Profiler.profile` will send +ActiveRecord and ActionController log output to that logger. Further options are +documented with the method source. + +[GitLab-Profiler](https://gitlab.com/gitlab-com/gitlab-profiler) is a project +that builds on this to add some additional niceties, such as allowing +configuration with a single Yaml file for multiple URLs, and uploading of the +profile and log output to S3. + +For GitLab.com, you can find the latest results here: +<http://redash.gitlab.com/dashboard/gitlab-profiler-statistics> + ## Sherlock Sherlock is a custom profiling tool built into GitLab. Sherlock is _only_ @@ -27,13 +62,3 @@ Bullet will log query problems to both the Rails log as well as the Chrome console. As a follow up to finding `N+1` queries with Bullet, consider writing a [QueryRecoder test](query_recorder.md) to prevent a regression. - -## GitLab Profiler - - -[Gitlab-Profiler](https://gitlab.com/gitlab-com/gitlab-profiler) was built to -help developers understand why specific URLs of their application may be slow -and to provide hard data that can help reduce load times. - -For GitLab.com, you can find the latest results here: -<http://redash.gitlab.com/dashboard/gitlab-profiler-statistics> diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md index 6ad314647ee..764ee0ca72c 100644 --- a/doc/topics/autodevops/index.md +++ b/doc/topics/autodevops/index.md @@ -21,10 +21,10 @@ project in an easy and automatic way: 1. [Auto Code Quality](#auto-code-quality) 1. [Auto SAST (Static Application Security Testing)](#auto-sast) 1. [Auto SAST for Docker images](#auto-sast-for-docker-images) -1. [Auto DAST (Dynamic Application Security Testing)](#auto-dast) -1. [Auto Browser Performance Testing](#auto-browser-performance-testing) 1. [Auto Review Apps](#auto-review-apps) +1. [Auto DAST (Dynamic Application Security Testing)](#auto-dast) 1. [Auto Deploy](#auto-deploy) +1. [Auto Browser Performance Testing](#auto-browser-performance-testing) 1. [Auto Monitoring](#auto-monitoring) As Auto DevOps relies on many different components, it's good to have a basic @@ -229,6 +229,32 @@ check out. In GitLab Enterprise Edition Ultimate, any security warnings are also [shown in the merge request widget](https://docs.gitlab.com/ee/user/project/merge_requests/sast_docker.html). +### Auto Review Apps + +NOTE: **Note:** +This is an optional step, since many projects do not have a Kubernetes cluster +available. If the [prerequisites](#prerequisites) are not met, the job will +silently be skipped. + +CAUTION: **Caution:** +Your apps should *not* be manipulated outside of Helm (using Kubernetes directly.) +This can cause confusion with Helm not detecting the change, and subsequent +deploys with Auto DevOps can undo your changes. Also, if you change something +and want to undo it by deploying again, Helm may not detect that anything changed +in the first place, and thus not realize that it needs to re-apply the old config. + +[Review Apps][review-app] are temporary application environments based on the +branch's code so developers, designers, QA, product managers, and other +reviewers can actually see and interact with code changes as part of the review +process. Auto Review Apps create a Review App for each branch. + +The Review App will have a unique URL based on the project name, the branch +name, and a unique number, combined with the Auto DevOps base domain. For +example, `user-project-branch-1234.example.com`. A link to the Review App shows +up in the merge request widget for easy discovery. When the branch is deleted, +for example after the merge request is merged, the Review App will automatically +be deleted. + ### Auto DAST > Introduced in [GitLab Enterprise Edition Ultimate][ee] 10.4. @@ -256,32 +282,6 @@ Auto Browser Performance Testing utilizes the [Sitespeed.io container](https://h In GitLab Enterprise Edition Premium, performance differences between the source and target branches are [shown in the merge request widget](https://docs.gitlab.com/ee/user/project/merge_requests/browser_performance_testing.html). -### Auto Review Apps - -NOTE: **Note:** -This is an optional step, since many projects do not have a Kubernetes cluster -available. If the [prerequisites](#prerequisites) are not met, the job will -silently be skipped. - -CAUTION: **Caution:** -Your apps should *not* be manipulated outside of Helm (using Kubernetes directly.) -This can cause confusion with Helm not detecting the change, and subsequent -deploys with Auto DevOps can undo your changes. Also, if you change something -and want to undo it by deploying again, Helm may not detect that anything changed -in the first place, and thus not realize that it needs to re-apply the old config. - -[Review Apps][review-app] are temporary application environments based on the -branch's code so developers, designers, QA, product managers, and other -reviewers can actually see and interact with code changes as part of the review -process. Auto Review Apps create a Review App for each branch. - -The Review App will have a unique URL based on the project name, the branch -name, and a unique number, combined with the Auto DevOps base domain. For -example, `user-project-branch-1234.example.com`. A link to the Review App shows -up in the merge request widget for easy discovery. When the branch is deleted, -for example after the merge request is merged, the Review App will automatically -be deleted. - ### Auto Deploy NOTE: **Note:** diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index 130f7897b1a..e87b4403854 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -1,26 +1,28 @@ # Connecting GitLab with a Kubernetes cluster -> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/35954) in 10.1. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/35954) in GitLab 10.1. + +Connect your project to Google Kubernetes Engine (GKE) or an existing Kubernetes +cluster in a few steps. With a cluster associated to your project, you can use Review Apps, deploy your applications, run your pipelines, and much more, in an easy way. -Connect your project to Google Kubernetes Engine (GKE) or your own Kubernetes -cluster in a few steps. - -NOTE: **Note:** -The Cluster integration will eventually supersede the -[Kubernetes integration](../integrations/kubernetes.md). For the moment, -you can create only one cluster. +There are two options when adding a new cluster to your project; either associate +your account with Google Kubernetes Engine (GKE) so that you can [create new +clusters](#adding-and-creating-a-new-gke-cluster-via-gitlab) from within GitLab, +or provide the credentials to an [existing Kubernetes cluster](#adding-an-existing-kubernetes-cluster). ## Prerequisites -In order to be able to manage your GKE cluster through GitLab, the following -prerequisites must be met: +In order to be able to manage your Kubernetes cluster through GitLab, the +following prerequisites must be met. + +**For a cluster hosted on GKE:** - The [Google authentication integration](../../../integration/google.md) must be enabled in GitLab at the instance level. If that's not the case, ask your - administrator to enable it. + GitLab administrator to enable it. - Your associated Google account must have the right privileges to manage clusters on GKE. That would mean that a [billing account](https://cloud.google.com/billing/docs/how-to/manage-billing-account) @@ -31,41 +33,88 @@ prerequisites must be met: - You must have [Resource Manager API](https://cloud.google.com/resource-manager/) -If all of the above requirements are met, you can proceed to add a new GKE +**For an existing Kubernetes cluster:** + +- Since the cluster is already created, there are no prerequisites. + +--- + +If all of the above requirements are met, you can proceed to add a new Kubernetes cluster. -## Adding a cluster +## Adding and creating a new GKE cluster via GitLab + +NOTE: **Note:** +You need Master [permissions] and above to access the Clusters page. + +Before proceeding, make sure all [prerequisites](#prerequisites) are met. +To add a new cluster hosted on GKE to your project: + +1. Navigate to your project's **CI/CD > Clusters** page. +1. Click on **Add cluster**. +1. Click on **Create with GKE**. +1. Connect your Google account if you haven't done already by clicking the + **Sign in with Google** button. +1. Fill in the requested values: + - **Cluster name** (required) - The name you wish to give the cluster. + - **GCP project ID** (required) - The ID of the project you created in your GCP + console that will host the Kubernetes cluster. This must **not** be confused + with the project name. Learn more about [Google Cloud Platform projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + - **Zone** - The [zone](https://cloud.google.com/compute/docs/regions-zones/) + under which the cluster will be created. + - **Number of nodes** - The number of nodes you wish the cluster to have. + - **Machine type** - The [machine type](https://cloud.google.com/compute/docs/machine-types) + of the Virtual Machine instance that the cluster will be based on. + - **Environment scope** - The [associated environment](#setting-the-environment-scope) to this cluster. +1. Finally, click the **Create cluster** button. + +After a few moments, your cluster should be created. If something goes wrong, +you will be notified. + +You can now proceed to install some pre-defined applications and then +enable the Cluster integration. + +## Adding an existing Kubernetes cluster NOTE: **Note:** -You need Master [permissions] and above to add a cluster. - -There are two options when adding a new cluster; either use Google Kubernetes -Engine (GKE) or provide the credentials to your own Kubernetes cluster. - -To add a new cluster: - -1. Navigate to your project's **CI/CD > Cluster** page -1. If you want to let GitLab create a cluster on GKE for you, go through the - following steps, otherwise skip to the next one. - 1. Click on **Create with GKE** - 1. Connect your Google account if you haven't done already by clicking the - **Sign in with Google** button - 1. Fill in the requested values: - - **Cluster name** (required) - The name you wish to give the cluster. - - **GCP project ID** (required) - The ID of the project you created in your GCP - console that will host the Kubernetes cluster. This must **not** be confused - with the project name. Learn more about [Google Cloud Platform projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - - **Zone** - The [zone](https://cloud.google.com/compute/docs/regions-zones/) - under which the cluster will be created. - - **Number of nodes** - The number of nodes you wish the cluster to have. - - **Machine type** - The [machine type](https://cloud.google.com/compute/docs/machine-types) - of the Virtual Machine instance that the cluster will be based on. - - **Project namespace** - The unique namespace for this project. By default you - don't have to fill it in; by leaving it blank, GitLab will create one for you. -1. If you want to use your own existing Kubernetes cluster, click on - **Add an existing cluster** and fill in the details as described in the - [Kubernetes integration](../integrations/kubernetes.md) documentation. -1. Finally, click the **Create cluster** button +You need Master [permissions] and above to access the Clusters page. + +To add an existing Kubernetes cluster to your project: + +1. Navigate to your project's **CI/CD > Clusters** page. +1. Click on **Add cluster**. +1. Click on **Add an existing cluster** and fill in the details: + - **Cluster name** (required) - The name you wish to give the cluster. + - **Environment scope** (required)- The + [associated environment](#setting-the-environment-scope) to this cluster. + - **API URL** (required) - + It's the URL that GitLab uses to access the Kubernetes API. Kubernetes + exposes several APIs, we want the "base" URL that is common to all of them, + e.g., `https://kubernetes.example.com` rather than `https://kubernetes.example.com/api/v1`. + - **CA certificate** (optional) - + If the API is using a self-signed TLS certificate, you'll also need to include + the `ca.crt` contents here. + - **Token** - + GitLab authenticates against Kubernetes using service tokens, which are + scoped to a particular `namespace`. If you don't have a service token yet, + you can follow the + [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) + to create one. You can also view or create service tokens in the + [Kubernetes dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#config) + (under **Config > Secrets**). + - **Project namespace** (optional) - The following apply: + - By default you don't have to fill it in; by leaving it blank, GitLab will + create one for you. + - Each project should have a unique namespace. + - The project namespace is not necessarily the namespace of the secret, if + you're using a secret with broader permissions, like the secret from `default`. + - You should **not** use `default` as the project namespace. + - If you or someone created a secret specifically for the project, usually + with limited permissions, the secret's namespace and project namespace may + be the same. +1. Finally, click the **Create cluster** button. + +The Kubernetes service takes the following parameters: After a few moments, your cluster should be created. If something goes wrong, you will be notified. @@ -85,6 +134,91 @@ added directly to your configured cluster. Those applications are needed for | [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) | 10.2+ | Ingress can provide load balancing, SSL termination, and name-based virtual hosting. It acts as a web proxy for your applications and is useful if you want to use [Auto DevOps](../../../topics/autodevops/index.md) or deploy your own web apps. | | [Prometheus](https://prometheus.io/docs/introduction/overview/) | 10.4+ | Prometheus is an open-source monitoring and alerting system useful to supervise your deployed applications | +## Setting the environment scope + +When adding more than one clusters, you need to differentiate them with an +environment scope. The environment scope associates clusters and +[environments](../../../ci/environments.md) in an 1:1 relationship similar to how the +[environment-specific variables](../../../ci/variables/README.md#limiting-environment-scopes-of-secret-variables) +work. + +The default environment scope is `*`, which means all jobs, regardless of their +environment, will use that cluster. Each scope can only be used by a single +cluster in a project, and a validation error will occur if otherwise. + +--- + +For example, let's say the following clusters exist in a project: + +| Cluster | Environment scope | +| ---------- | ------------------- | +| Development| `*` | +| Staging | `staging/*` | +| Production | `production/*` | + +And the following environments are set in [`.gitlab-ci.yml`](../../../ci/yaml/README.md): + +```yaml +stages: +- test +- deploy + +test: + stage: test + script: sh test + +deploy to staging: + stage: deploy + script: make deploy + environment: + name: staging/$CI_COMMIT_REF_NAME + url: https://staging.example.com/ + +deploy to production: + stage: deploy + script: make deploy + environment: + name: production/$CI_COMMIT_REF_NAME + url: https://example.com/ +``` + +The result will then be: + +- The development cluster will be used for the "test" job. +- The staging cluster will be used for the "deploy to staging" job. +- The production cluster will be used for the "deploy to production" job. + +## Multiple Kubernetes clusters + +> Introduced in [GitLab Enterprise Edition Premium][ee] 10.3. + +With GitLab EEP, you can associate more than one Kubernetes clusters to your +project. That way you can have different clusters for different environments, +like dev, staging, production, etc. + +To add another cluster, follow the same steps as described in [adding a +Kubernetes cluster](#adding-a-kubernetes-cluster) and make sure to +[set an environment scope](#setting-the-environment-scope) that will +differentiate the new cluster with the rest. + +## Deployment variables + +The Kubernetes cluster integration exposes the following +[deployment variables](../../../ci/variables/README.md#deployment-variables) in the +GitLab CI/CD build environment: + +- `KUBE_URL` - Equal to the API URL. +- `KUBE_TOKEN` - The Kubernetes token. +- `KUBE_NAMESPACE` - The Kubernetes namespace is auto-generated if not specified. + The default value is `<project_name>-<project_id>`. You can overwrite it to + use different one if needed, otherwise the `KUBE_NAMESPACE` variable will + receive the default value. +- `KUBE_CA_PEM_FILE` - Only present if a custom CA bundle was specified. Path + to a file containing PEM data. +- `KUBE_CA_PEM` (deprecated) - Only if a custom CA bundle was specified. Raw PEM data. +- `KUBECONFIG` - Path to a file containing `kubeconfig` for this deployment. + CA bundle would be embedded if specified. + ## Enabling or disabling the Cluster integration After you have successfully added your cluster information, you can enable the @@ -111,4 +245,62 @@ To remove the Cluster integration from your project, simply click on the **Remove integration** button. You will then be able to follow the procedure and [add a cluster](#adding-a-cluster) again. +## What you can get with the Kubernetes integration + +Here's what you can do with GitLab if you enable the Kubernetes integration. + +### Deploy Boards (EEP) + +> Available in [GitLab Enterprise Edition Premium][ee]. + +GitLab's Deploy Boards offer a consolidated view of the current health and +status of each CI [environment](../../../ci/environments.md) running on Kubernetes, +displaying the status of the pods in the deployment. Developers and other +teammates can view the progress and status of a rollout, pod by pod, in the +workflow they already use without any need to access Kubernetes. + +[> Read more about Deploy Boards](https://docs.gitlab.com/ee/user/project/deploy_boards.html) + +### Canary Deployments (EEP) + +> Available in [GitLab Enterprise Edition Premium][ee]. + +Leverage [Kubernetes' Canary deployments](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#canary-deployments) +and visualize your canary deployments right inside the Deploy Board, without +the need to leave GitLab. + +[> Read more about Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html) + +### Kubernetes monitoring + +Automatically detect and monitor Kubernetes metrics. Automatic monitoring of +[NGINX ingress](../integrations/prometheus_library/nginx.md) is also supported. + +[> Read more about Kubernetes monitoring](../integrations/prometheus_library/kubernetes.md) + +### Auto DevOps + +Auto DevOps automatically detects, builds, tests, deploys, and monitors your +applications. + +To make full use of Auto DevOps(Auto Deploy, Auto Review Apps, and Auto Monitoring) +you will need the Kubernetes project integration enabled. + +[> Read more about Auto DevOps](../../../topics/autodevops/index.md) + +### Web terminals + +NOTE: **Note:** +Introduced in GitLab 8.15. You must be the project owner or have `master` permissions +to use terminals. Support is limited to the first container in the +first pod of your environment. + +When enabled, the Kubernetes service adds [web terminal](../../../ci/environments.md#web-terminals) +support to your [environments](../../../ci/environments.md). This is based on the `exec` functionality found in +Docker and Kubernetes, so you get a new shell session within your existing +containers. To use this integration, you should deploy to Kubernetes using +the deployment variables above, ensuring any pods you create are labelled with +`app=$CI_ENVIRONMENT_SLUG`. GitLab will do the rest! + [permissions]: ../../permissions.md +[ee]: https://about.gitlab.com/gitlab-ee/ diff --git a/doc/user/project/integrations/kubernetes.md b/doc/user/project/integrations/kubernetes.md index 710cf78e84f..543baaa81e1 100644 --- a/doc/user/project/integrations/kubernetes.md +++ b/doc/user/project/integrations/kubernetes.md @@ -2,11 +2,15 @@ last_updated: 2017-12-28 --- -CAUTION: **Warning:** -Kubernetes service integration has been deprecated in GitLab 10.3. If the service is active the cluster information still be editable, however we advised to disable and reconfigure the clusters using the new [Clusters](../clusters/index.md) page. If the service is inactive the fields will be uneditable. Read [GitLab 10.3 release post](https://about.gitlab.com/2017/12/22/gitlab-10-3-released/#kubernetes-integration-service) for more information. - # GitLab Kubernetes / OpenShift integration +CAUTION: **Warning:** +The Kubernetes service integration has been deprecated in GitLab 10.3. If the +service is active, the cluster information will still be editable, however we +advise to disable and reconfigure the clusters using the new +[Clusters](../clusters/index.md) page. If the service is inactive, the fields +will not be editable. Read [GitLab 10.3 release post](https://about.gitlab.com/2017/12/22/gitlab-10-3-released/#kubernetes-integration-service) for more information. + GitLab can be configured to interact with Kubernetes, or other systems using the Kubernetes API (such as OpenShift). diff --git a/doc/user/project/pipelines/img/pipeline_schedule_play.png b/doc/user/project/pipelines/img/pipeline_schedule_play.png Binary files differnew file mode 100644 index 00000000000..f594ceee19d --- /dev/null +++ b/doc/user/project/pipelines/img/pipeline_schedule_play.png diff --git a/doc/user/project/pipelines/img/pipeline_schedules_list.png b/doc/user/project/pipelines/img/pipeline_schedules_list.png Binary files differindex 50d9d184b05..2ab2061db94 100644 --- a/doc/user/project/pipelines/img/pipeline_schedules_list.png +++ b/doc/user/project/pipelines/img/pipeline_schedules_list.png diff --git a/doc/user/project/pipelines/schedules.md b/doc/user/project/pipelines/schedules.md index 2101e3b1d58..34809a2826f 100644 --- a/doc/user/project/pipelines/schedules.md +++ b/doc/user/project/pipelines/schedules.md @@ -31,6 +31,20 @@ is installed on. ![Schedules list](img/pipeline_schedules_list.png) +### Running a scheduled pipeline manually + +> [Introduced][ce-15700] in GitLab 10.4. + +To trigger a pipeline schedule manually, click the "Play" button: + +![Play Pipeline Schedule](img/pipeline_schedule_play.png) + +This will schedule a background job to run the pipeline schedule. A flash +message will provide a link to the CI/CD Pipeline index page. + +To help avoid abuse, users are rate limited to triggering a pipeline once per +minute. + ### Making use of scheduled pipeline variables > [Introduced][ce-12328] in GitLab 9.4. @@ -90,4 +104,5 @@ don't have admin access to the server, ask your administrator. [ce-10533]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10533 [ce-10853]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10853 [ce-12328]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12328 +[ce-15700]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15700 [settings]: https://about.gitlab.com/gitlab-com/settings/#cron-jobs diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index eff1c5b70ea..eb67de81a0d 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -1,11 +1,6 @@ module API module Helpers module InternalHelpers - SSH_GITALY_FEATURES = { - 'git-receive-pack' => [:ssh_receive_pack, Gitlab::GitalyClient::MigrationStatus::OPT_IN], - 'git-upload-pack' => [:ssh_upload_pack, Gitlab::GitalyClient::MigrationStatus::OPT_OUT] - }.freeze - attr_reader :redirected_path def wiki? @@ -102,8 +97,14 @@ module API # Return the Gitaly Address if it is enabled def gitaly_payload(action) - feature, status = SSH_GITALY_FEATURES[action] - return unless feature && Gitlab::GitalyClient.feature_enabled?(feature, status: status) + return unless %w[git-receive-pack git-upload-pack].include?(action) + + if action == 'git-receive-pack' + return unless Gitlab::GitalyClient.feature_enabled?( + :ssh_receive_pack, + status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT + ) + end { repository: repository.gitaly_repository, diff --git a/lib/api/members.rb b/lib/api/members.rb index 5446f6b54b1..130c6d6da71 100644 --- a/lib/api/members.rb +++ b/lib/api/members.rb @@ -22,7 +22,7 @@ module API source = find_source(source_type, params[:id]) users = source.users - users = users.merge(User.search(params[:query])) if params[:query] + users = users.merge(User.search(params[:query])) if params[:query].present? present paginate(users), with: Entities::Member, source: source end diff --git a/lib/api/protected_branches.rb b/lib/api/protected_branches.rb index 614822509f0..c15c487deb4 100644 --- a/lib/api/protected_branches.rb +++ b/lib/api/protected_branches.rb @@ -2,7 +2,7 @@ module API class ProtectedBranches < Grape::API include PaginationParams - BRANCH_ENDPOINT_REQUIREMENTS = API::PROJECT_ENDPOINT_REQUIREMENTS.merge(branch: API::NO_SLASH_URL_PART_REGEX) + BRANCH_ENDPOINT_REQUIREMENTS = API::PROJECT_ENDPOINT_REQUIREMENTS.merge(name: API::NO_SLASH_URL_PART_REGEX) before { authorize_admin_project } diff --git a/lib/api/v3/members.rb b/lib/api/v3/members.rb index de226e4e573..46145cac7a5 100644 --- a/lib/api/v3/members.rb +++ b/lib/api/v3/members.rb @@ -23,7 +23,7 @@ module API source = find_source(source_type, params[:id]) users = source.users - users = users.merge(User.search(params[:query])) if params[:query] + users = users.merge(User.search(params[:query])) if params[:query].present? present paginate(users), with: ::API::Entities::Member, source: source end diff --git a/lib/gitlab/database/grant.rb b/lib/gitlab/database/grant.rb index 9f76967fc77..d32837f5793 100644 --- a/lib/gitlab/database/grant.rb +++ b/lib/gitlab/database/grant.rb @@ -12,30 +12,40 @@ module Gitlab # Returns true if the current user can create and execute triggers on the # given table. def self.create_and_execute_trigger?(table) - priv = - if Database.postgresql? - where(privilege_type: 'TRIGGER', table_name: table) - .where('grantee = user') - else - queries = [ - Grant.select(1) - .from('information_schema.user_privileges') - .where("PRIVILEGE_TYPE = 'SUPER'") - .where("GRANTEE = CONCAT('\\'', REPLACE(CURRENT_USER(), '@', '\\'@\\''), '\\'')"), + if Database.postgresql? + # We _must not_ use quote_table_name as this will produce double + # quotes on PostgreSQL and for "has_table_privilege" we need single + # quotes. + quoted_table = connection.quote(table) - Grant.select(1) - .from('information_schema.schema_privileges') - .where("PRIVILEGE_TYPE = 'TRIGGER'") - .where('TABLE_SCHEMA = ?', Gitlab::Database.database_name) - .where("GRANTEE = CONCAT('\\'', REPLACE(CURRENT_USER(), '@', '\\'@\\''), '\\'')") - ] + begin + from(nil) + .pluck("has_table_privilege(#{quoted_table}, 'TRIGGER')") + .first + rescue ActiveRecord::StatementInvalid + # This error is raised when using a non-existing table name. In this + # case we just want to return false as a user technically can't + # create triggers for such a table. + false + end + else + queries = [ + Grant.select(1) + .from('information_schema.user_privileges') + .where("PRIVILEGE_TYPE = 'SUPER'") + .where("GRANTEE = CONCAT('\\'', REPLACE(CURRENT_USER(), '@', '\\'@\\''), '\\'')"), - union = SQL::Union.new(queries).to_sql + Grant.select(1) + .from('information_schema.schema_privileges') + .where("PRIVILEGE_TYPE = 'TRIGGER'") + .where('TABLE_SCHEMA = ?', Gitlab::Database.database_name) + .where("GRANTEE = CONCAT('\\'', REPLACE(CURRENT_USER(), '@', '\\'@\\''), '\\'')") + ] - Grant.from("(#{union}) privs") - end + union = SQL::Union.new(queries).to_sql - priv.any? + Grant.from("(#{union}) privs").any? + end end end end diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb index 031fccba92b..f421bf69e8f 100644 --- a/lib/gitlab/git/blob.rb +++ b/lib/gitlab/git/blob.rb @@ -132,6 +132,8 @@ module Gitlab end def find_by_gitaly(repository, sha, path, limit: MAX_DATA_DISPLAY_SIZE) + return unless path + path = path.sub(/\A\/*/, '') path = '/' if path.empty? name = File.basename(path) @@ -173,6 +175,8 @@ module Gitlab end def find_by_rugged(repository, sha, path, limit:) + return unless path + rugged_commit = repository.lookup(sha) root_tree = rugged_commit.tree diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index b89a38d187e..8bfc3fe52c5 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1091,19 +1091,6 @@ module Gitlab end end - def shell_write_ref(ref_path, ref, old_ref) - raise ArgumentError, "invalid ref_path #{ref_path.inspect}" if ref_path.include?(' ') - raise ArgumentError, "invalid ref #{ref.inspect}" if ref.include?("\x00") - raise ArgumentError, "invalid old_ref #{old_ref.inspect}" if !old_ref.nil? && old_ref.include?("\x00") - - input = "update #{ref_path}\x00#{ref}\x00#{old_ref}\x00" - run_git!(%w[update-ref --stdin -z]) { |stdin| stdin.write(input) } - end - - def rugged_write_ref(ref_path, ref) - rugged.references.create(ref_path, ref, force: true) - end - def fetch_ref(source_repository, source_ref:, target_ref:) Gitlab::Git.check_namespace!(source_repository) source_repository = RemoteRepository.new(source_repository) unless source_repository.is_a?(RemoteRepository) @@ -1317,6 +1304,10 @@ module Gitlab end # rubocop:enable Metrics/ParameterLists + def write_config(full_path:) + rugged.config['gitlab.fullpath'] = full_path if full_path.present? + end + def gitaly_repository Gitlab::GitalyClient::Util.repository(@storage, @relative_path, @gl_repository) end @@ -1361,6 +1352,25 @@ module Gitlab private + def shell_write_ref(ref_path, ref, old_ref) + raise ArgumentError, "invalid ref_path #{ref_path.inspect}" if ref_path.include?(' ') + raise ArgumentError, "invalid ref #{ref.inspect}" if ref.include?("\x00") + raise ArgumentError, "invalid old_ref #{old_ref.inspect}" if !old_ref.nil? && old_ref.include?("\x00") + + input = "update #{ref_path}\x00#{ref}\x00#{old_ref}\x00" + run_git!(%w[update-ref --stdin -z]) { |stdin| stdin.write(input) } + end + + def rugged_write_ref(ref_path, ref) + rugged.references.create(ref_path, ref, force: true) + rescue Rugged::ReferenceError => ex + Rails.logger.error "Unable to create #{ref_path} reference for repository #{path}: #{ex}" + rescue Rugged::OSError => ex + raise unless ex.message =~ /Failed to create locked file/ && ex.message =~ /File exists/ + + Rails.logger.error "Unable to create #{ref_path} reference for repository #{path}: #{ex}" + end + def fresh_worktree?(path) File.exist?(path) && !clean_stuck_worktree(path) end diff --git a/lib/gitlab/profiler.rb b/lib/gitlab/profiler.rb new file mode 100644 index 00000000000..95d94b3cc68 --- /dev/null +++ b/lib/gitlab/profiler.rb @@ -0,0 +1,142 @@ +# coding: utf-8 +module Gitlab + module Profiler + FILTERED_STRING = '[FILTERED]'.freeze + + IGNORE_BACKTRACES = %w[ + lib/gitlab/i18n.rb + lib/gitlab/request_context.rb + config/initializers + lib/gitlab/database/load_balancing/ + lib/gitlab/etag_caching/ + lib/gitlab/metrics/ + lib/gitlab/middleware/ + lib/gitlab/performance_bar/ + lib/gitlab/request_profiler/ + lib/gitlab/profiler.rb + ].freeze + + # Takes a URL to profile (can be a fully-qualified URL, or an absolute path) + # and returns the ruby-prof profile result. Formatting that result is the + # caller's responsibility. Requests are GET requests unless post_data is + # passed. + # + # Optional arguments: + # - logger: will be used for SQL logging, including a summary at the end of + # the log file of the total time spent per model class. + # + # - post_data: a string of raw POST data to use. Changes the HTTP verb to + # POST. + # + # - user: a user to authenticate as. Only works if the user has a valid + # personal access token. + # + # - private_token: instead of providing a user instance, the token can be + # given as a string. Takes precedence over the user option. + def self.profile(url, logger: nil, post_data: nil, user: nil, private_token: nil) + app = ActionDispatch::Integration::Session.new(Rails.application) + verb = :get + headers = {} + + if post_data + verb = :post + headers['Content-Type'] = 'application/json' + end + + if user + private_token ||= user.personal_access_tokens.active.pluck(:token).first + end + + headers['Private-Token'] = private_token if private_token + logger = create_custom_logger(logger, private_token: private_token) + + RequestStore.begin! + + # Make an initial call for an asset path in development mode to avoid + # sprockets dominating the profiler output. + ActionController::Base.helpers.asset_path('katex.css') if Rails.env.development? + + # Rails loads internationalization files lazily the first time a + # translation is needed. Running this prevents this overhead from showing + # up in profiles. + ::I18n.t('.')[:test_string] + + # Remove API route mounting from the profile. + app.get('/api/v4/users') + + result = with_custom_logger(logger) do + RubyProf.profile { app.public_send(verb, url, post_data, headers) } # rubocop:disable GitlabSecurity/PublicSend + end + + RequestStore.end! + + log_load_times_by_model(logger) + + result + end + + def self.create_custom_logger(logger, private_token: nil) + return unless logger + + logger.dup.tap do |new_logger| + new_logger.instance_variable_set(:@private_token, private_token) + + class << new_logger + attr_reader :load_times_by_model, :private_token + + def debug(message, *) + message.gsub!(private_token, FILTERED_STRING) if private_token + + _, type, time = *message.match(/(\w+) Load \(([0-9.]+)ms\)/) + + if type && time + @load_times_by_model ||= {} + @load_times_by_model[type] ||= 0 + @load_times_by_model[type] += time.to_f + end + + super + + backtrace = Rails.backtrace_cleaner.clean(caller) + + backtrace.each do |caller_line| + next if caller_line.match(Regexp.union(IGNORE_BACKTRACES)) + + stripped_caller_line = caller_line.sub("#{Rails.root}/", '') + + super(" ↳ #{stripped_caller_line}") + end + end + end + end + end + + def self.with_custom_logger(logger) + original_colorize_logging = ActiveSupport::LogSubscriber.colorize_logging + original_activerecord_logger = ActiveRecord::Base.logger + original_actioncontroller_logger = ActionController::Base.logger + + if logger + ActiveSupport::LogSubscriber.colorize_logging = false + ActiveRecord::Base.logger = logger + ActionController::Base.logger = logger + end + + result = yield + + ActiveSupport::LogSubscriber.colorize_logging = original_colorize_logging + ActiveRecord::Base.logger = original_activerecord_logger + ActionController::Base.logger = original_actioncontroller_logger + + result + end + + def self.log_load_times_by_model(logger) + return unless logger.respond_to?(:load_times_by_model) + + logger.load_times_by_model.to_a.sort_by(&:last).reverse.each do |(model, time)| + logger.info("#{model} total: #{time.round(2)}ms") + end + end + end +end diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 0de183858aa..633da44b22d 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -34,7 +34,10 @@ module Gitlab feature_enabled = case action.to_s when 'git_receive_pack' - Gitlab::GitalyClient.feature_enabled?(:post_receive_pack) + Gitlab::GitalyClient.feature_enabled?( + :post_receive_pack, + status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT + ) when 'git_upload_pack' true when 'info_refs' diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 31cd6bfe6e1..a584eb97cf5 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -427,7 +427,7 @@ namespace :gitlab do namespace :user do desc "GitLab | Check the integrity of a specific user's repositories" task :check_repos, [:username] => :environment do |t, args| - username = args[:username] || prompt("Check repository integrity for fsername? ".color(:blue)) + username = args[:username] || prompt("Check repository integrity for username? ".color(:blue)) user = User.find_by(username: username) if user repo_dirs = user.authorized_projects.map do |p| diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 2565622f8df..cc1b1e5039e 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -51,6 +51,13 @@ describe Admin::ApplicationSettingsController do sign_in(admin) end + it 'updates the password_authentication_enabled_for_git setting' do + put :update, application_setting: { password_authentication_enabled_for_git: "0" } + + expect(response).to redirect_to(admin_application_settings_path) + expect(ApplicationSetting.current.password_authentication_enabled_for_git).to eq(false) + end + it 'updates the default_project_visibility for string value' do put :update, application_setting: { default_project_visibility: "20" } diff --git a/spec/controllers/dashboard/groups_controller_spec.rb b/spec/controllers/dashboard/groups_controller_spec.rb index fb9d3efbac0..7f2eaf95165 100644 --- a/spec/controllers/dashboard/groups_controller_spec.rb +++ b/spec/controllers/dashboard/groups_controller_spec.rb @@ -20,4 +20,24 @@ describe Dashboard::GroupsController do expect(assigns(:groups)).to contain_exactly(member_of_group) end + + context 'when rendering an expanded hierarchy with public groups you are not a member of', :nested_groups do + let!(:top_level_result) { create(:group, name: 'chef-top') } + let!(:top_level_a) { create(:group, name: 'top-a') } + let!(:sub_level_result_a) { create(:group, name: 'chef-sub-a', parent: top_level_a) } + let!(:other_group) { create(:group, name: 'other') } + + before do + top_level_result.add_master(user) + top_level_a.add_master(user) + end + + it 'renders only groups the user is a member of when searching hierarchy correctly' do + get :index, filter: 'chef', format: :json + + expect(response).to have_gitlab_http_status(200) + all_groups = [top_level_result, top_level_a, sub_level_result_a] + expect(assigns(:groups)).to contain_exactly(*all_groups) + end + end end diff --git a/spec/controllers/groups/children_controller_spec.rb b/spec/controllers/groups/children_controller_spec.rb index cb1b460fc0e..22d3076c269 100644 --- a/spec/controllers/groups/children_controller_spec.rb +++ b/spec/controllers/groups/children_controller_spec.rb @@ -160,6 +160,30 @@ describe Groups::ChildrenController do expect(json_response).to eq([]) end + it 'succeeds if multiple pages contain matching subgroups' do + create(:group, parent: group, name: 'subgroup-filter-1') + create(:group, parent: group, name: 'subgroup-filter-2') + + # Creating the group-to-nest first so it would be loaded into the + # relation first before it's parents, this is what would cause the + # crash in: https://gitlab.com/gitlab-org/gitlab-ce/issues/40785. + # + # If we create the parent groups first, those would be loaded into the + # collection first, and the pagination would cut off the actual search + # result. In this case the hierarchy can be rendered without crashing, + # it's just incomplete. + group_to_nest = create(:group, parent: group, name: 'subsubgroup-filter-3') + subgroup = create(:group, parent: group) + 3.times do |i| + subgroup = create(:group, parent: subgroup) + end + group_to_nest.update!(parent: subgroup) + + get :index, group_id: group.to_param, filter: 'filter', per_page: 3, format: :json + + expect(response).to have_gitlab_http_status(200) + end + it 'includes pagination headers' do 2.times { |i| create(:group, :public, parent: public_subgroup, name: "filterme#{i}") } diff --git a/spec/controllers/projects/avatars_controller_spec.rb b/spec/controllers/projects/avatars_controller_spec.rb index 3bbe168f6d5..6a41c4d23ea 100644 --- a/spec/controllers/projects/avatars_controller_spec.rb +++ b/spec/controllers/projects/avatars_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Projects::AvatarsController do - let(:project) { create(:project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } + let(:project) { create(:project, :repository, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } let(:user) { create(:user) } before do @@ -10,6 +10,12 @@ describe Projects::AvatarsController do controller.instance_variable_set(:@project, project) end + it 'GET #show' do + get :show, namespace_id: project.namespace.id, project_id: project.id + + expect(response).to have_gitlab_http_status(404) + end + it 'removes avatar from DB by calling destroy' do delete :destroy, namespace_id: project.namespace.id, project_id: project.id expect(project.avatar.present?).to be_falsey diff --git a/spec/controllers/projects/commits_controller_spec.rb b/spec/controllers/projects/commits_controller_spec.rb index 73fb90d73ec..55ed276f96b 100644 --- a/spec/controllers/projects/commits_controller_spec.rb +++ b/spec/controllers/projects/commits_controller_spec.rb @@ -41,15 +41,21 @@ describe Projects::CommitsController do context "when the ref name ends in .atom" do context "when the ref does not exist with the suffix" do - it "renders as atom" do + before do get(:show, namespace_id: project.namespace, project_id: project, id: "master.atom") + end + it "renders as atom" do expect(response).to be_success expect(response.content_type).to eq('application/atom+xml') end + + it 'renders summary with type=html' do + expect(response.body).to include('<summary type="html">') + end end context "when the ref exists with the suffix" do diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index a5cd858b11a..e661db1809a 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -384,12 +384,12 @@ feature 'Jobs' do expect(page).to have_link('Trigger this manual action') end - it 'plays manual action', :js do + it 'plays manual action and shows pending status', :js do click_link 'Trigger this manual action' wait_for_requests - expect(page).to have_content('This job has not been triggered') - expect(page).to have_content('This job is stuck, because the project doesn\'t have any runners online assigned to it.') + expect(page).to have_content('This job has not started yet') + expect(page).to have_content('This job is in pending state and is waiting to be picked by a runner') expect(page).to have_content('pending') end end @@ -403,6 +403,20 @@ feature 'Jobs' do it 'shows empty state' do expect(page).to have_content('This job has not been triggered yet') + expect(page).to have_content('This job depends on upstream jobs that need to succeed in order for this job to be triggered') + end + end + + context 'Pending job' do + let(:job) { create(:ci_build, :pending, pipeline: pipeline) } + + before do + visit project_job_path(project, job) + end + + it 'shows pending empty state' do + expect(page).to have_content('This job has not started yet') + expect(page).to have_content('This job is in pending state and is waiting to be picked by a runner') end end end diff --git a/spec/finders/group_descendants_finder_spec.rb b/spec/finders/group_descendants_finder_spec.rb index ae050f36b4a..375bcc9087e 100644 --- a/spec/finders/group_descendants_finder_spec.rb +++ b/spec/finders/group_descendants_finder_spec.rb @@ -35,6 +35,15 @@ describe GroupDescendantsFinder do expect(finder.execute).to contain_exactly(project) end + it 'does not include projects shared with the group' do + project = create(:project, namespace: group) + other_project = create(:project) + other_project.project_group_links.create(group: group, + group_access: ProjectGroupLink::MASTER) + + expect(finder.execute).to contain_exactly(project) + end + context 'when archived is `true`' do let(:params) { { archived: 'true' } } @@ -189,6 +198,17 @@ describe GroupDescendantsFinder do expect(finder.execute).to contain_exactly(subgroup, matching_project) end + context 'with a small page size' do + let(:params) { { filter: 'test', per_page: 1 } } + + it 'contains all the ancestors of a matching subgroup regardless the page size' do + subgroup = create(:group, :private, parent: group) + matching = create(:group, :private, name: 'testgroup', parent: subgroup) + + expect(finder.execute).to contain_exactly(subgroup, matching) + end + end + it 'does not include the parent itself' do group.update!(name: 'test') diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index ede9d232efd..c0251bf7dc0 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe ProjectsHelper do + include ProjectForksHelper + describe "#project_status_css_class" do it "returns appropriate class" do expect(project_status_css_class("started")).to eq("active") @@ -10,9 +12,9 @@ describe ProjectsHelper do end describe "can_change_visibility_level?" do - let(:project) { create(:project, :repository) } + let(:project) { create(:project) } let(:user) { create(:project_member, :reporter, user: create(:user), project: project).user } - let(:fork_project) { Projects::ForkService.new(project, user).execute } + let(:forked_project) { fork_project(project, user) } it "returns false if there are no appropriate permissions" do allow(helper).to receive(:can?) { false } @@ -26,21 +28,29 @@ describe ProjectsHelper do expect(helper.can_change_visibility_level?(project, user)).to be_truthy end + it 'allows visibility level to be changed if the project is forked' do + allow(helper).to receive(:can?).with(user, :change_visibility_level, project) { true } + project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE) + fork_project(project) + + expect(helper.can_change_visibility_level?(project, user)).to be_truthy + end + context "forks" do it "returns false if there are permissions and origin project is PRIVATE" do allow(helper).to receive(:can?) { true } - project.update visibility_level: Gitlab::VisibilityLevel::PRIVATE + project.update(visibility_level: Gitlab::VisibilityLevel::PRIVATE) - expect(helper.can_change_visibility_level?(fork_project, user)).to be_falsey + expect(helper.can_change_visibility_level?(forked_project, user)).to be_falsey end it "returns true if there are permissions and origin project is INTERNAL" do allow(helper).to receive(:can?) { true } - project.update visibility_level: Gitlab::VisibilityLevel::INTERNAL + project.update(visibility_level: Gitlab::VisibilityLevel::INTERNAL) - expect(helper.can_change_visibility_level?(fork_project, user)).to be_truthy + expect(helper.can_change_visibility_level?(forked_project, user)).to be_truthy end end end diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_failed_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_failed_spec.js index 6042d7384d5..95c94e95e3a 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_failed_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_failed_spec.js @@ -1,32 +1,47 @@ import Vue from 'vue'; -import autoMergeFailedComponent from '~/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed'; - -const mergeError = 'This is the merge error'; +import autoMergeFailedComponent from '~/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue'; +import eventHub from '~/vue_merge_request_widget/event_hub'; +import mountComponent from '../../../helpers/vue_mount_component_helper'; describe('MRWidgetAutoMergeFailed', () => { - describe('props', () => { - it('should have props', () => { - const mrProp = autoMergeFailedComponent.props.mr; + let vm; + const mergeError = 'This is the merge error'; - expect(mrProp.type instanceof Object).toBeTruthy(); - expect(mrProp.required).toBeTruthy(); + beforeEach(() => { + const Component = Vue.extend(autoMergeFailedComponent); + vm = mountComponent(Component, { + mr: { mergeError }, }); }); - describe('template', () => { - const Component = Vue.extend(autoMergeFailedComponent); - const vm = new Component({ - el: document.createElement('div'), - propsData: { - mr: { mergeError }, - }, - }); + afterEach(() => { + vm.$destroy(); + }); + + it('renders failed message', () => { + expect(vm.$el.textContent).toContain('This merge request failed to be merged automatically'); + }); + + it('renders merge error provided', () => { + expect(vm.$el.innerText).toContain(mergeError); + }); + + it('render refresh button', () => { + expect(vm.$el.querySelector('button').textContent.trim()).toEqual('Refresh'); + }); + + it('emits event and shows loading icon when button is clicked', (done) => { + spyOn(eventHub, '$emit'); + vm.$el.querySelector('button').click(); + + expect(eventHub.$emit.calls.argsFor(0)[0]).toEqual('MRWidgetUpdateRequested'); - it('should have correct elements', () => { - expect(vm.$el.classList.contains('mr-widget-body')).toBeTruthy(); - expect(vm.$el.querySelector('button').getAttribute('disabled')).toBeFalsy(); - expect(vm.$el.innerText).toContain('This merge request failed to be merged automatically'); - expect(vm.$el.innerText).toContain(mergeError); + Vue.nextTick(() => { + expect(vm.$el.querySelector('button').getAttribute('disabled')).toEqual('disabled'); + expect( + vm.$el.querySelector('button i').classList, + ).toContain('fa-spinner'); + done(); }); }); }); diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js index 9230b5874df..073f26cc78f 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js @@ -170,14 +170,14 @@ describe('MRWidgetReadyToMerge', () => { expect(vm.iconClass).toEqual('success'); }); - it('shows x for failed status', () => { + it('shows warning icon for failed status', () => { vm.mr.hasCI = true; - expect(vm.iconClass).toEqual('failed'); + expect(vm.iconClass).toEqual('warning'); }); - it('shows x for merge not allowed', () => { + it('shows warning icon for merge not allowed', () => { vm.mr.hasCI = true; - expect(vm.iconClass).toEqual('failed'); + expect(vm.iconClass).toEqual('warning'); }); }); diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb index 07eb5b82d5f..8706c89c147 100644 --- a/spec/lib/gitlab/git/blob_spec.rb +++ b/spec/lib/gitlab/git/blob_spec.rb @@ -16,6 +16,18 @@ describe Gitlab::Git::Blob, seed_helper: true do end shared_examples 'finding blobs' do + context 'nil path' do + let(:blob) { Gitlab::Git::Blob.find(repository, SeedRepo::Commit::ID, nil) } + + it { expect(blob).to eq(nil) } + end + + context 'blank path' do + let(:blob) { Gitlab::Git::Blob.find(repository, SeedRepo::Commit::ID, '') } + + it { expect(blob).to eq(nil) } + end + context 'file in subdir' do let(:blob) { Gitlab::Git::Blob.find(repository, SeedRepo::Commit::ID, "files/ruby/popen.rb") } diff --git a/spec/lib/gitlab/profiler_spec.rb b/spec/lib/gitlab/profiler_spec.rb new file mode 100644 index 00000000000..4a43dbb2371 --- /dev/null +++ b/spec/lib/gitlab/profiler_spec.rb @@ -0,0 +1,156 @@ +require 'spec_helper' + +describe Gitlab::Profiler do + RSpec::Matchers.define_negated_matcher :not_change, :change + + let(:null_logger) { Logger.new('/dev/null') } + let(:private_token) { 'private' } + + describe '.profile' do + let(:app) { double(:app) } + + before do + allow(ActionDispatch::Integration::Session).to receive(:new).and_return(app) + allow(app).to receive(:get) + end + + it 'returns a profile result' do + expect(described_class.profile('/')).to be_an_instance_of(RubyProf::Profile) + end + + it 'uses the custom logger given' do + expect(described_class).to receive(:create_custom_logger) + .with(null_logger, private_token: anything) + .and_call_original + + described_class.profile('/', logger: null_logger) + end + + it 'sends a POST request when data is passed' do + post_data = '{"a":1}' + + expect(app).to receive(:post).with(anything, post_data, anything) + + described_class.profile('/', post_data: post_data) + end + + it 'uses the private_token for auth if given' do + expect(app).to receive(:get).with('/', nil, 'Private-Token' => private_token) + expect(app).to receive(:get).with('/api/v4/users') + + described_class.profile('/', private_token: private_token) + end + + it 'uses the user for auth if given' do + user = double(:user) + user_token = 'user' + + allow(user).to receive_message_chain(:personal_access_tokens, :active, :pluck, :first).and_return(user_token) + + expect(app).to receive(:get).with('/', nil, 'Private-Token' => user_token) + expect(app).to receive(:get).with('/api/v4/users') + + described_class.profile('/', user: user) + end + + it 'uses the private_token for auth if both it and user are set' do + user = double(:user) + user_token = 'user' + + allow(user).to receive_message_chain(:personal_access_tokens, :active, :pluck, :first).and_return(user_token) + + expect(app).to receive(:get).with('/', nil, 'Private-Token' => private_token) + expect(app).to receive(:get).with('/api/v4/users') + + described_class.profile('/', user: user, private_token: private_token) + end + end + + describe '.create_custom_logger' do + it 'does nothing when nil is passed' do + expect(described_class.create_custom_logger(nil)).to be_nil + end + + context 'the new logger' do + let(:custom_logger) do + described_class.create_custom_logger(null_logger, private_token: private_token) + end + + it 'does not affect the existing logger' do + expect(null_logger).not_to receive(:debug) + expect(custom_logger).to receive(:debug).and_call_original + + custom_logger.debug('Foo') + end + + it 'strips out the private token' do + expect(custom_logger).to receive(:add) do |severity, _progname, message| + expect(severity).to eq(Logger::DEBUG) + expect(message).to include('public').and include(described_class::FILTERED_STRING) + expect(message).not_to include(private_token) + end + + custom_logger.debug("public #{private_token}") + end + + it 'tracks model load times by model' do + custom_logger.debug('This is not a model load') + custom_logger.debug('User Load (1.2ms)') + custom_logger.debug('User Load (1.3ms)') + custom_logger.debug('Project Load (10.4ms)') + + expect(custom_logger.load_times_by_model).to eq('User' => 2.5, + 'Project' => 10.4) + end + + it 'logs the backtrace, ignoring lines as appropriate' do + # Skip Rails's backtrace cleaning. + allow(Rails.backtrace_cleaner).to receive(:clean, &:itself) + + expect(custom_logger).to receive(:add) + .with(Logger::DEBUG, + anything, + a_string_matching(File.basename(__FILE__))) + .twice + + expect(custom_logger).not_to receive(:add).with(Logger::DEBUG, + anything, + a_string_matching('lib/gitlab/profiler.rb')) + + # Force a part of the backtrace to be in the (ignored) profiler source + # file. + described_class.with_custom_logger(nil) { custom_logger.debug('Foo') } + end + end + end + + describe '.with_custom_logger' do + context 'when the logger is set' do + it 'uses the replacement logger for the duration of the block' do + expect(null_logger).to receive(:debug).and_call_original + + expect { described_class.with_custom_logger(null_logger) { ActiveRecord::Base.logger.debug('foo') } } + .to not_change { ActiveRecord::Base.logger } + .and not_change { ActionController::Base.logger } + .and not_change { ActiveSupport::LogSubscriber.colorize_logging } + end + + it 'returns the result of the block' do + expect(described_class.with_custom_logger(null_logger) { 2 }).to eq(2) + end + end + + context 'when the logger is nil' do + it 'returns the result of the block' do + expect(described_class.with_custom_logger(nil) { 2 }).to eq(2) + end + + it 'does not modify the standard Rails loggers' do + expect { described_class.with_custom_logger(nil) { } } + .to not_change { ActiveRecord::Base.logger } + .and not_change { ActionController::Base.logger } + .and not_change { ActiveSupport::LogSubscriber.colorize_logging } + end + end + end +end diff --git a/spec/migrations/remove_empty_fork_networks_spec.rb b/spec/migrations/remove_empty_fork_networks_spec.rb index cf6ae5cda74..7f7ce91378b 100644 --- a/spec/migrations/remove_empty_fork_networks_spec.rb +++ b/spec/migrations/remove_empty_fork_networks_spec.rb @@ -3,12 +3,19 @@ require Rails.root.join('db', 'post_migrate', '20171114104051_remove_empty_fork_ describe RemoveEmptyForkNetworks, :migration do let!(:fork_networks) { table(:fork_networks) } + let!(:projects) { table(:projects) } + let!(:fork_network_members) { table(:fork_network_members) } - let(:deleted_project) { create(:project) } - let!(:empty_network) { create(:fork_network, id: 1, root_project_id: deleted_project.id) } - let!(:other_network) { create(:fork_network, id: 2, root_project_id: create(:project).id) } + let(:deleted_project) { projects.create! } + let!(:empty_network) { fork_networks.create!(id: 1, root_project_id: deleted_project.id) } + let!(:other_network) { fork_networks.create!(id: 2, root_project_id: projects.create.id) } before do + fork_network_members.create(fork_network_id: empty_network.id, + project_id: empty_network.root_project_id) + fork_network_members.create(fork_network_id: other_network.id, + project_id: other_network.root_project_id) + deleted_project.destroy! end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 987be8e8b46..4d10df410ab 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1951,6 +1951,10 @@ describe Project do expect(second_fork.fork_source).to eq(project) end + + it 'returns nil if it is the root of the fork network' do + expect(project.fork_source).to be_nil + end end describe '#lfs_storage_project' do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8d0eaf565a7..762cec9b95e 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -966,6 +966,14 @@ describe User do expect(described_class.search(user3.username.upcase)).to eq([user3]) end end + + it 'returns no matches for an empty string' do + expect(described_class.search('')).to be_empty + end + + it 'returns no matches for nil' do + expect(described_class.search(nil)).to be_empty + end end describe '.search_with_secondary_emails' do @@ -1020,6 +1028,14 @@ describe User do it 'does not return users with a matching part of secondary email' do expect(search_with_secondary_emails(email.email[1..4])).not_to include([email.user]) end + + it 'returns no matches for an empty string' do + expect(search_with_secondary_emails('')).to be_empty + end + + it 'returns no matches for nil' do + expect(search_with_secondary_emails(nil)).to be_empty + end end describe '.find_by_ssh_key_id' do diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 2783c51b8df..884a258fd12 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -317,35 +317,20 @@ describe API::Internal do end context "git pull" do - context "gitaly disabled", :disable_gitaly do - it "has the correct payload" do - pull(key, project) - - expect(response).to have_gitlab_http_status(200) - expect(json_response["status"]).to be_truthy - expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) - expect(json_response["gl_repository"]).to eq("project-#{project.id}") - expect(json_response["gitaly"]).to be_nil - expect(user).to have_an_activity_record - end - end - - context "gitaly enabled" do - it "has the correct payload" do - pull(key, project) + it "has the correct payload" do + pull(key, project) - expect(response).to have_gitlab_http_status(200) - expect(json_response["status"]).to be_truthy - expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) - expect(json_response["gl_repository"]).to eq("project-#{project.id}") - expect(json_response["gitaly"]).not_to be_nil - expect(json_response["gitaly"]["repository"]).not_to be_nil - expect(json_response["gitaly"]["repository"]["storage_name"]).to eq(project.repository.gitaly_repository.storage_name) - expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) - expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) - expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) - expect(user).to have_an_activity_record - end + expect(response).to have_gitlab_http_status(200) + expect(json_response["status"]).to be_truthy + expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) + expect(json_response["gl_repository"]).to eq("project-#{project.id}") + expect(json_response["gitaly"]).not_to be_nil + expect(json_response["gitaly"]["repository"]).not_to be_nil + expect(json_response["gitaly"]["repository"]["storage_name"]).to eq(project.repository.gitaly_repository.storage_name) + expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) + expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) + expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) + expect(user).to have_an_activity_record end end diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb index 5d4f81e07a6..73bd4785b11 100644 --- a/spec/requests/api/members_spec.rb +++ b/spec/requests/api/members_spec.rb @@ -65,6 +65,16 @@ describe API::Members do expect(json_response.count).to eq(1) expect(json_response.first['username']).to eq(master.username) end + + it 'finds all members with no query specified' do + get api("/#{source_type.pluralize}/#{source.id}/members", developer), query: '' + + expect(response).to have_gitlab_http_status(200) + expect(response).to include_pagination_headers + expect(json_response).to be_an Array + expect(json_response.count).to eq(2) + expect(json_response.map { |u| u['id'] }).to match_array [master.id, developer.id] + end end end diff --git a/spec/requests/api/protected_branches_spec.rb b/spec/requests/api/protected_branches_spec.rb index 10e6a3c07c8..1d23e023bb6 100644 --- a/spec/requests/api/protected_branches_spec.rb +++ b/spec/requests/api/protected_branches_spec.rb @@ -80,6 +80,12 @@ describe API::ProtectedBranches do it_behaves_like 'protected branch' end + + context 'when protected branch contains a period' do + let(:protected_name) { 'my.feature' } + + it_behaves_like 'protected branch' + end end context 'when authenticated as a guest' do diff --git a/spec/requests/api/v3/members_spec.rb b/spec/requests/api/v3/members_spec.rb index b91782ae511..de4339ecb8b 100644 --- a/spec/requests/api/v3/members_spec.rb +++ b/spec/requests/api/v3/members_spec.rb @@ -58,6 +58,16 @@ describe API::V3::Members do expect(json_response.count).to eq(1) expect(json_response.first['username']).to eq(master.username) end + + it 'finds all members with no query specified' do + get v3_api("/#{source_type.pluralize}/#{source.id}/members", developer), query: '' + + expect(response).to have_gitlab_http_status(200) + expect(response).to include_pagination_headers + expect(json_response).to be_an Array + expect(json_response.count).to eq(2) + expect(json_response.map { |u| u['id'] }).to match_array [master.id, developer.id] + end end end diff --git a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml index eec356b9f47..5ebad58e171 100644 --- a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml @@ -42,6 +42,7 @@ stages: - build - test - review + - dast - staging - canary - production @@ -130,6 +131,23 @@ sast:container: artifacts: paths: [gl-sast-container-report.json] +dast: + stage: dast + allow_failure: true + image: owasp/zap2docker-stable + variables: + POSTGRES_DB: "false" + script: + - dast + artifacts: + paths: [gl-dast-report.json] + only: + refs: + - branches + kubernetes: active + except: + - master + review: stage: review script: @@ -270,8 +288,8 @@ production: docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1 apk add -U wget ca-certificates docker pull ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} - wget https://github.com/arminc/clair-scanner/releases/download/v6/clair-scanner_linux_386 - mv clair-scanner_linux_386 clair-scanner + wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 + mv clair-scanner_linux_amd64 clair-scanner chmod +x clair-scanner touch clair-whitelist.yml ./clair-scanner -c http://docker:6060 --ip $(hostname -i) -r gl-sast-container-report.json -l clair.log -w clair-whitelist.yml ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} || true @@ -327,6 +345,12 @@ production: replicas="$new_replicas" fi + if [[ "$CI_PROJECT_VISIBILITY" != "public" ]]; then + secret_name='gitlab-registry' + else + secret_name='' + fi + helm upgrade --install \ --wait \ --set service.enabled="$service_enabled" \ @@ -334,6 +358,7 @@ production: --set image.repository="$CI_APPLICATION_REPOSITORY" \ --set image.tag="$CI_APPLICATION_TAG" \ --set image.pullPolicy=IfNotPresent \ + --set image.secrets[0].name="$secret_name" \ --set application.track="$track" \ --set application.database_url="$DATABASE_URL" \ --set service.url="$CI_ENVIRONMENT_URL" \ @@ -462,6 +487,11 @@ production: } function create_secret() { + echo "Create secret..." + if [[ "$CI_PROJECT_VISIBILITY" == "public" ]]; then + return + fi + kubectl create secret -n "$KUBE_NAMESPACE" \ docker-registry gitlab-registry \ --docker-server="$CI_REGISTRY" \ @@ -471,6 +501,14 @@ production: -o yaml --dry-run | kubectl replace -n "$KUBE_NAMESPACE" --force -f - } + function dast() { + export CI_ENVIRONMENT_URL=$(cat environment_url.txt) + + mkdir /zap/wrk/ + /zap/zap-baseline.py -J gl-dast-report.json -t "$CI_ENVIRONMENT_URL" || true + cp /zap/wrk/gl-dast-report.json . + } + function performance() { export CI_ENVIRONMENT_URL=$(cat environment_url.txt) |