Skip to content
Snippets Groups Projects
Commit b4e072cb authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 8c0166b9
No related branches found
No related tags found
No related merge requests found
Showing
with 59 additions and 54 deletions
Loading
Loading
@@ -564,7 +564,7 @@ Inside the document:
 
### Remove image shadow
 
All images displayed on docs.gitlab.com have a box shadow by default.
All images displayed on the [GitLab Docs site](https://docs.gitlab.com) have a box shadow by default.
To remove the box shadow, use the image class `.image-noshadow` applied
directly to an HTML `img` tag:
 
Loading
Loading
@@ -598,7 +598,7 @@ You can link any up-to-date video that is useful to the GitLab user.
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab-docs/merge_requests/472) in GitLab 12.1.
 
GitLab docs (docs.gitlab.com) support embedded videos.
The [GitLab docs site](https://docs.gitlab.com) supports embedded videos.
 
You can only embed videos from
[GitLab's official YouTube account](https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg).
Loading
Loading
@@ -634,7 +634,7 @@ leave a blank line here
leave a blank line here
```
 
This is how it renders on docs.gitlab.com:
This is how it renders on the GitLab Docs site:
 
<div class="video-fallback">
See the video: <a href="https://www.youtube.com/watch?v=enMumwvLAug">What is GitLab</a>.
Loading
Loading
@@ -693,6 +693,10 @@ use the following markup for highlighting.
_Note that the alert boxes only work for one paragraph only. Multiple paragraphs,
lists, headers, etc will not render correctly. For multiple lines, use blockquotes instead._
 
Alert boxes only render properly on the GitLab Docs site (<http://docs.gitlab.com>).
Within GitLab itself, they will appear as plain markdown text (like the examples
above the rendered versions, below).
### Note
 
Notes catch the eye of most readers, and therefore should be used very sparingly.
Loading
Loading
@@ -717,7 +721,7 @@ NOTE: **Note:**
This is something to note.
```
 
How it renders in docs.gitlab.com:
How it renders on the GitLab Docs site:
 
NOTE: **Note:**
This is something to note.
Loading
Loading
@@ -729,7 +733,7 @@ TIP: **Tip:**
This is a tip.
```
 
How it renders in docs.gitlab.com:
How it renders on the GitLab Docs site:
 
TIP: **Tip:**
This is a tip.
Loading
Loading
@@ -741,7 +745,7 @@ CAUTION: **Caution:**
This is something to be cautious about.
```
 
How it renders in docs.gitlab.com:
How it renders on the GitLab Docs site:
 
CAUTION: **Caution:**
This is something to be cautious about.
Loading
Loading
@@ -753,7 +757,7 @@ DANGER: **Danger:**
This is a breaking change, a bug, or something very important to note.
```
 
How it renders in docs.gitlab.com:
How it renders on the GitLab Docs site:
 
DANGER: **Danger:**
This is a breaking change, a bug, or something very important to note.
Loading
Loading
@@ -766,7 +770,7 @@ For highlighting a text within a blue blockquote, use this format:
> This is a blockquote.
```
 
which renders in docs.gitlab.com to:
which renders on the [GitLab Docs site](https://docs.gitlab.com) as:
 
> This is a blockquote.
 
Loading
Loading
@@ -1154,7 +1158,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "title=
```
 
The above example is run by and administrator and will add an SSH public key
titled ssh-key to user's account which has an id of 25.
titled `ssh-key` to user's account which has an id of 25.
 
#### Escape special characters
 
Loading
Loading
# Elasticsearch knowledge **(STARTER ONLY)**
 
This area is to maintain a compendium of useful information when working with elasticsearch.
This area is to maintain a compendium of useful information when working with Elasticsearch.
 
Information on how to enable Elasticsearch and perform the initial indexing is kept in ../integration/elasticsearch.md#enabling-elasticsearch
Information on how to enable Elasticsearch and perform the initial indexing is in
the [Elasticsearch integration documentation](../integration/elasticsearch.md#enabling-elasticsearch)
 
## Deep Dive
 
Loading
Loading
@@ -61,7 +62,7 @@ Additionally, if you need large repos or multiple forks for testing, please cons
 
The Elasticsearch integration depends on an external indexer. We ship an [indexer written in Go](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer). The user must trigger the initial indexing via a rake task but, after this is done, GitLab itself will trigger reindexing when required via `after_` callbacks on create, update, and destroy that are inherited from [/ee/app/models/concerns/elastic/application_versioned_search.rb](https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/models/concerns/elastic/application_versioned_search.rb).
 
All indexing after the initial one is done via `ElasticIndexerWorker` (sidekiq jobs).
All indexing after the initial one is done via `ElasticIndexerWorker` (Sidekiq jobs).
 
Search queries are generated by the concerns found in [ee/app/models/concerns/elastic](https://gitlab.com/gitlab-org/gitlab/tree/master/ee/app/models/concerns/elastic). These concerns are also in charge of access control, and have been a historic source of security bugs so please pay close attention to them!
 
Loading
Loading
# Frontend tracking guide
 
GitLab provides `Tracking`, an interface that wraps the [Snowplow Javascript Tracker](https://github.com/snowplow/snowplow/wiki/javascript-tracker) for tracking custom events. There are a few ways to utilizing tracking, but each generally requires at minimum, a `category` and an `action`. Additional data can be provided that adheres to our [Feature instrumentation taxonomy](https://about.gitlab.com/handbook/product/feature-instrumentation/#taxonomy).
GitLab provides `Tracking`, an interface that wraps the [Snowplow JavaScript Tracker](https://github.com/snowplow/snowplow/wiki/javascript-tracker) for tracking custom events. There are a few ways to utilizing tracking, but each generally requires at minimum, a `category` and an `action`. Additional data can be provided that adheres to our [Feature instrumentation taxonomy](https://about.gitlab.com/handbook/product/feature-instrumentation/#taxonomy).
 
| field | type | default value | description |
|:-----------|:-------|:---------------------------|:------------|
Loading
Loading
@@ -26,7 +26,7 @@ Below is an example of `data-track-*` attributes assigned to a button:
/>
```
 
Event listeners are bound at the document level to handle click events on or within elements with these data attributes. This allows for them to be properly handled on rerendering and changes to the DOM, but it's important to know that because of the way these events are bound, click events shouldn't be stopped from propagating up the DOM tree. If for any reason click events are being stopped from propagating, you'll need to implement your own listeners and follow the instructions in [Tracking in raw Javascript](#tracking-in-raw-javascript).
Event listeners are bound at the document level to handle click events on or within elements with these data attributes. This allows for them to be properly handled on rerendering and changes to the DOM, but it's important to know that because of the way these events are bound, click events shouldn't be stopped from propagating up the DOM tree. If for any reason click events are being stopped from propagating, you'll need to implement your own listeners and follow the instructions in [Tracking in raw JavaScript](#tracking-in-raw-javascript).
 
Below is a list of supported `data-track-*` attributes:
 
Loading
Loading
@@ -99,7 +99,7 @@ And if needed within the template, you can use the `track` method directly as we
</template>
```
 
## Tracking in raw Javascript
## Tracking in raw JavaScript
 
Custom event tracking and instrumentation can be added by directly calling the `Tracking.event` static function. The following example demonstrates tracking a click on a button by calling `Tracking.event` manually.
 
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@
 
See also the [corresponding UX guide](https://design.gitlab.com/#/components/dropdowns).
 
### How to style a bootstrap dropdown
### How to style a Bootstrap dropdown
 
1. Use the HTML structure provided by the [docs][bootstrap-dropdowns]
1. Add a specific class to the top level `.dropdown` element
Loading
Loading
Loading
Loading
@@ -80,7 +80,7 @@ With the purpose of being [respectful of others' time](https://about.gitlab.com/
 
1. Before writing code, ensure your vision of the architecture is aligned with
GitLab's architecture.
1. Add a diagram to the issue and ask a frontend maintainer in the slack channel `#frontend_maintainers` about it.
1. Add a diagram to the issue and ask a frontend maintainer in the Slack channel `#frontend_maintainers` about it.
 
![Diagram of Issue Boards Architecture](img/boards_diagram.png)
 
Loading
Loading
# Icons and SVG Illustrations
 
We manage our own Icon and Illustration library in the [gitlab-svgs][gitlab-svgs] repository.
We manage our own Icon and Illustration library in the [`gitlab-svgs`][gitlab-svgs] repository.
This repository is published on [npm][npm] and managed as a dependency via yarn.
You can browse all available Icons and Illustrations [here][svg-preview].
To upgrade to a new version run `yarn upgrade @gitlab/svgs`.
Loading
Loading
Loading
Loading
@@ -65,26 +65,27 @@ within the `pages` directory correspond to Rails controllers and actions. These
auto-generated bundles will be automatically included on the corresponding
pages.
 
For example, if you were to visit [gitlab.com/gitlab-org/gitlab-foss/issues](https://gitlab.com/gitlab-org/gitlab-foss/issues),
For example, if you were to visit <https://gitlab.com/gitlab-org/gitlab/issues>,
you would be accessing the `app/controllers/projects/issues_controller.rb`
controller with the `index` action. If a corresponding file exists at
`pages/projects/issues/index/index.js`, it will be compiled into a webpack
bundle and included on the page.
 
> **Note:** Previously we had encouraged the use of
> `content_for :page_specific_javascripts` within haml files, along with
> manually generated webpack bundles. However under this new system you should
> not ever need to manually add an entry point to the `webpack.config.js` file.
>
> **Tip:**
> If you are unsure what controller and action corresponds to a given page, you
> can find this out by inspecting `document.body.dataset.page` within your
> browser's developer console while on any page within gitlab.
NOTE: **Note:**
Previously we had encouraged the use of
`content_for :page_specific_javascripts` within haml files, along with
manually generated webpack bundles. However under this new system you should
not ever need to manually add an entry point to the `webpack.config.js` file.
TIP: **Tip:**
If you are unsure what controller and action corresponds to a given page, you
can find this out by inspecting `document.body.dataset.page` within your
browser's developer console while on any page within GitLab.
 
#### Important Considerations
 
- **Keep Entry Points Lite:**
Page-specific javascript entry points should be as lite as possible. These
Page-specific JavaScript entry points should be as lite as possible. These
files are exempt from unit tests, and should be used primarily for
instantiation and dependency injection of classes and methods that live in
modules outside of the entry point script. Just import, read the DOM,
Loading
Loading
Loading
Loading
@@ -63,7 +63,7 @@ External fonts, CSS, and JavaScript should never be used with the exception of
Google Analytics and Piwik - and only when the instance has enabled it. Assets
should always be hosted and served locally from the GitLab instance. Embedded
resources via `iframes` should never be used except in certain circumstances
such as with ReCaptcha, which cannot be used without an `iframe`.
such as with reCAPTCHA, which cannot be used without an `iframe`.
 
## Avoiding inline scripts and styles
 
Loading
Loading
Loading
Loading
@@ -287,7 +287,7 @@ See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab/blob/master/.es
 
#### CSS classes used for JavaScript
 
1. If the class is being used in Javascript it needs to be prepend with `js-`
1. If the class is being used in JavaScript it needs to be prepend with `js-`
 
```html
// bad
Loading
Loading
@@ -693,7 +693,7 @@ Useful links:
$('span').tooltip('_fixTitle');
```
 
### The Javascript/Vue Accord
### The JavaScript/Vue Accord
 
The goal of this accord is to make sure we are all on the same page.
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
In order to be able to turn on/off features behind feature flags in any of the
GitLab Inc. provided environments such as staging and production, you need to
have access to the chatops bot. Chatops bot is currently running on the ops instance,
which is different from GitLab.com or dev.gitlab.org.
which is different from <https://gitlab.com> or <https://dev.gitlab.org>.
 
Follow the Chatops document to [request access](../chatops_on_gitlabcom.md#requesting-access).
 
Loading
Loading
@@ -39,7 +39,7 @@ If you get an error "Whoops! This action is not allowed. This incident
will be reported." that means your Slack account is not allowed to
change feature flags or you do not [have access](#access-for-enabling-a-feature-flag-in-production).
 
### Enabling feature for staging and dev.gitlab.org
### Enabling feature for internal testing
 
As a first step in a feature rollout, you should enable the feature on <https://staging.gitlab.com>
and <https://dev.gitlab.org>.
Loading
Loading
Loading
Loading
@@ -15,9 +15,9 @@ In May 2019, Bob Van Landuyt hosted a [Deep Dive] on GitLab's [Gitaly project] a
 
## Beginner's guide
 
Start by reading the gitaly repository's
Start by reading the Gitaly repository's
[Beginner's guide to Gitaly contributions](https://gitlab.com/gitlab-org/gitaly/blob/master/doc/beginners_guide.md).
It describes how to setup gitaly, the various components of gitaly and what they do, and how to run its test suites.
It describes how to setup Gitaly, the various components of Gitaly and what they do, and how to run its test suites.
 
## Developing new Git features
 
Loading
Loading
@@ -41,14 +41,14 @@ disk access (e.g. Rugged, `git`, `rm -rf`) anywhere outside
The process for adding new Gitaly features is:
 
- exploration / prototyping
- design and create a new Gitaly RPC [in gitaly-proto](https://gitlab.com/gitlab-org/gitaly-proto)
- release a new version of gitaly-proto
- design and create a new Gitaly RPC in [`gitaly-proto`](https://gitlab.com/gitlab-org/gitaly-proto)
- release a new version of `gitaly-proto`
- write implementation and tests for the RPC [in Gitaly](https://gitlab.com/gitlab-org/gitaly), in Go or Ruby
- release a new version of Gitaly
- write client code in GitLab CE/EE, GitLab Workhorse or GitLab Shell that calls the new Gitaly RPC
 
These steps often overlap. It is possible to use an unreleased version
of Gitaly and gitaly-proto during testing and development.
of Gitaly and `gitaly-proto` during testing and development.
 
- See the [Gitaly repo](https://gitlab.com/gitlab-org/gitaly/blob/master/CONTRIBUTING.md#development-and-testing-with-a-custom-gitaly-proto) for instructions on writing server side code with an unreleased protocol.
- See [below](#running-tests-with-a-locally-modified-version-of-gitaly) for instructions on running GitLab CE tests with a modified version of Gitaly.
Loading
Loading
@@ -58,7 +58,7 @@ of Gitaly and gitaly-proto during testing and development.
 
It is possible to implement and test RPC's in Gitaly using Ruby code,
in
[gitaly-ruby](https://gitlab.com/gitlab-org/gitaly/tree/master/ruby).
[`gitaly-ruby`](https://gitlab.com/gitlab-org/gitaly/tree/master/ruby).
This should make it easier to contribute for developers who are less
comfortable writing Go code.
 
Loading
Loading
@@ -234,7 +234,7 @@ Here are the steps to gate a new feature in Gitaly behind a feature flag.
}
```
 
1. Create prometheus metrics:
1. Create Prometheus metrics:
 
```go
var findAllTagsRequests = prometheus.NewCounterVec(
Loading
Loading
Loading
Loading
@@ -29,7 +29,7 @@ See [Externalization for GitLab](externalization.md).
 
### Translate strings
 
The translation process is managed at [translate.gitlab.com](https://translate.gitlab.com)
The translation process is managed at <https://translate.gitlab.com>
using [Crowdin](https://crowdin.com/).
You will need to create an account before you can submit translations.
Once you are signed in, select the language you wish to contribute translations to.
Loading
Loading
Loading
Loading
@@ -57,7 +57,7 @@ are very appreciative of the work done by translators and proofreaders!
- Paolo Falomo - [GitLab](https://gitlab.com/paolofalomo), [Crowdin](https://crowdin.com/profile/paolo.falomo)
- Japanese
- Hiroyuki Sato - [GitLab](https://gitlab.com/hiroponz), [Crowdin](https://crowdin.com/profile/hiroponz)
- Tomo Dote - [Gitlab](https://gitlab.com/fu7mu4), [Crowdin](https://crowdin.com/profile/fu7mu4)
- Tomo Dote - [GitLab](https://gitlab.com/fu7mu4), [Crowdin](https://crowdin.com/profile/fu7mu4)
- Korean
- Chang-Ho Cha - [GitLab](https://gitlab.com/changho-cha), [Crowdin](https://crowdin.com/profile/zzazang)
- Ji Hun Oh - [GitLab](https://gitlab.com/Baw-Appie), [Crowdin](https://crowdin.com/profile/BawAppie)
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ The first step is to get familiar with Crowdin.
 
### Sign In
 
To contribute translations at [translate.gitlab.com](https://translate.gitlab.com)
To contribute translations at <https://translate.gitlab.com>
you must create a Crowdin account.
You may create a new account or use any of their supported sign in services.
 
Loading
Loading
@@ -54,7 +54,7 @@ For example in French `OpenedNDaysAgo|Opened` would be translated to
Some technical terms should be treated like proper nouns and not be translated.
 
Technical terms that should always be in English are noted in the glossary when
using [translate.gitlab.com](https://translate.gitlab.com).
using <https://translate.gitlab.com>.
 
This helps maintain a logical connection and consistency between tools (e.g.
`git` client) and GitLab.
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@ SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS = 3000000
SIDEKIQ_MEMORY_KILLER_GRACE_TIME = 900
```
 
An import status `started`, and the following sidekiq logs will signal a memory issue:
An import status `started`, and the following Sidekiq logs will signal a memory issue:
 
```bash
WARN: Work still in progress <struct with JID>
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ change that affects uploads should also be tested against [object storage],
which is _not_ enabled by default in [GDK](https://gitlab.com/gitlab-org/gitlab-development-kit).
 
When working on a related feature, make sure to enable and test it
against [Minio](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/object_storage.md).
against [MinIO](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/object_storage.md).
 
See also [File Storage in GitLab](file_storage.md).
 
Loading
Loading
Loading
Loading
@@ -44,12 +44,11 @@ to the relevant internal client.
 
All calls to the Kubernetes API must be in a background process. Do not
perform Kubernetes API calls within a web request as this will block
unicorn and can easily lead to a Denial Of Service (DoS) attack in GitLab as
Unicorn and can easily lead to a Denial Of Service (DoS) attack in GitLab as
the Kubernetes cluster response times are outside of our control.
 
The easiest way to ensure your calls happen a background process is to
delegate any such work to happen in a [sidekiq
worker](sidekiq_style_guide.md).
delegate any such work to happen in a [Sidekiq worker](sidekiq_style_guide.md).
 
There are instances where you would like to make calls to Kubernetes and
return the response and as such a background worker does not seem to be
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ We have a lot of graphing libraries in our codebase to render graphs. In an effo
We chose D3 as our library going forward because of the following features:
 
- [Tree shaking webpack capabilities](https://github.com/d3/d3/blob/master/CHANGES.md#changes-in-d3-40).
- [Compatible with vue.js as well as vanilla javascript](https://github.com/d3/d3/blob/master/CHANGES.md#changes-in-d3-40).
- [Compatible with vue.js as well as vanilla JavaScript](https://github.com/d3/d3/blob/master/CHANGES.md#changes-in-d3-40).
 
D3 is very popular across many projects outside of GitLab:
 
Loading
Loading
Loading
Loading
@@ -2,9 +2,9 @@
 
## Monitoring
 
We have a performance dashboard available in one of our [grafana instances](https://dashboards.gitlab.net/d/1EBTz3Dmz/sitespeed-page-summary?orgId=1). This dashboard automatically aggregates metric data from [sitespeed.io](https://www.sitespeed.io/) every 6 hours. These changes are displayed after a set number of pages are aggregated.
We have a performance dashboard available in one of our [Grafana instances](https://dashboards.gitlab.net/d/1EBTz3Dmz/sitespeed-page-summary?orgId=1). This dashboard automatically aggregates metric data from [sitespeed.io](https://www.sitespeed.io/) every 6 hours. These changes are displayed after a set number of pages are aggregated.
 
These pages can be found inside a text file in the gitlab-build-images [repository](https://gitlab.com/gitlab-org/gitlab-build-images) called [gitlab.txt](https://gitlab.com/gitlab-org/gitlab-build-images/blob/master/scripts/gitlab.txt)
These pages can be found inside a text file in the [`gitlab-build-images` repository](https://gitlab.com/gitlab-org/gitlab-build-images) called [`gitlab.txt`](https://gitlab.com/gitlab-org/gitlab-build-images/blob/master/scripts/gitlab.txt)
Any frontend engineer can contribute to this dashboard. They can contribute by adding or removing urls of pages from this text file. Please have a [frontend monitoring expert](https://about.gitlab.com/company/team/) review your changes before assigning to a maintainer of the `gitlab-build-images` project. The changes will go live on the next scheduled run after the changes are merged into `master`.
 
There are 3 recommended high impact metrics to review on each page:
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@ While different workers cannot share a queue, they can share a queue namespace.
Defining a queue namespace for a worker makes it possible to start a Sidekiq
process that automatically handles jobs for all workers in that namespace,
without needing to explicitly list all their queue names. If, for example, all
workers that are managed by sidekiq-cron use the `cronjob` queue namespace, we
workers that are managed by `sidekiq-cron` use the `cronjob` queue namespace, we
can spin up a Sidekiq process specifically for these kinds of scheduled jobs.
If a new worker using the `cronjob` namespace is added later on, the Sidekiq
process will automatically pick up jobs for that worker too (after having been
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment