Age | Commit message (Collapse) | Author |
|
When cache_collection_render runs we end up reading and writing
things to redis even if we already have the rendered field cached
in the DB. This commit avoids using redis at all whenever we have
the field already rendered in the DB cache.
|
|
This allows using `CacheMarkdownField` for models that are not backed
by ActiveRecord.
When the including class inherits `ActiveRecord::Base` we include
`Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the
markdown fields to be rendered and the generated HTML stored in a
`<field>_html` attribute on the record. We also store the version
used for generating the markdown.
All other classes that include this model will include the
`Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html`
attributes to that model and will generate the html in them. The
generated HTML will be cached in redis under the key
`markdown_cache:<class>:<id>`. The class this included in must
therefore respond to `id`.
|
|
|
|
Resolve "Extended tooltip for merge request links"
Closes #54916
See merge request gitlab-org/gitlab-ce!25221
|
|
- Show pipeline status, title, MR Status and project path
- Popover attached to gitlab flavored markdown everywhere, including:
+ MR/Issue Title
+ MR/Issue description
+ MR/Issue comments
+ Rendered markdown files
|
|
|
|
|
|
Cached markdown version is composed both from global and local
markdown version. This allows admins to bump version locally when
needed (e.g. when external URL is changed).
|
|
This engine was replaced with CommonMarker in 11.4, it was deprecated
since then.
|
|
|
|
|
|
Since the rendering of footnotes is changed, the cached
html need to be updated
|
|
into 'master'
[master] XSS in markdown following unrecognized HTML element
Closes #2732
See merge request gitlab/gitlabhq!2599
|
|
Partially addresses #47424.
|
|
|
|
|
|
and also make sure that if a field is saved, then the existing cache version is maintained or only upgraded to the version with the same markdown engine.
|
|
|
|
cache that needs to be updated
|
|
|
|
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.
|
|
An upcoming update to rubocop-gitlab-security added additional
violations.
|
|
|
|
|
|
If the cached html_field for a markdown_field is `nil` while the
mfarkdown_field is not, it needs to be refreshed.
|
|
confict with elasticsearch-model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.
Note has a collision with the note_html attr_accessor; that will be fixed later
A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
|