debian-mirror-gitlab/doc/development/README.md

301 lines
13 KiB
Markdown
Raw Normal View History

2018-03-17 18:26:18 +05:30
---
comments: false
2021-01-29 00:20:46 +05:30
type: index, dev
stage: none
group: Development
info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines"
description: "Development Guidelines: learn how to contribute to GitLab."
2018-03-17 18:26:18 +05:30
---
2014-09-02 18:07:02 +05:30
2019-10-12 21:52:04 +05:30
# Contributor and Development Docs
2016-09-13 17:45:13 +05:30
2020-10-24 23:57:45 +05:30
Learn the processes and technical information needed for contributing to GitLab.
2021-02-22 17:27:13 +05:30
This content is intended for members of the GitLab Team as well as community
contributors. Content specific to the GitLab Team should instead be included in
the [Handbook](https://about.gitlab.com/handbook/).
2020-10-24 23:57:45 +05:30
2021-02-22 17:27:13 +05:30
For information on using GitLab to work on your own software projects, see the
[GitLab user documentation](../user/index.md).
2020-10-24 23:57:45 +05:30
2021-02-22 17:27:13 +05:30
For information on working with the GitLab APIs, see the [API documentation](../api/README.md).
2020-10-24 23:57:45 +05:30
2021-02-22 17:27:13 +05:30
For information about how to install, configure, update, and upgrade your own
GitLab instance, see the [administration documentation](../administration/index.md).
2020-10-24 23:57:45 +05:30
2019-12-04 20:38:33 +05:30
## Get started
2016-09-13 17:45:13 +05:30
2021-02-22 17:27:13 +05:30
- Set up the GitLab development environment with the
[GitLab Development Kit (GDK)](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/README.md)
2018-12-13 13:39:08 +05:30
- [GitLab contributing guide](contributing/index.md)
2021-02-22 17:27:13 +05:30
- [Issues workflow](contributing/issue_workflow.md) for more information about:
2020-04-08 14:13:33 +05:30
- Issue tracker guidelines.
- Triaging.
- Labels.
- Feature proposals.
- Issue weight.
- Regression issues.
- Technical or UX debt.
2020-05-24 23:13:21 +05:30
- [Merge requests workflow](contributing/merge_request_workflow.md) for more
2021-02-22 17:27:13 +05:30
information about:
2020-04-08 14:13:33 +05:30
- Merge request guidelines.
- Contribution acceptance criteria.
- Definition of done.
- Dependencies.
2020-03-13 15:44:24 +05:30
- [Style guides](contributing/style_guides.md)
- [Implement design & UI elements](contributing/design.md)
- [GitLab Architecture Overview](architecture.md)
2018-03-17 18:26:18 +05:30
- [Rake tasks](rake_tasks.md) for development
2016-09-13 17:45:13 +05:30
2018-03-17 18:26:18 +05:30
## Processes
2016-09-13 17:45:13 +05:30
2020-03-13 15:44:24 +05:30
**Must-reads:**
2021-01-03 14:25:43 +05:30
- [Guide on adapting existing and introducing new components](architecture.md#adapting-existing-and-introducing-new-components)
2021-02-22 17:27:13 +05:30
- [Code review guidelines](code_review.md) for reviewing code and having code
reviewed
- [Database review guidelines](database_review.md) for reviewing
database-related changes and complex SQL queries, and having them reviewed
2020-04-22 19:07:51 +05:30
- [Secure coding guidelines](secure_coding_guidelines.md)
2019-12-04 20:38:33 +05:30
- [Pipelines for the GitLab project](pipelines.md)
2020-03-13 15:44:24 +05:30
Complementary reads:
- [GitLab core team & GitLab Inc. contribution process](https://gitlab.com/gitlab-org/gitlab/blob/master/PROCESS.md)
2018-11-08 19:23:39 +05:30
- [Security process for developers](https://gitlab.com/gitlab-org/release/docs/blob/master/general/security/developer.md#security-releases-critical-non-critical-as-a-developer)
2020-03-13 15:44:24 +05:30
- [Guidelines for implementing Enterprise Edition features](ee_features.md)
2019-12-04 20:38:33 +05:30
- [Danger bot](dangerbot.md)
2020-03-13 15:44:24 +05:30
- [Generate a changelog entry with `bin/changelog`](changelog.md)
2021-02-22 17:27:13 +05:30
- [Requesting access to ChatOps on GitLab.com](chatops_on_gitlabcom.md#requesting-access) (for GitLab team members)
2020-10-24 23:57:45 +05:30
- [Patch release process for developers](https://gitlab.com/gitlab-org/release/docs/blob/master/general/patch/process.md#process-for-developers)
2020-11-24 15:15:51 +05:30
- [Adding a new service component to GitLab](adding_service_component.md)
2016-09-13 17:45:13 +05:30
2021-01-29 00:20:46 +05:30
### Development guidelines review
2021-02-22 17:27:13 +05:30
When you submit a change to the GitLab development guidelines, who
you ask for reviews depends on the level of change.
2021-01-29 00:20:46 +05:30
2021-02-22 17:27:13 +05:30
#### Wording, style, or link changes
Not all changes require extensive review. For example, MRs that don't change the
content's meaning or function can be reviewed, approved, and merged by any
maintainer or Technical Writer. These can include:
- Typo fixes.
- Clarifying links, such as to external programming language documentation.
- Changes to comply with the [Documentation Style Guide](documentation/index.md)
that don't change the intent of the documentation page.
#### Specific changes
If the MR proposes changes that are limited to a particular stage, group, or team,
request a review and approval from an experienced GitLab Team Member in that
group. For example, if you're documenting a new internal API used exclusively by
a given group, request an engineering review from one of the group's members.
After the engineering review is complete, assign the MR to the
[Technical Writer associated with the stage and group](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments)
in the modified documentation page's metadata.
If you have questions or need further input, request a review from the
Technical Writer assigned to the [Development Guidelines](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines).
#### Broader changes
Some changes affect more than one group. For example:
- Changes to [code review guidelines](code_review.md).
- Changes to [commit message guidelines](contributing/merge_request_workflow.md#commit-messages-guidelines).
- Changes to guidelines in [feature flags in development of GitLab](feature_flags/).
- Changes to [feature flags documentation guidelines](documentation/feature_flags.md).
In these cases, use the following workflow:
1. Request a peer review from a member of your team.
1. Request a review and approval of an Engineering Manager (EM)
or Staff Engineer who's responsible for the area in question:
- [Frontend](https://about.gitlab.com/handbook/engineering/frontend/)
- [Backend](https://about.gitlab.com/handbook/engineering/)
- [Database](https://about.gitlab.com/handbook/engineering/development/database/)
- [User Experience (UX)](https://about.gitlab.com/handbook/engineering/ux/)
- [Security](https://about.gitlab.com/handbook/engineering/security/)
- [Quality](https://about.gitlab.com/handbook/engineering/quality/)
- [Infrastructure](https://about.gitlab.com/handbook/engineering/infrastructure/)
- [Technical Writing](https://about.gitlab.com/handbook/engineering/ux/technical-writing/)
You can skip this step for MRs authored by EMs or Staff Engineers responsible
for their area.
If there are several affected groups, you may need approvals at the
EM/Staff Engineer level from each affected area.
1. After completing the reviews, consult with the EM/Staff Engineer
author / approver of the MR.
If this is a significant change across multiple areas, request final review
and approval from the VP of Development, the DRI for Development Guidelines,
@clefelhocz1.
1. After all approvals are complete, assign the merge request to the
Technical Writer for [Development Guidelines](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines)
for final content review and merge. The Technical Writer may ask for
additional approvals as previously suggested before merging the MR.
2021-01-29 00:20:46 +05:30
2019-09-30 21:07:59 +05:30
## UX and Frontend guides
2016-09-13 17:45:13 +05:30
2021-02-22 17:27:13 +05:30
- [GitLab Design System](https://design.gitlab.com/), for building GitLab with
existing CSS styles and elements
2018-03-17 18:26:18 +05:30
- [Frontend guidelines](fe_guide/index.md)
- [Emoji guide](fe_guide/emojis.md)
## Backend guides
- [GitLab utilities](utilities.md)
2019-12-21 20:55:43 +05:30
- [Issuable-like Rails models](issuable-like-models.md)
2019-02-15 15:39:39 +05:30
- [Logging](logging.md)
2020-05-24 23:13:21 +05:30
- [API style guide](api_styleguide.md) for contributing to the API
2021-02-22 17:27:13 +05:30
- [GraphQL API style guide](api_graphql_styleguide.md) for contributing to the
[GraphQL API](../api/graphql/index.md)
2018-03-17 18:26:18 +05:30
- [Sidekiq guidelines](sidekiq_style_guide.md) for working with Sidekiq workers
- [Working with Gitaly](gitaly.md)
2020-04-22 19:07:51 +05:30
- [Manage feature flags](feature_flags/index.md)
2019-07-31 22:56:46 +05:30
- [Licensed feature availability](licensed_feature_availability.md)
2020-06-23 00:09:42 +05:30
- [Dealing with email/mailers](emails.md)
2018-03-17 18:26:18 +05:30
- [Shell commands](shell_commands.md) in the GitLab codebase
- [`Gemfile` guidelines](gemfile.md)
2018-11-18 11:00:15 +05:30
- [Pry debugging](pry_debugging.md)
2021-02-22 17:27:13 +05:30
- [Sidekiq debugging](../administration/troubleshooting/sidekiq.md)
2019-07-31 22:56:46 +05:30
- [Accessing session data](session.md)
2016-06-02 11:05:42 +05:30
- [Gotchas](gotchas.md) to avoid
2021-02-22 17:27:13 +05:30
- [Avoid modules with instance variables](module_with_instance_variables.md), if
possible
2016-06-02 11:05:42 +05:30
- [How to dump production data to staging](db_dump.md)
2018-03-17 18:26:18 +05:30
- [Working with the GitHub importer](github_importer.md)
2019-03-02 22:35:43 +05:30
- [Import/Export development documentation](import_export.md)
2020-03-13 15:44:24 +05:30
- [Test Import Project](import_project.md)
2019-07-31 22:56:46 +05:30
- [Elasticsearch integration docs](elasticsearch.md)
2018-10-15 14:42:47 +05:30
- [Working with Merge Request diffs](diffs.md)
2019-07-07 11:18:12 +05:30
- [Kubernetes integration guidelines](kubernetes.md)
2018-12-05 23:21:45 +05:30
- [Permissions](permissions.md)
- [Guidelines for reusing abstractions](reusing_abstractions.md)
2018-12-13 13:39:08 +05:30
- [DeclarativePolicy framework](policies.md)
2019-07-07 11:18:12 +05:30
- [How Git object deduplication works in GitLab](git_object_deduplication.md)
2019-07-31 22:56:46 +05:30
- [Geo development](geo.md)
2019-09-04 21:01:54 +05:30
- [Routing](routing.md)
2019-09-30 21:07:59 +05:30
- [Repository mirroring](repository_mirroring.md)
- [Git LFS](lfs.md)
2019-10-12 21:52:04 +05:30
- [Developing against interacting components or features](interacting_components.md)
2019-12-04 20:38:33 +05:30
- [File uploads](uploads.md)
2019-12-21 20:55:43 +05:30
- [Auto DevOps development guide](auto_devops.md)
2020-01-01 13:55:28 +05:30
- [Mass Inserting Models](mass_insert.md)
2020-03-13 15:44:24 +05:30
- [Value Stream Analytics development guide](value_stream_analytics.md)
- [Issue types vs first-class types](issue_types.md)
- [Application limits](application_limits.md)
- [Redis guidelines](redis.md)
2020-04-08 14:13:33 +05:30
- [Rails initializers](rails_initializers.md)
2020-04-22 19:07:51 +05:30
- [Code comments](code_comments.md)
- [Renaming features](renaming_features.md)
2020-05-24 23:13:21 +05:30
- [Windows Development on GCP](windows.md)
2020-07-28 23:09:34 +05:30
- [Code Intelligence](code_intelligence/index.md)
- [Approval Rules](approval_rules.md)
- [Feature categorization](feature_categorization/index.md)
2021-01-03 14:25:43 +05:30
- [Wikis development guide](wikis.md)
2021-01-29 00:20:46 +05:30
- [Newlines style guide](newlines_styleguide.md)
- [Image scaling guide](image_scaling.md)
2021-02-22 17:27:13 +05:30
- [Export to CSV](export_csv.md)
2018-03-17 18:26:18 +05:30
## Performance guides
2018-12-05 23:21:45 +05:30
- [Instrumentation](instrumentation.md) for Ruby code running in production
2021-01-29 00:20:46 +05:30
environments.
2018-12-05 23:21:45 +05:30
- [Performance guidelines](performance.md) for writing code, benchmarks, and
2021-01-29 00:20:46 +05:30
certain patterns to avoid.
2018-03-17 18:26:18 +05:30
- [Merge request performance guidelines](merge_request_performance_guidelines.md)
for ensuring merge requests do not negatively impact GitLab performance
2018-12-05 23:21:45 +05:30
- [Profiling](profiling.md) a URL, measuring performance using Sherlock, or
2021-01-29 00:20:46 +05:30
tracking down N+1 queries using Bullet.
2021-02-22 17:27:13 +05:30
- [Cached queries guidelines](cached_queries.md), for tracking down N+1 queries
masked by query caching, memory profiling and why should we avoid cached
queries.
2018-03-17 18:26:18 +05:30
2018-11-20 20:47:30 +05:30
## Database guides
2020-06-23 00:09:42 +05:30
See [database guidelines](database/index.md).
2019-10-12 21:52:04 +05:30
2019-07-31 22:56:46 +05:30
## Integration guides
- [Jira Connect app](integrations/jira_connect.md)
2020-03-13 15:44:24 +05:30
- [Security Scanners](integrations/secure.md)
2020-04-08 14:13:33 +05:30
- [Secure Partner Integration](integrations/secure_partner_integration.md)
2020-04-22 19:07:51 +05:30
- [How to run Jenkins in development environment](integrations/jenkins.md)
2021-02-22 17:27:13 +05:30
- [How to run local Codesandbox integration for Web IDE Live Preview](integrations/codesandbox.md)
2019-07-31 22:56:46 +05:30
2018-03-17 18:26:18 +05:30
## Testing guides
- [Testing standards and style guidelines](testing_guide/index.md)
- [Frontend testing standards and style guidelines](testing_guide/frontend_testing.md)
2020-04-22 19:07:51 +05:30
## Refactoring guides
- [Refactoring guidelines](refactoring_guide/index.md)
2020-10-24 23:57:45 +05:30
## Deprecation guides
- [Deprecation guidelines](deprecation_guidelines/index.md)
2018-03-17 18:26:18 +05:30
## Documentation guides
2018-11-08 19:23:39 +05:30
- [Writing documentation](documentation/index.md)
2021-01-29 00:20:46 +05:30
- [Documentation style guide](documentation/styleguide/index.md)
2018-03-17 18:26:18 +05:30
- [Markdown](../user/markdown.md)
## Internationalization (i18n) guides
- [Introduction](i18n/index.md)
- [Externalization](i18n/externalization.md)
- [Translation](i18n/translation.md)
2021-01-03 14:25:43 +05:30
## Product Analytics guides
2019-12-04 20:38:33 +05:30
2021-01-29 00:20:46 +05:30
- [Product Analytics guide](https://about.gitlab.com/handbook/product/product-analytics-guide/)
2021-01-03 14:25:43 +05:30
- [Usage Ping guide](product_analytics/usage_ping.md)
- [Snowplow guide](product_analytics/snowplow.md)
2019-12-04 20:38:33 +05:30
2020-05-24 23:13:21 +05:30
## Experiment guide
2019-12-21 20:55:43 +05:30
- [Introduction](experiment_guide/index.md)
2018-03-17 18:26:18 +05:30
## Build guides
- [Building a package for testing purposes](build_test_package.md)
2016-09-13 17:45:13 +05:30
## Compliance
- [Licensing](licensing.md) for ensuring license compliance
2019-03-02 22:35:43 +05:30
## Go guides
- [Go Guidelines](go_guide/index.md)
2019-09-04 21:01:54 +05:30
2019-10-12 21:52:04 +05:30
## Shell Scripting guides
- [Shell scripting standards and style guidelines](shell_scripting_guide/index.md)
2020-03-13 15:44:24 +05:30
## Domain-specific guides
- [CI/CD development documentation](cicd/index.md)
2019-12-21 20:55:43 +05:30
## Other Development guides
- [Defining relations between files using projections](projections.md)
2021-01-29 00:20:46 +05:30
- [Reference processing](reference_processing.md)
2020-05-24 23:13:21 +05:30
- [Compatibility with multiple versions of the application running at the same time](multi_version_compatibility.md)
2021-01-29 00:20:46 +05:30
- [Features inside `.gitlab/`](features_inside_dot_gitlab.md)
2019-12-21 20:55:43 +05:30
2019-09-04 21:01:54 +05:30
## Other GitLab Development Kit (GDK) guides
- [Run full Auto DevOps cycle in a GDK instance](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/auto_devops.md)
2020-05-24 23:13:21 +05:30
- [Using GitLab Runner with the GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/runner.md)
- [Using the Web IDE terminal with the GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/web_ide_terminal_gdk_setup.md)