diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7304b9c057..30c21b452e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -815,8 +815,6 @@ lint:javascript:report: - setup-test-env before_script: [] script: - - date - - find app/ spec/ -name '*.js' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files - date - yarn run eslint-report || true # ignore exit code artifacts: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d843c3f318..eabacbc2e1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,246 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 11.0.0 (2018-06-22) + +### Security (3 changes) + +- Fix API to remove deploy key from project instead of deleting it entirely. +- Fixed bug that allowed importing arbitrary project attributes. +- Prevent user passwords from being changed without providing the previous password. + +### Removed (2 changes) + +- Removed API v3 from the codebase. !18970 +- Removes outdated `g t` shortcut for TODO in favor of `Shift+T`. !19002 + +### Fixed (69 changes, 23 of them are from the community) + +- Optimize the upload migration proces. !15947 +- Import bitbucket issues that are reported by an anonymous user. !18199 (bartl) +- Fix an issue where the notification email address would be set to an unconfirmed email address. !18474 +- Stop logging email information when emails are disabled. !18521 (Marc Shaw) +- Fix double-brackets being linkified in wiki markdown. !18524 (brewingcode) +- Use case in-sensitive ordering by name for dashboard. !18553 (@vedharish) +- Fix width of contributors graphs. !18639 (Paul Vorbach) +- Fix modal width of shorcuts help page. !18766 (Lars Greiss) +- Add missing tooltip to creation date on container registry overview. !18767 (Lars Greiss) +- Add missing migration for minimal Project build_timeout. !18775 +- Update commit status from external CI services less aggressively. !18802 +- Fix Runner contacted at tooltip cache. !18810 +- Added support for LFS Download in the importing process. !18871 +- Fix issue board bug with long strings in titles. !18924 +- Does not log failed sign-in attempts when the database is in read-only mode. !18957 +- Fixes 500 error on /estimate BIG_VALUE. !18964 (Jacopo Beschi @jacopo-beschi) +- Forbid to patch traces for finished jobs. !18969 +- Do not allow to trigger manual actions that were skipped. !18985 +- Renamed 'Overview' to 'Project' in collapsed contextual navigation at a project level. !18996 (Constance Okoghenun) +- Fixed bug where generated api urls didn't add the base url if set. !19003 +- Fixed badge api endpoint route when relative url is set. !19004 +- Fixes: Runners search input placeholder is cut off. !19015 (Jacopo Beschi @jacopo-beschi) +- Exclude CI_PIPELINE_ID from variables supported in dynamic environment name. !19032 +- Updates updated_at on label changes. !19065 (Jacopo Beschi @jacopo-beschi) +- Disallow updating job status if the job is not running. !19101 +- Fix FreeBSD can not upload artifacts due to wrong tmp path. !19148 +- Check for nil AutoDevOps when saving project CI/CD settings. !19190 +- Missing timeout value in object storage pre-authorization. !19201 +- Use strings as properties key in kubernetes service spec. !19265 (Jasper Maes) +- Fixed HTTP_PROXY environment not honored when reading remote traces. !19282 (NLR) +- Updates ReactiveCaching clear_reactive_caching method to clear both data and alive caching. !19311 +- Fixes the styling on the modal headers. !19312 (samdbeckham) +- Fixes a spelling error on the new label page. !19316 (samdbeckham) +- Rails5 fix arel from. !19340 (Jasper Maes) +- Support rails5 in postgres indexes function and fix some migrations. !19400 (Jasper Maes) +- Fix repository archive generation when hashed storage is enabled. !19441 +- Rails 5 fix unknown keywords: changes, key_id, project, gl_repository, action, secret_token, protocol. !19466 (Jasper Maes) +- Rails 5 fix glob spec. !19469 (Jasper Maes) +- Showing project import_status in a humanized form no longer gives an error. !19470 +- Make avatars/icons hidden on mobile. !19585 (Takuya Noguchi) +- Fix active tab highlight when creating new merge request. !19781 (Jan Beckmann) +- Fixes Web IDE button on merge requests when GitLab is installed with relative URL. +- Unverified hover state color changed to black. +- Fix   after sign-in with Google button. +- Don't trim incoming emails that create new issues. (Cameron Crockett) +- Wrapping problem on the issues page has been fixed. +- Fix resolvable check if note's commit could not be found. +- Fix filename matching when processing file or blob search results. +- Allow maintainers to retry pipelines on forked projects (if allowed in merge request). +- Fix deletion of Object Store uploads. +- Fix overflowing Failed Jobs table in sm viewports on IE11. +- Adjust insufficient diff hunks being persisted on NoteDiffFile. +- Render calendar feed inline when accessed from GitLab. +- Line height fixed. (Murat Dogan) +- Use upload ID for creating lease key for file uploaders. +- Use Github repo visibility during import while respecting restricted visibility levels. +- Adjust permitted params filtering on merge scheduling. +- Fix unscrollable Markdown preview of WebIDE on Firefox. +- Enforce UTF-8 encoding on user input in LogrageWithTimestamp formatter and filter out file content from logs. +- Fix project destruction failing due to idle in transaction timeouts. +- Add a unique and not null constraint on the project_features.project_id column. +- Expire Wiki content cache after importing a repository. +- Fix admin counters not working when PostgreSQL has secondaries. +- Fix backup creation and restore for specific Rake tasks. +- Fix cross-origin errors when attempting to download JavaScript attachments. +- Fix api_json.log not always reporting the right HTTP status code. +- Fix attr_encryption key settings. +- Remove gray button styles. +- Fix print styles for markdown pages. + +### Deprecated (4 changes) + +- Deprecate Gemnasium project service. !18954 +- Rephrasing Merge Request's 'allow edits from maintainer' functionality. !19061 +- Rename issue scope created-by-me to created_by_me, and assigned-to-me to assigned_to_me. !44799 +- Migrate any remaining jobs from deprecated `object_storage_upload` queue. + +### Changed (42 changes, 11 of them are from the community) + +- Add support for smarter system notes. !17164 +- Automatically accepts project/group invite by email after user signup. !17634 (Jacopo Beschi @jacopo-beschi) +- Dynamically fetch GCP cluster creation parameters. !17806 +- Label list page redesign. !18466 +- Move discussion actions to the right for small viewports. !18476 (George Tsiolis) +- Add 2FA filter to the group members page. !18483 +- made listing and showing public issue apis available without authentication. !18638 (haseebeqx) +- Refactoring UrlValidators to include url blocking. !18686 +- Removed "(Beta)" from "Auto DevOps" messages. !18759 +- Expose runner ip address to runners API. !18799 (Lars Greiss) +- Moves MR widget external link icon to the right. !18828 (Jacopo Beschi @jacopo-beschi) +- Add support for 'active' setting on Runner Registration API endpoint. !18848 +- Add dot to separate system notes content. !18864 +- Remove modalbox confirmation when retrying a pipeline. !18879 +- Remove docker pull prefix from registry clipboard feature. !18933 (Lars Greiss) +- Move project sidebar sub-entries 'Environments' and 'Kubernetes' from 'CI/CD' to a new entry 'Operations'. !18941 +- Updated icons for branch and tag names in commit details. !18953 (Constance Okoghenun) +- Expose readme url in Project API. !18960 (Imre Farkas) +- Changes keyboard shortcut of Activity feed to `g v`. !19002 +- Updated Mattermost integration to use API v4 and only allow creation of Mattermost slash commands in the current user's teams. !19043 (Harrison Healey) +- Add shortcuts to Web IDE docs and modal. !19044 +- Rename merge request widget author component. !19079 (George Tsiolis) +- Rename the Master role to Maintainer. !19080 +- Use "right now" for short time periods. !19095 +- Update 404 and 403 pages with helpful actions. !19096 +- Add username to terms message in git and API calls. !19126 +- Change the IDE file buttons for an "Open in file view" button. !19129 (Sam Beckham) +- Removes redundant script failure message from Job page. !19138 +- Add flash notice if user has already accepted terms and allow users to continue to root path. !19156 +- Redesign group settings page into expandable sections. !19184 +- Hashed Storage: migration rake task now can be executed to specific project. !19268 +- Make CI job update entrypoint to work as keep-alive endpoint. !19543 +- Avoid checking the user format in every url validation. !19575 +- Apply notification settings level of groups to all child objects. +- Support restoring repositories into gitaly. +- Bump omniauth-gitlab to 1.0.3. +- Move API group deletion to Sidekiq. +- Improve Failed Jobs tab in the Pipeline detail page. +- Add additional theme color options. +- Include milestones from parent groups when assigning a milestone to an issue or merge request. +- Restore API v3 user endpoint. +- Hide merge request option in IDE when disabled. + +### Performance (28 changes, 1 of them is from the community) + +- Add backgound migration for filling nullfied file_store columns. !18557 +- Add a cronworker to rescue stale live traces. !18680 +- Move SquashBeforeMerge vue component. !18813 (George Tsiolis) +- Add index on runner_type for ci_runners. !18897 +- Fix CarrierWave reads local files into memoery when migrates to ObjectStorage. !19102 +- Remove double-checked internal id generation. !19181 +- Throttle updates to Project#last_repository_updated_at. !19183 +- Add background migrations for archiving legacy job traces. !19194 +- Use NPM provided version of SortableJS. !19274 +- Improve performance of group issues filtering on GitLab.com. !19429 +- Improve performance of LFS integrity check. !19494 +- Fix an N+1 when loading user avatars. +- Only preload member records for the relevant projects/groups/user in projects API. +- Fix some sources of excessive query counts when calculating notification recipients. +- Optimise PagesWorker usage. +- Optimise paused runners to reduce amount of used requests. +- Update runner cached informations without performing validations. +- Improve performance of project pipelines pages. +- Persist truncated note diffs on a new table. +- Remove unused running_or_pending_build_count. +- Remove N+1 query for author in issues API. +- Eliminate N+1 queries with authors and push_data_payload in Events API. +- Eliminate cached N+1 queries for projects in Issue API. +- Eliminate N+1 queries for CI job artifacts in /api/prjoects/:id/pipelines/:pipeline_id/jobs. +- Fix N+1 with source_projects in merge requests API. +- Replace grape-route-helpers with our own grape-path-helpers. +- Move PR IO operations out of a transaction. +- Improve performance of GroupsController#show. + +### Added (25 changes, 10 of them are from the community) + +- Closes MR check out branch modal with escape. (19050) +- Allow changing the default favicon to a custom icon. !14497 (Alexis Reigel) +- Export assigned issues in iCalendar feed. !17783 (Imre Farkas) +- When MR becomes unmergeable, notify and create todo for author and merge user. !18042 +- Display help text below auto devops domain with nip.io domain name (#45561). !18496 +- Add per-project pipeline id. !18558 +- New design for wiki page deletion confirmation. !18712 (Constance Okoghenun) +- Updates updated_at on issuable when setting time spent. !18757 (Jacopo Beschi @jacopo-beschi) +- Expose artifacts_expire_at field for job entity in api. !18872 (Semyon Pupkov) +- Add support for variables expression pattern matching syntax. !18902 +- Add API endpoint to render markdown text. !18926 (@blackst0ne) +- Add `Squash and merge` to GitLab Core (CE). !18956 (@blackst0ne) +- Adds keyboard shortcut `g k` for Kubernetes on Project pages. !19002 +- Adds keyboard shortcut `g e` for Environments on Project pages. !19002 +- Setup graphql with initial project & merge request query. !19008 +- Adds JupyterHub to cluster applications. !19019 +- Added ability to search by wiki titles. !19112 +- Add Avatar API. !19121 (Imre Farkas) +- Add variables to POST api/v4/projects/:id/pipeline. !19124 (Jacopo Beschi @jacopo-beschi) +- Add deploy strategies to the Auto DevOps settings. !19172 +- Automatize Deploy Token creation for Auto Devops. !19507 +- Add anchor for incoming email regex. +- Support direct_upload with S3 Multipart uploads. +- Add Open in Xcode link for xcode repositories. +- Add pipeline status to the status bar of the Web IDE. + +### Other (40 changes, 17 of them are from the community) + +- Expand documentation for Runners API. !16484 +- Order UsersController#projects.json by updated_at. !18227 (Takuya Noguchi) +- Replace the `project/issues/references.feature` spinach test with an rspec analog. !18769 (@blackst0ne) +- Replace the `project/merge_requests/references.feature` spinach test with an rspec analog. !18794 (@blackst0ne) +- Replace the `project/deploy_keys.feature` spinach test with an rspec analog. !18796 (@blackst0ne) +- Replace the `project/ff_merge_requests.feature` spinach test with an rspec analog. !18800 (@blackst0ne) +- Apply NestingDepth (level 5) (pages/pipelines.scss). !18830 (Takuya Noguchi) +- Replace the `project/forked_merge_requests.feature` spinach test with an rspec analog. !18867 (@blackst0ne) +- Remove Spinach. !18869 (@blackst0ne) +- Add NOT NULL constraints to project_authorizations. !18980 +- Add helpful messages to empty wiki view. !19007 +- Increase text limit for GPG keys (mysql only). !19069 +- Take two for MR metrics population background migration. !19097 +- Remove Gemnasium badge from project README.md. !19136 (Takuya Noguchi) +- Update awesome_print to 1.8.0. !19163 (Takuya Noguchi) +- Update email_spec to 2.2.0. !19164 (Takuya Noguchi) +- Update redis-namespace to 1.6.0. !19166 (Takuya Noguchi) +- Update rdoc to 6.0.4. !19167 (Takuya Noguchi) +- Updates the version of kubeclient from 3.0 to 3.1.0. !19199 +- Fix UI broken in line profiling modal due to Bootstrap 4. !19253 (Takuya Noguchi) +- Add migration to disable the usage of DSA keys. !19299 +- Use the default strings of timeago.js for timeago. !19350 (Takuya Noguchi) +- Update selenium-webdriver to 3.12.0. !19351 (Takuya Noguchi) +- Include username in output when testing SSH to GitLab. !19358 +- Update screenshot in Gitlab.com integration documentation. !19433 (Tuğçe Nur Taş) +- Users can accept terms during registration. !19583 +- Fix issue count on sidebar. +- Add merge requests list endpoint for groups. +- Upgrade GitLab from Bootstrap 3 to 4. +- Make ActiveRecordSubscriber rails 5 compatible. +- Show a more helpful error for import status. +- Log response body to production_json.log when a controller responds with a 422 status. +- Log Workhorse queue duration for Grape API calls. +- Adjust SQL and transaction Prometheus buckets. +- Adding branches through the WebUI is handled by Gitaly. +- Remove shellout implementation for Repository checksums. +- Refs containting sha checks are done by Gitaly. +- Finding a wiki page is done by Gitaly by default. +- Workhorse will use Gitaly to create archives. +- Workhorse to send raw diff and patch for commits. + + ## 10.8.4 (2018-06-06) - No changes. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcdf520ee6b..f7b12e17c70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,25 +27,26 @@ _This notice should stay as the first item in the CONTRIBUTING.md file._ - [Helping others](#helping-others) - [I want to contribute!](#i-want-to-contribute) - [Workflow labels](#workflow-labels) - - [Type labels (~"feature proposal", ~bug, ~customer, etc.)](#type-labels-feature-proposal-bug-customer-etc) - - [Subject labels (~wiki, ~"container registry", ~ldap, ~api, etc.)](#subject-labels-wiki-container-registry-ldap-api-etc) - - [Team labels (~"CI/CD", ~Discussion, ~Quality, ~Platform, etc.)](#team-labels-cicd-discussion-quality-platform-etc) - - [Milestone labels (~Deliverable, ~Stretch, ~"Next Patch Release")](#milestone-labels-deliverable-stretch-next-patch-release) - - [Priority labels (~P1, ~P2, ~P3 , ~P4)](#bug-priority-labels-p1-p2-p3-p4) - - [Severity labels (~S1, ~S2, ~S3 , ~S4)](#bug-severity-labels-s1-s2-s3-s4) - - [Label for community contributors (~"Accepting Merge Requests")](#label-for-community-contributors-accepting-merge-requests) -- [Implement design & UI elements](#implement-design--ui-elements) + - [Type labels](#type-labels) + - [Subject labels](#subject-labels) + - [Team labels](#team-labels) + - [Release Scoping labels](#release-scoping-labels) + - [Bug Priority labels](#bug-priority-labels) + - [Bug Severity labels](#bug-severity-labels) + - [Severity impact guidance](#severity-impact-guidance) + - [Label for community contributors](#label-for-community-contributors) +- [Implement design & UI elements](#implement-design-ui-elements) - [Issue tracker](#issue-tracker) - - [Issue triaging](#issue-triaging) - - [Feature proposals](#feature-proposals) - - [Issue tracker guidelines](#issue-tracker-guidelines) - - [Issue weight](#issue-weight) - - [Regression issues](#regression-issues) - - [Technical and UX debt](#technical-and-ux-debt) - - [Stewardship](#stewardship) + - [Issue triaging](#issue-triaging) + - [Feature proposals](#feature-proposals) + - [Issue tracker guidelines](#issue-tracker-guidelines) + - [Issue weight](#issue-weight) + - [Regression issues](#regression-issues) + - [Technical and UX debt](#technical-and-ux-debt) + - [Stewardship](#stewardship) - [Merge requests](#merge-requests) - - [Merge request guidelines](#merge-request-guidelines) - - [Contribution acceptance criteria](#contribution-acceptance-criteria) + - [Merge request guidelines](#merge-request-guidelines) + - [Contribution acceptance criteria](#contribution-acceptance-criteria) - [Definition of done](#definition-of-done) - [Style guides](#style-guides) - [Code of conduct](#code-of-conduct) @@ -132,7 +133,7 @@ Most issues will have labels for at least one of the following: - Type: ~"feature proposal", ~bug, ~customer, etc. - Subject: ~wiki, ~"container registry", ~ldap, ~api, ~frontend, etc. - Team: ~"CI/CD", ~Discussion, ~Quality, ~Platform, etc. -- Milestone: ~Deliverable, ~Stretch, ~"Next Patch Release" +- Release Scoping: ~Deliverable, ~Stretch, ~"Next Patch Release" - Priority: ~P1, ~P2, ~P3, ~P4 - Severity: ~S1, ~S2, ~S3, ~S4 @@ -145,7 +146,7 @@ labels, you can _always_ add the team and type, and often also the subject. [milestones-page]: https://gitlab.com/gitlab-org/gitlab-ce/milestones [labels-page]: https://gitlab.com/gitlab-org/gitlab-ce/labels -### Type labels (~"feature proposal", ~bug, ~customer, etc.) +### Type labels Type labels are very important. They define what kind of issue this is. Every issue should have one or more. @@ -161,28 +162,41 @@ already reserved for subject labels). The descriptions on the [labels page][labels-page] explain what falls under each type label. -### Subject labels (~wiki, ~"container registry", ~ldap, ~api, etc.) +### Subject labels Subject labels are labels that define what area or feature of GitLab this issue hits. They are not always necessary, but very convenient. +Examples of subject labels are ~wiki, ~ldap, ~api, +~issues, ~"merge requests", ~labels, and ~"container registry". + If you are an expert in a particular area, it makes it easier to find issues to work on. You can also subscribe to those labels to receive an email each time an issue is labeled with a subject label corresponding to your expertise. -Examples of subject labels are ~wiki, ~"container registry", ~ldap, ~api, -~issues, ~"merge requests", ~labels, and ~"container registry". - Subject labels are always all-lowercase. -### Team labels (~"CI/CD", ~Discussion, ~Quality, ~Platform, etc.) +### Team labels Team labels specify what team is responsible for this issue. Assigning a team label makes sure issues get the attention of the appropriate people. -The current team labels are ~Distribution, ~"CI/CD", ~Discussion, ~Documentation, ~Quality, -~Geo, ~Gitaly, ~Monitoring, ~Platform, ~Release, ~"Security Products", ~"Configuration", and ~"UX". +The current team labels are: + +- ~Configuration +- ~"CI/CD" +- ~Discussion +- ~Distribution +- ~Documentation +- ~Geo +- ~Gitaly +- ~Monitoring +- ~Platform +- ~Quality +- ~Release +- ~"Security Products" +- ~UX The descriptions on the [labels page][labels-page] explain what falls under the responsibility of each team. @@ -193,10 +207,10 @@ indicate if an issue needs backend work, frontend work, or both. Team labels are always capitalized so that they show up as the first label for any issue. -### Milestone labels (~Deliverable, ~Stretch, ~"Next Patch Release") +### Release Scoping labels -Milestone labels help us clearly communicate expectations of the work for the -release. There are three levels of Milestone labels: +Release Scoping labels help us clearly communicate expectations of the work for the +release. There are three levels of Release Scoping labels: - ~Deliverable: Issues that are expected to be delivered in the current milestone. @@ -211,9 +225,9 @@ Each issue scheduled for the current milestone should be labeled ~Deliverable or ~"Stretch". Any open issue for a previous milestone should be labeled ~"Next Patch Release", or otherwise rescheduled to a different milestone. -### Bug Priority labels (~P1, ~P2, ~P3, ~P4) +### Bug Priority labels -Bug Priority labels help us define the time a ~bug fix should be completed. Priority determines how quickly the defect turnaround time must be. +Bug Priority labels help us define the time a ~bug fix should be completed. Priority determines how quickly the defect turnaround time must be. If there are multiple defects, the priority decides which defect has to be fixed immediately versus later. This label documents the planned timeline & urgency which is used to measure against our actual SLA on delivering ~bug fixes. @@ -224,7 +238,7 @@ This label documents the planned timeline & urgency which is used to measure aga | ~P3 | Medium Priority | Within the next 3 releases (approx one quarter) | | | ~P4 | Low Priority | Anything outside the next 3 releases (approx beyond one quarter) | The issue is prominent but does not impact user workflow and a workaround is documented | -### Bug Severity labels (~S1, ~S2, ~S3, ~S4) +### Bug Severity labels Severity labels help us clearly communicate the impact of a ~bug on users. @@ -240,11 +254,11 @@ Severity labels help us clearly communicate the impact of a ~bug on users. | Label | Security Impact | Availability / Performance Impact | |-------|---------------------------------------------------------------------|--------------------------------------------------------------| | ~S1 | >50% users impacted (possible company extinction level event) | | -| ~S2 | Many users or multiple paid customers impacted (but not apocalyptic)| The issue is (almost) guaranteed to occur in the near future | +| ~S2 | Many users or multiple paid customers impacted (but not apocalyptic)| The issue is (almost) guaranteed to occur in the near future | | ~S3 | A few users or a single paid customer impacted | The issue is likely to occur in the near future | | ~S4 | No paid users/customer impacted, or expected impact within 30 days | The issue _may_ occur but it's not likely | -### Label for community contributors (~"Accepting Merge Requests") +### Label for community contributors Issues that are beneficial to our users, 'nice to haves', that we currently do not have the capacity for or want to give the priority to, are labeled as @@ -300,14 +314,14 @@ For guidance on UX implementation at GitLab, please refer to our [Design System] The UX team uses labels to manage their workflow. -The ~"UX" label on an issue is a signal to the UX team that it will need UX attention. +The ~"UX" label on an issue is a signal to the UX team that it will need UX attention. To better understand the priority by which UX tackles issues, see the [UX section](https://about.gitlab.com/handbook/engineering/ux) of the handbook. Once an issue has been worked on and is ready for development, a UXer removes the ~"UX" label and applies the ~"UX ready" label to that issue. -The UX team has a special type label called ~"design artifact". This label indicates that the final output +The UX team has a special type label called ~"design artifact". This label indicates that the final output for an issue is a UX solution/design. The solution will be developed by frontend and/or backend in a subsequent milestone. -Any issue labeled ~"design artifact" should not also be labeled ~"frontend" or ~"backend" since no development is +Any issue labeled ~"design artifact" should not also be labeled ~"frontend" or ~"backend" since no development is needed until the solution has been decided. ~"design artifact" issues are like any other issue and should contain a milestone label, ~"Deliverable" or ~"Stretch", when scheduled in the current milestone. diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index c64d9d48a48..a9a7f3fec01 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -0.105.1 +0.107.0 diff --git a/Gemfile b/Gemfile index 98622cdde84..945b5486437 100644 --- a/Gemfile +++ b/Gemfile @@ -299,7 +299,6 @@ gem 'peek-sidekiq', '~> 1.0.3' # Metrics group :metrics do - gem 'allocations', '~> 1.0', require: false, platform: :mri gem 'method_source', '~> 0.8', require: false gem 'influxdb', '~> 0.2', require: false @@ -419,7 +418,7 @@ group :ed25519 do end # Gitaly GRPC client -gem 'gitaly-proto', '~> 0.101.0', require: 'gitaly' +gem 'gitaly-proto', '~> 0.102.0', require: 'gitaly' gem 'grpc', '~> 1.11.0' # Locked until https://github.com/google/protobuf/issues/4210 is closed diff --git a/Gemfile.lock b/Gemfile.lock index 883e580b86b..fdc8f54e9c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -49,7 +49,6 @@ GEM public_suffix (>= 2.0.2, < 4.0) aes_key_wrap (1.0.1) akismet (2.0.0) - allocations (1.0.5) arel (6.0.4) asana (0.6.0) faraday (~> 0.9) @@ -283,7 +282,7 @@ GEM gettext_i18n_rails (>= 0.7.1) po_to_json (>= 1.0.0) rails (>= 3.2.0) - gitaly-proto (0.101.0) + gitaly-proto (0.102.0) google-protobuf (~> 3.1) grpc (~> 1.10) github-linguist (5.3.3) @@ -803,7 +802,7 @@ GEM rubyzip (1.2.1) rufus-scheduler (3.4.0) et-orbi (~> 1.0) - rugged (0.27.1) + rugged (0.27.2) safe_yaml (1.0.4) sanitize (2.1.0) nokogiri (>= 1.4.4) @@ -868,7 +867,7 @@ GEM activesupport (>= 4.2) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.1) @@ -974,7 +973,6 @@ DEPENDENCIES acts-as-taggable-on (~> 5.0) addressable (~> 2.5.2) akismet (~> 2.0) - allocations (~> 1.0) asana (~> 0.6.0) asciidoctor (~> 1.5.6) asciidoctor-plantuml (= 0.0.8) @@ -1039,7 +1037,7 @@ DEPENDENCIES gettext (~> 3.2.2) gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails_js (~> 1.3) - gitaly-proto (~> 0.101.0) + gitaly-proto (~> 0.102.0) github-linguist (~> 5.3.3) gitlab-flowdock-git-hook (~> 1.0.1) gitlab-gollum-lib (~> 4.2) diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock index 952e27df29d..679318b9be5 100644 --- a/Gemfile.rails5.lock +++ b/Gemfile.rails5.lock @@ -52,7 +52,6 @@ GEM public_suffix (>= 2.0.2, < 4.0) aes_key_wrap (1.0.1) akismet (2.0.0) - allocations (1.0.5) arel (7.1.4) asana (0.6.0) faraday (~> 0.9) @@ -286,7 +285,7 @@ GEM gettext_i18n_rails (>= 0.7.1) po_to_json (>= 1.0.0) rails (>= 3.2.0) - gitaly-proto (0.101.0) + gitaly-proto (0.102.0) google-protobuf (~> 3.1) grpc (~> 1.10) github-linguist (5.3.3) @@ -299,7 +298,7 @@ GEM flowdock (~> 0.7) gitlab-grit (>= 2.4.1) multi_json - gitlab-gollum-lib (4.2.7.2) + gitlab-gollum-lib (4.2.7.4) gemojione (~> 3.2) github-markup (~> 1.6) gollum-grit_adapter (~> 1.0) @@ -307,7 +306,7 @@ GEM rouge (~> 3.1) sanitize (~> 2.1) stringex (~> 2.6) - gitlab-gollum-rugged_adapter (0.4.4) + gitlab-gollum-rugged_adapter (0.4.4.1) mime-types (>= 1.15) rugged (~> 0.25) gitlab-grit (2.8.2) @@ -984,7 +983,6 @@ DEPENDENCIES acts-as-taggable-on (~> 5.0) addressable (~> 2.5.2) akismet (~> 2.0) - allocations (~> 1.0) asana (~> 0.6.0) asciidoctor (~> 1.5.6) asciidoctor-plantuml (= 0.0.8) @@ -1049,7 +1047,7 @@ DEPENDENCIES gettext (~> 3.2.2) gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails_js (~> 1.3) - gitaly-proto (~> 0.101.0) + gitaly-proto (~> 0.102.0) github-linguist (~> 5.3.3) gitlab-flowdock-git-hook (~> 1.0.1) gitlab-gollum-lib (~> 4.2) diff --git a/VERSION b/VERSION index 8ca9077d87b..0116f5d2c81 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.0.0-pre +11.1.0-pre diff --git a/app/assets/javascripts/activities.js b/app/assets/javascripts/activities.js index c117d080bda..de4566bb119 100644 --- a/app/assets/javascripts/activities.js +++ b/app/assets/javascripts/activities.js @@ -1,4 +1,4 @@ -/* eslint-disable no-param-reassign, class-methods-use-this */ +/* eslint-disable class-methods-use-this */ import $ from 'jquery'; import Cookies from 'js-cookie'; diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js index 0da872db7e5..fa00a3cf386 100644 --- a/app/assets/javascripts/autosave.js +++ b/app/assets/javascripts/autosave.js @@ -1,4 +1,4 @@ -/* eslint-disable no-param-reassign, prefer-template, no-var, no-void, consistent-return */ +/* eslint-disable no-param-reassign, prefer-template, no-void, consistent-return */ import AccessorUtilities from './lib/utils/accessor'; @@ -31,7 +31,9 @@ export default class Autosave { // https://github.com/vuejs/vue/issues/2804#issuecomment-216968137 const event = new Event('change', { bubbles: true, cancelable: false }); const field = this.field.get(0); - field.dispatchEvent(event); + if (field) { + field.dispatchEvent(event); + } } save() { diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js index eb0f06efab4..70f20c5c7cf 100644 --- a/app/assets/javascripts/awards_handler.js +++ b/app/assets/javascripts/awards_handler.js @@ -11,7 +11,8 @@ import axios from './lib/utils/axios_utils'; const animationEndEventString = 'animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd'; const transitionEndEventString = 'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd'; -const requestAnimationFrame = window.requestAnimationFrame || +const requestAnimationFrame = + window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.setTimeout; @@ -37,21 +38,28 @@ class AwardsHandler { this.emoji = emoji; this.eventListeners = []; // If the user shows intent let's pre-build the menu - this.registerEventListener('one', $(document), 'mouseenter focus', '.js-add-award', 'mouseenter focus', () => { - const $menu = $('.emoji-menu'); - if ($menu.length === 0) { - requestAnimationFrame(() => { - this.createEmojiMenu(); - }); - } - }); - this.registerEventListener('on', $(document), 'click', '.js-add-award', (e) => { + this.registerEventListener( + 'one', + $(document), + 'mouseenter focus', + '.js-add-award', + 'mouseenter focus', + () => { + const $menu = $('.emoji-menu'); + if ($menu.length === 0) { + requestAnimationFrame(() => { + this.createEmojiMenu(); + }); + } + }, + ); + this.registerEventListener('on', $(document), 'click', '.js-add-award', e => { e.stopPropagation(); e.preventDefault(); this.showEmojiMenu($(e.currentTarget)); }); - this.registerEventListener('on', $('html'), 'click', (e) => { + this.registerEventListener('on', $('html'), 'click', e => { const $target = $(e.target); if (!$target.closest('.emoji-menu').length) { $('.js-awards-block.current').removeClass('current'); @@ -61,12 +69,14 @@ class AwardsHandler { } } }); - this.registerEventListener('on', $(document), 'click', '.js-emoji-btn', (e) => { + this.registerEventListener('on', $(document), 'click', '.js-emoji-btn', e => { e.preventDefault(); const $target = $(e.currentTarget); const $glEmojiElement = $target.find('gl-emoji'); const $spriteIconElement = $target.find('.icon'); - const emojiName = ($glEmojiElement.length ? $glEmojiElement : $spriteIconElement).data('name'); + const emojiName = ($glEmojiElement.length ? $glEmojiElement : $spriteIconElement).data( + 'name', + ); $target.closest('.js-awards-block').addClass('current'); this.addAward(this.getVotesBlock(), this.getAwardUrl(), emojiName); @@ -83,7 +93,10 @@ class AwardsHandler { showEmojiMenu($addBtn) { if ($addBtn.hasClass('js-note-emoji')) { - $addBtn.closest('.note').find('.js-awards-block').addClass('current'); + $addBtn + .closest('.note') + .find('.js-awards-block') + .addClass('current'); } else { $addBtn.closest('.js-awards-block').addClass('current'); } @@ -177,32 +190,38 @@ class AwardsHandler { const remainingCategories = Object.keys(categoryMap).slice(1); const allCategoriesAddedPromise = remainingCategories.reduce( (promiseChain, categoryNameKey) => - promiseChain.then(() => - new Promise((resolve) => { - const emojisInCategory = categoryMap[categoryNameKey]; - const categoryMarkup = this.renderCategory( - categoryLabelMap[categoryNameKey], - emojisInCategory, - ); - requestAnimationFrame(() => { - emojiContentElement.insertAdjacentHTML('beforeend', categoryMarkup); - resolve(); - }); - }), - ), + promiseChain.then( + () => + new Promise(resolve => { + const emojisInCategory = categoryMap[categoryNameKey]; + const categoryMarkup = this.renderCategory( + categoryLabelMap[categoryNameKey], + emojisInCategory, + ); + requestAnimationFrame(() => { + emojiContentElement.insertAdjacentHTML('beforeend', categoryMarkup); + resolve(); + }); + }), + ), Promise.resolve(), ); - allCategoriesAddedPromise.then(() => { - // Used for tests - // We check for the menu in case it was destroyed in the meantime - if (menu) { - menu.dispatchEvent(new CustomEvent('build-emoji-menu-finish')); - } - }).catch((err) => { - emojiContentElement.insertAdjacentHTML('beforeend', '

