| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| | |
Rework project authorizations and nested groups for better performance
See merge request !10885
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit introduces the usage of Common Table Expressions (CTEs) to
efficiently retrieve nested group hierarchies, without having to rely on
the "routes" table (which is an _incredibly_ inefficient way of getting
the data). This requires a patch to ActiveRecord (found in the added
initializer) to work properly as ActiveRecord doesn't support WITH
statements properly out of the box.
Unfortunately MySQL provides no efficient way of getting nested groups.
For example, the old routes setup could easily take 5-10 seconds
depending on the amount of "routes" in a database. Providing vastly
different logic for both MySQL and PostgreSQL will negatively impact the
development process. Because of this the various nested groups related
methods return empty relations when used in combination with MySQL.
For project authorizations the logic is split up into two classes:
* Gitlab::ProjectAuthorizations::WithNestedGroups
* Gitlab::ProjectAuthorizations::WithoutNestedGroups
Both classes get the fresh project authorizations (= as they should be
in the "project_authorizations" table), including nested groups if
PostgreSQL is used. The logic of these two classes is quite different
apart from their public interface. This complicates development a bit,
but unfortunately there is no way around this.
This commit also introduces Gitlab::GroupHierarchy. This class can be
used to get the ancestors and descendants of a base relation, or both by
using a UNION. This in turn is used by methods such as:
* Namespace#ancestors
* Namespace#descendants
* User#all_expanded_groups
Again this class relies on CTEs and thus only works on PostgreSQL. The
Namespace methods will return an empty relation when MySQL is used,
while User#all_expanded_groups will return only the groups a user is a
direct member of.
Performance wise the impact is quite large. For example, on GitLab.com
Namespace#descendants used to take around 580 ms to retrieve data for a
particular user. Using CTEs we are able to reduce this down to roughly 1
millisecond, returning the exact same data.
== On The Fly Refreshing
Refreshing of authorizations on the fly (= when
users.authorized_projects_populated was not set) is removed with this
commit. This simplifies the code, and ensures any queries used for
authorizations are not mutated because they are executed in a Rails
scope (e.g. Project.visible_to_user).
This commit includes a migration to schedule refreshing authorizations
for all users, ensuring all of them have their authorizations in place.
Said migration schedules users in batches of 5000, with 5 minutes
between every batch to smear the load around a bit.
== Spec Changes
This commit also introduces some changes to various specs. For example,
some specs for ProjectTeam assumed that creating a personal project
would _not_ lead to the owner having access, which is incorrect. Because
we also no longer refresh authorizations on the fly for new users some
code had to be added to the "empty_project" factory. This chunk of code
ensures that the owner's permissions are refreshed after creating the
project, something that is normally done in Projects::CreateService.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Fix terminals support for Kubernetes service
Closes #31754
See merge request !11653
|
| | |
| | |
| | |
| | | |
It was broken, because we introduced a default namespace, which was not used by terminal methods.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
Implement Web Hooks calls logging
Closes #17848
See merge request !11027
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* implemented logging of project and system web hooks
* implemented UI for user area (project hooks)
* implemented UI for admin area (system hooks)
* implemented retry of logged webhook
* NOT imeplemented log remover
|
| | |
| | |
| | |
| | |
| | | |
otherwise we'll have to use `user.reload` in the specs to get the
current rss_token value.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Add transient head_pipeline_of to pipeline factories
See merge request !11566
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Squashed commit of the following:
commit 43e5bba774e9e383dd55c665e82f6fcfc4ebfc4f
Author: Shinya Maeda <gitlab.shinyamaeda@gmail.com>
Date: Mon Apr 17 17:28:44 2017 +0900
Add fix
commit 09610eebdf22ad048812bb86022504b2ad917e19
Author: Shinya Maeda <gitlab.shinyamaeda@gmail.com>
Date: Mon Apr 17 17:03:49 2017 +0900
Add trace test
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix: Deleting an invited member causes 500 error
Closes #32504
See merge request !11481
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Sometimes, new references are not retrieved when a `git fetch` is called
in a bare repos. The easiest solution is to cleanup the test repos and
retry in this case. This only happens when a new ref is added to
TestEnv::BRANCH_SHA or TestEnv::FORKED_BRANCH_SHA.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|/ /
| |
| |
| | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| |
| |
| |
| |
| |
| |
| | |
Rename `build_events` to `job_events`
Closes #31620
See merge request !11287
|
| |
| |
| | |
This reverts merge request !11287
|
|/ |
|
|
|
|
|
|
|
| |
Enforced by the database, and no callbacks need to be called.
Combined with 7b9b2c6099 and 294a8b8a6d this resolves
gitlab-org/gitlab-ce#31799
|
|
|
|
|
|
| |
Use the EnforcedStyleForMultiline: no_comma option.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'master'
Check access to a branch when user triggers manual action
Closes #20261
See merge request !10494
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
feature/gb/manual-actions-protected-branches-permissions
* master: (103 commits)
Include missing project attributes to Import/Export
Create the rest of the wiki docs
Fill in information about creating the wiki Home page
Move wiki doc to its own index page
Create initial file for Wiki documentation
Default to null user when asignee is unselected
Re-enable ref operations with gitaly after not-found fix
#31560 Add repo parameter to gitaly:install and workhorse:install
Remove N+1 queries when checking nodes visible to user
Don't validate reserved words if the format doesn't match
Revert "Shorten and improve some job names"
Remove unused initializer
DRY the `<<: *except-docs` a bit in `.gitlab-ci.yml`
Make the static-analysis job be run for docs branches too
Add download_snippet_path helper
Refresh the markdown cache if it was `nil`
Add some documentation for the new migration helpers
Update comments
Display comments for personal snippets
Update docs on creating a project
...
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
feature/gb/manual-actions-protected-branches-permissions
* master: (314 commits)
Better Explore Groups view
Update Carrierwave and fog-core
Add specs for Gitlab::RequestProfiler
Add scripts/static-analysis to run all the static analysers in one go
Shorten and improve some job names
Group static-analysis jobs into a single job
Don't blow up when email has no References header
Update CHANGELOG.md for 9.1.2
Add changelog
Add changelog
Show Raw button as Download for binary files
Use blob viewers for snippets
Fix typo
Fixed transient failure related to dropdown animations
Revert "Merge branch 'tc-no-todo-service-select' into 'master'"
fix link to MR 10416
Another change from .click -> .trigger('click') to make spec pass
Change from .click -> .trigger('click') to make spec pass
Disable AddColumnWithDefaultToLargeTable cop for pre-existing migrations
Add AddColumnWithDefaultToLargeTable cop
...
Conflicts:
spec/requests/api/jobs_spec.rb
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
feature/gb/manual-actions-protected-branches-permissions
* master: (274 commits)
Update VERSION to 9.2.0-pre
Update CHANGELOG.md for 9.1.0
Update Auto Deploy documentation
Disable import URL field in New project form since it's hidden by default
Remove reference to burndown charts since they don't exist for ce.
Use master_password for Sentinel
Refactor Discussions docs
Start versioning cached markdown fields
Refactor add_users method for project and group
Improved the spec Now correctly tests against different forms
Refactor environments components into vue files - part 3
Adding animation for all dropdown
fix placeholder visibility
submodule_links: handle urls that don't end with .git
Add help regarding vue resource and where to include it
Append .json to ajax endpoint to prevent browser to display raw json
Fixed the preview keyboard shortcut focusing wrong tab
Fix broken link
Added new discussions docs
Started on resolvable discussions docs
...
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
feature/gb/manual-actions-protected-branches-permissions
* master: (641 commits)
Revert "Fix registry for projects with uppercases in path"
Fix registry for projects with uppercases in path
Move event icons into events_helper
Reset New branch button when issue state changes
Add link to environments on kubernetes.md
Indent system notes on desktop screens
Improve webpack-dev-server compatibility with non-localhost setups.
Add changelog entry
Fix recent searches icon alignment in Safari
Use preload to avoid Rails using JOIN
Fix NUMBER_OF_TRUNCATED_DIFF_LINES re-definition error
Prepare for zero downtime migrations
Fix filtered search input width for IE
Fix the `gitlab:gitlab_shell:check` task
Fixed random failures with Poll spec
Include CONTRIBUTING.md file when importing .gitlab-ci.yml templates
Let uses hide verbose output by default
Separate examples for each other
Collapse similar sibling scenarios
Use empty_project for resources that are independent of the repo
...
Conflicts:
app/views/projects/ci/builds/_build.html.haml
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Support comments for personal snippets
Closes #12910
See merge request !11090
|
| | |_|_|_|/
| |/| | | | |
|
|/ / / / /
| | | | |
| | | | |
| | | | | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Display comments for personal snippets
See merge request !10974
|
| | |_|_|/
| |/| | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Implement ability to update hooks
Closes #19364
See merge request !10816
|
| | | | | |
|
|/ / / / |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Remove invalid services with nil or empty type
See merge request !10847
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add issues/:iid/closed_by api endpoint
Closes #26437
See merge request !10511
|
| | | | | |
|
| |_|_|/
|/| | |
| | | |
| | | | |
Closes #31280
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
merged branches" service
Customers were surprised by the previous behavior, which destroyed branches
even though an open merge request existed for it.
Closes #29427
|
|/ / |
|
|\ \ |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add indication for closed or merged issuables in GFM
Closes #1369
See merge request !9462
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Example: for issues that are closed, the links will now show '[closed]'
following the issue number. This is done as post-process after the markdown has
been loaded from the cache as the status of the issue may change between
the cache being populated and the content being displayed.
In order to avoid N+1 queries problem when rendering notes ObjectRenderer
populates the cache of referenced issuables for all notes at once,
before the post processing phase.
As a part of this change, the Banzai BaseParser#grouped_objects_for_nodes
method has been refactored to return a Hash utilising the node itself as the
key, since this was a common pattern of usage for this method.
|
|\ \ \ \
| |/ / / |
|
| |\ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
'dosuken123/gitlab-ce-2989-run-cicd-pipelines-on-a-schedule-idea1-basic-backend-implementation-with-quick-ui' into 'master'
Add "engineering" UI for Pipeline Schedule
See merge request !10533
|
| | | | |
|