Age | Commit message (Collapse) | Author |
|
|
|
These are clear wins.
|
|
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
|
|
settings early if they exist without issuing any DB query
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
application settings
This was causing significant performance problems in production, and this commit
reverts to the original behavior.
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
Closes #43355
|
|
including/extending it
|
|
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
|
|
|
|
|
|
The initializers including this were doing so at the top level, so every object
loaded after them had a `current_application_settings` method. However, if
someone had rack-attack enabled (which was loaded before these initializers), it
would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't
have that method.
To fix this:
1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need
`Object.new.current_application_settings` to work.
2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it
like that in several places.
3. Change the initializers to use that new form.
|
|
some changes introduced by 4daa6da5407d235cbe4f7a787eaa29304446a870, 26b6e299e1c97b956306572c5c9f6c02f428bfd7, 17898ce021fc365c620d4600df68c3e7d2151619 were regressed during today's merge conflict resolution of !11573.
This commit serves to reapply those changes.
/cc: @rspeicher @stanhu @mikegreiling
|
|
|
|
# Conflicts:
# lib/gitlab/current_settings.rb
|
|
|
|
connect instead of a socket
This helps with compiling gitlab assets without a redis server (used
during omnibus build)
|
|
autoload happier
Closes #34047
|
|
populate missing columns with defaults
master was failing because `ApplicationSetting.create_from_defaults` attempted
to write to a column that did not exist in the database. This occurred in a
`rake db:migrate` task, which was unable to perform the migration that would
have added the missing column in the first place.
In 9.3 RC2, we also had a bug where password sign-ins were disabled because
there were many pending migrations. The problem occurred because
`fake_application_settings` was being returned with an OpenStruct that did not
include the predicate method `signup_enabled?`. As a result, the value would
erroneously return `nil` instead of `true`. This commit uses the values of the
defaults to mimic this behavior.
This commit also refactors some of the logic to be clearer.
|
|
This reverts commit ad521bde1bb556709edd39d8a9aa67ee47605b91, reversing
changes made to 3a38e5f1ab914bc4eaeecda6e18caaa7ca9ea5a7.
|
|
See https://gitlab.com/gitlab-org/gitlab-ce/issues/33736#note_32561501
|
|
|
|
Various Rails initializers (metrics, sentry, etc) are run before migrations,
which can lead to a mismatch between app/models/application_settings.rb and
schema.
|
|
|
|
This will avoid autoloading issues in the long term.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
This reverts commit c20934869f7dc8cfbdbafb6ecb7b1305452c9e8a, reversing
changes made to 4b7ec44b91e0571d209c790d54947ba1756dac0e.
|
|
'master'"
This reverts merge request !8573
|
|
This reverts merge request !8671
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
CurrentSettings
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
This MR enables rendering of PlantUML diagrams in Asciidoc documents. To add a
PlantUML diagram all we need is to include a plantuml block like:
```
[plantuml, id="myDiagram", width="100px", height="100px"]
--
bob -> alice : ping
alice -> bob : pong
--
```
The plantuml block is substituted by an HTML img element with *src* pointing to
an external PlantUML server.
This MR also add a PlantUML integration section to the Administrator -> Settings
page to configure the PlantUML rendering service and to enable/disable it.
Closes: #17603
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
|
|
If the database has not been migrated properly, the initializer for Sidekiq
will fail to start and cause the whole Rails server to crash. This change
checks the existence for the column and allows Rails to start even
if the setting has not been added as a database column.
Closes #24452
|
|
them to be configurable
|
|
|
|
|
|
|
|
|
|
Koding: #index: landing page for Koding integration
If enabled it will provide a link to open remote Koding instance url
for now we are also providing the sneak preview video for how
integration works in detail.
Repository: check whether .koding.yml file exists on repository
Projects: landing page: show Run in IDE (Koding) button if repo has stack file
Projects: MR: show Run in IDE Koding button if repo has stack file on active branch
ProjectHelpers: add_koding_stack: stack generator for provided project
With this helper we will auto-generate the required stack template
for a given project. For the feature we can request this base template
from the running Koding instance on integration.
Currently this will provide users to create a t2.nano instance on aws
and it'll automatically configures the instance for basic requirements.
Projects: empty state and landing page provide shortcuts to create stack
projects_helper: use branch on checkout and provide an entry point
This ${var.koding_queryString_branch} will be replaced with the branch
provided in query string which will allow us to use same stack template
for different branches of the same repository.
ref: https://github.com/koding/koding/pull/8597/commits/b8c0e43c4c24bf132670aa8a3cfb0d634acfd09b
projects_helper: provide sha info in query string to use existing vms
With this change we'll be able to query existing vms on Koding side
based on the commit id that they've created.
ref: https://github.com/koding/koding/pull/8597/commits/1d630fadf31963fa6ccd3bed92e526761a30a343
Integration: Docs: Koding documentation added
Disable /koding route if integration is disabled
Use application settings to enable Koding
Projects_helper: better indentation with strip_heredoc usage
Projects_helper: return koding_url as is if there is no project provided
current_settings: set koding_enabled: false by default
Koding_Controller: to render not_found once integration is disabled
Dashboard_specs: update spec for Koding enabled case
Projects_Helper: make repo dynamic
ref: https://github.com/koding/koding/pull/8597/commits/4d615242f45aaea4c4986be84ecc612b0bb1514c
Updated documentation to have right format
|
|
better conform to its behavior and newly introduced behavior.
|
|
As requested by the issue #14508 this adds an option in the application
settings to set newly registered users by default as external. The
default setting is set to false to stay backward compatible.
|
|
|
|
If Redis were not running or USE_DB were set to false, the
application settings retrieval would fail completely. This
change only attempts to use the cache if the system actually
wants to connect to the DB and rescues any failures in talking to
Redis.
Closes #17557
|
|
|
|
'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
# Conflicts:
# Gemfile.lock
# app/helpers/todos_helper.rb
# app/models/todo.rb
# app/views/projects/edit.html.haml
# lib/gitlab/import_export/import_service.rb
|