| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* `MysqlDateTimeWithTimeZone` inherits from `ActiveRecord::Type::DateTime`
(`MysqlDateTime` is not present in Rails 5)
* explicitly set `NULL` default value for `merge_request_diff_files`'s
`diff` column (otherwise empty string is used in a migration) and
empty string is not allowed for text/blob fields in Mysql
* disable NO_ZERO_DATE mode for all Mysql DB connections, otherwise
SQL queries fail on inserting `0` value for `created_at` column
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original MR [1] fixed red specs for Rails 5.
But while the failed specs were fixed, that changes brought new failed
specs which weren't caught up in [1].
This commit just fixes the fix. :)
New errors are like these:
```
Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: keep-alive, HTTP_UPGRADE: )
Finished "/-/boards/1/lists"[non-WebSocket] for 127.0.0.1 at 2018-06-20 18:09:26 +0200
```
[1]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rails 5.0 the new framework has been added. It's called ActionCable.
It brings WebSockets support to rails applications.
By default the mountpoint of WebSocket requests is `/cable` [1].
GitLab allows using top level names as namespaces or usernames.
For example, `gitlab.com/cable` at this moment leads to a user with the
nickname `cable`.
This commit changes ActionCable's mountpoint to a reserved top level
word `-`.
This is just a stub and should not be be used in real work.
Please set correct mountpoints for each environments when configuring
ActionCable for real using.
[1]: https://github.com/rails/rails/blob/5-0-stable/actioncable/lib/action_cable.rb#L38
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It fixes Rails 5.0 deprecation flooding like:
```
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references. For example:
"::Gitlab::Middleware::ReadOnly" => Gitlab::Middleware::ReadOnly
(called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references. For example:
"ActionDispatch::Static" => ActionDispatch::Static
(called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references. For example:
"Gitlab::Testing::RequestBlockerMiddleware" => Gitlab::Testing::RequestBlockerMiddleware
(called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references. For example:
"ActionDispatch::Static" => ActionDispatch::Static
(called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references. For example:
"Gitlab::Testing::RequestInspectorMiddleware" => Gitlab::Testing::RequestInspectorMiddleware
(called from <top (required)> at /builds/gitlab-org/gitlab-ce/config/environment.rb:11)
```
|
|
|
|
| |
filter out file content from logs
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Embedded Snippets Support
Closes #8088
See merge request gitlab-org/gitlab-ce!15695
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Same strategy with:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17810
See:
https://stackoverflow.com/a/29710188/1992201
Frankly I don't really understand how this works and I don't really
care either. However I tried it and it does the job. To try this,
make sure you have pending migrations, and run the server, hit the site.
It would tell you that there's pending migrations, and then run
migrations, and then hit the site again.
Without this patch, Rails would complain that "A copy of ...",
with this patch, it works without problems.
|
| |
| |
| | |
This reverts merge request !17159
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Right now Project::VariablesController users the `value` parameter to send the
secret variable value. `value` is a pretty generic term and could be used in
other controllers, but for now it's better to err on the side of caution and
filter this out.
Closes #43313
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This fixes an issue where the Rails autoload system would throw various `Unable to autoload constant` errors (such as `Unable to autoload constant EE::ProjectsHelper`) when using the autoload system (such with `spring` or `reload!` in the rails console.
This error was specifically ocurring in the EE code, however, it's seems reasonable to place the fix in CE as a general innoculation.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Replace factory_girl_rails with factory_bot_rails
See merge request gitlab-org/gitlab-ce!15919
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I've followed the [upgrade guide](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md) and ran these two commands:
```
grep -e FactoryGirl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|FactoryGirl|FactoryBot|"
grep -e factory_girl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|factory_girl|factory_bot|"
```
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|/
|
|
|
|
|
| |
Rake doesn't respect eager-loading, so to avoid explicit requires we have to
duplicate the eager-load config into the auto-load config.
This backports an EE change made in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3706
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.
Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.
Closes gitlab-org/gitlab-ce#37534.
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
Now that we are logging API requests in `api_json.log`, we see that
the runner token was not filtered properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upon inspection of logs, there were a number of fields not filtered. For example:
* authenticity_token: CSRF token
* rss_token: Used for RSS feeds
* secret: Used with Projects::UploadController
Rails provides a way to match regexps, so we now filter:
* Any parameter ending with `_token`
* Any parameter containing `password`
* Any parameter containing `secret`
|
| |
|
|
|
|
|
| |
Group milestones can only be referred to by name, not IID. They also do not
support cross-project references.
|
|
|
|
| |
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2483
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Add creation time filters to user search API for admins
Closes #29507
See merge request !12682
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
Fix shorter route helpers in production environment
Closes #34741
See merge request !12675
|
| |
| |
| |
| |
| |
| | |
I don't know exactly when Rails picks each module to use, but this seems to be
used by `app` in the console (for instance, `app.project_path` would fail
before, but works now).
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Start of the new navigation by redesigning just the top navigation menu.
This is only shown when a cookie is set.
Part of #32794
|
|
|
|
| |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
|
|
| |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
|
|
| |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|