We encountered an error while adding the remaining categories

'); - throw new Error(`Error occurred in addRemainingEmojiMenuCategories: ${err.message}`); - }); + allCategoriesAddedPromise + .then(() => { + // Used for tests + // We check for the menu in case it was destroyed in the meantime + if (menu) { + menu.dispatchEvent(new CustomEvent('build-emoji-menu-finish')); + } + }) + .catch(err => { + emojiContentElement.insertAdjacentHTML( + 'beforeend', + '

We encountered an error while adding the remaining categories

', + ); + throw new Error(`Error occurred in addRemainingEmojiMenuCategories: ${err.message}`); + }); } renderCategory(name, emojiList, opts = {}) { @@ -211,7 +230,9 @@ class AwardsHandler { ${name} `; } @@ -232,7 +255,7 @@ class AwardsHandler { top: `${$addBtn.offset().top + $addBtn.outerHeight()}px`, }; if (position === 'right') { - css.left = `${($addBtn.offset().left - $menu.outerWidth()) + 20}px`; + css.left = `${$addBtn.offset().left - $menu.outerWidth() + 20}px`; $menu.addClass('is-aligned-right'); } else { css.left = `${$addBtn.offset().left}px`; @@ -416,7 +439,10 @@ class AwardsHandler { `; const $emojiButton = $(buttonHtml); - $emojiButton.insertBefore(votesBlock.find('.js-award-holder')).find('.emoji-icon').data('name', emojiName); + $emojiButton + .insertBefore(votesBlock.find('.js-award-holder')) + .find('.emoji-icon') + .data('name', emojiName); this.animateEmoji($emojiButton); $('.award-control').tooltip(); votesBlock.removeClass('current'); @@ -426,7 +452,7 @@ class AwardsHandler { const className = 'pulse animated once short'; $emoji.addClass(className); - this.registerEventListener('on', $emoji, animationEndEventString, (e) => { + this.registerEventListener('on', $emoji, animationEndEventString, e => { $(e.currentTarget).removeClass(className); }); } @@ -444,15 +470,16 @@ class AwardsHandler { if (this.isUserAuthored($emojiButton)) { this.userAuthored($emojiButton); } else { - axios.post(awardUrl, { - name: emoji, - }) - .then(({ data }) => { - if (data.ok) { - callback(); - } - }) - .catch(() => flash(__('Something went wrong on our end.'))); + axios + .post(awardUrl, { + name: emoji, + }) + .then(({ data }) => { + if (data.ok) { + callback(); + } + }) + .catch(() => flash(__('Something went wrong on our end.'))); } } @@ -486,26 +513,33 @@ class AwardsHandler { } getFrequentlyUsedEmojis() { - return this.frequentlyUsedEmojis || (() => { - const frequentlyUsedEmojis = _.uniq((Cookies.get('frequently_used_emojis') || '').split(',')); - this.frequentlyUsedEmojis = frequentlyUsedEmojis.filter( - inputName => this.emoji.isEmojiNameValid(inputName), - ); + return ( + this.frequentlyUsedEmojis || + (() => { + const frequentlyUsedEmojis = _.uniq( + (Cookies.get('frequently_used_emojis') || '').split(','), + ); + this.frequentlyUsedEmojis = frequentlyUsedEmojis.filter(inputName => + this.emoji.isEmojiNameValid(inputName), + ); - return this.frequentlyUsedEmojis; - })(); + return this.frequentlyUsedEmojis; + })() + ); } setupSearch() { const $search = $('.js-emoji-menu-search'); - this.registerEventListener('on', $search, 'input', (e) => { - const term = $(e.target).val().trim(); + this.registerEventListener('on', $search, 'input', e => { + const term = $(e.target) + .val() + .trim(); this.searchEmojis(term); }); const $menu = $('.emoji-menu'); - this.registerEventListener('on', $menu, transitionEndEventString, (e) => { + this.registerEventListener('on', $menu, transitionEndEventString, e => { if (e.target === e.currentTarget) { // Clear the search this.searchEmojis(''); @@ -523,19 +557,26 @@ class AwardsHandler { // Generate a search result block const h5 = $('
').text('Search results'); const foundEmojis = this.findMatchingEmojiElements(term).show(); - const ul = $('