Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
6d43720a1a
commit
543081566d
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix project imports not working with serialized data
|
||||||
|
merge_request: 19124
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -1,8 +1,8 @@
|
||||||
# Job logs
|
# Job logs
|
||||||
|
|
||||||
> [Renamed from Job Traces to Job logs](https://gitlab.com/gitlab-org/gitlab/issues/29121) in 12.4.
|
> [Renamed from job traces to job logs](https://gitlab.com/gitlab-org/gitlab/issues/29121) in GitLab 12.5.
|
||||||
|
|
||||||
Job logs (traces) are sent by GitLab Runner while it's processing a job. You can see
|
Job logs are sent by GitLab Runner while it's processing a job. You can see
|
||||||
logs in job pages, pipelines, email notifications, etc.
|
logs in job pages, pipelines, email notifications, etc.
|
||||||
|
|
||||||
## Data flow
|
## Data flow
|
||||||
|
@ -33,9 +33,8 @@ To change the location where the job logs will be stored, follow the steps below
|
||||||
gitlab_ci['builds_directory'] = '/mnt/to/gitlab-ci/builds'
|
gitlab_ci['builds_directory'] = '/mnt/to/gitlab-ci/builds'
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Save the file and [reconfigure GitLab][] for the changes to take effect.
|
1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the
|
||||||
|
changes to take effect.
|
||||||
---
|
|
||||||
|
|
||||||
**In installations from source:**
|
**In installations from source:**
|
||||||
|
|
||||||
|
@ -48,10 +47,8 @@ To change the location where the job logs will be stored, follow the steps below
|
||||||
builds_path: path/to/builds/
|
builds_path: path/to/builds/
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Save the file and [restart GitLab][] for the changes to take effect.
|
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes
|
||||||
|
to take effect.
|
||||||
[reconfigure gitlab]: restart_gitlab.md#omnibus-gitlab-reconfigure "How to reconfigure Omnibus GitLab"
|
|
||||||
[restart gitlab]: restart_gitlab.md#installations-from-source "How to restart GitLab"
|
|
||||||
|
|
||||||
## Uploading logs to object storage
|
## Uploading logs to object storage
|
||||||
|
|
||||||
|
@ -69,8 +66,8 @@ job output in the UI will be empty.
|
||||||
|
|
||||||
## New incremental logging architecture
|
## New incremental logging architecture
|
||||||
|
|
||||||
> [Introduced][ce-18169] in GitLab 10.4.
|
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/18169) in GitLab 10.4.
|
||||||
> [Announced as General availability][ce-46097] in GitLab 11.0.
|
> - [Announced as generally available](https://gitlab.com/gitlab-org/gitlab-foss/issues/46097) in GitLab 11.0.
|
||||||
|
|
||||||
NOTE: **Note:**
|
NOTE: **Note:**
|
||||||
This feature is off by default. See below for how to [enable or disable](#enabling-incremental-logging) it.
|
This feature is off by default. See below for how to [enable or disable](#enabling-incremental-logging) it.
|
||||||
|
@ -83,7 +80,7 @@ The data flow is the same as described in the [data flow section](#data-flow)
|
||||||
with one change: _the stored path of the first two phases is different_. This incremental
|
with one change: _the stored path of the first two phases is different_. This incremental
|
||||||
log architecture stores chunks of logs in Redis and a persistent store (object storage or database) instead of
|
log architecture stores chunks of logs in Redis and a persistent store (object storage or database) instead of
|
||||||
file storage. Redis is used as first-class storage, and it stores up-to 128KB
|
file storage. Redis is used as first-class storage, and it stores up-to 128KB
|
||||||
of data. Once the full chunk is sent, it is flushed to a persistent store, either object storage(temporary directory) or database.
|
of data. Once the full chunk is sent, it is flushed to a persistent store, either object storage (temporary directory) or database.
|
||||||
After a while, the data in Redis and a persitent store will be archived to [object storage](#uploading-logs-to-object-storage).
|
After a while, the data in Redis and a persitent store will be archived to [object storage](#uploading-logs-to-object-storage).
|
||||||
|
|
||||||
The data are stored in the following Redis namespace: `Gitlab::Redis::SharedState`.
|
The data are stored in the following Redis namespace: `Gitlab::Redis::SharedState`.
|
||||||
|
@ -163,7 +160,3 @@ instance. If the number of jobs is 1000, 128MB (128KB * 1000) is consumed.
|
||||||
Also, it could pressure the database replication lag. `INSERT`s are generated to
|
Also, it could pressure the database replication lag. `INSERT`s are generated to
|
||||||
indicate that we have log chunk. `UPDATE`s with 128KB of data is issued once we
|
indicate that we have log chunk. `UPDATE`s with 128KB of data is issued once we
|
||||||
receive multiple chunks.
|
receive multiple chunks.
|
||||||
|
|
||||||
[ce-18169]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/18169
|
|
||||||
[ce-21193]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/21193
|
|
||||||
[ce-46097]: https://gitlab.com/gitlab-org/gitlab-foss/issues/46097
|
|
||||||
|
|
|
@ -32,11 +32,10 @@ to protect trigger tokens.
|
||||||
You can use the `CI_JOB_TOKEN` [variable][predef] (used to authenticate
|
You can use the `CI_JOB_TOKEN` [variable][predef] (used to authenticate
|
||||||
with the [GitLab Container Registry][registry]) in the following cases.
|
with the [GitLab Container Registry][registry]) in the following cases.
|
||||||
|
|
||||||
#### When used with multi-project pipelines **(PREMIUM)**
|
#### When used with multi-project pipelines
|
||||||
|
|
||||||
> **Note**:
|
> - Use of `CI_JOB_TOKEN` for multi-project pipelines was [introduced][ee-2017] in [GitLab Premium][ee] 9.3.
|
||||||
The use of `CI_JOB_TOKEN` for multi-project pipelines was [introduced][ee-2017]
|
> - Use of `CI_JOB_TOKEN` for multi-project pipelines was [made available](https://gitlab.com/gitlab-org/gitlab/issues/31573) in all tiers in GitLab 12.4.
|
||||||
in [GitLab Premium][ee] 9.3.
|
|
||||||
|
|
||||||
This way of triggering can only be used when invoked inside `.gitlab-ci.yml`,
|
This way of triggering can only be used when invoked inside `.gitlab-ci.yml`,
|
||||||
and it creates a dependent pipeline relation visible on the
|
and it creates a dependent pipeline relation visible on the
|
||||||
|
|
|
@ -326,9 +326,8 @@ file in. Once the changes are on master, they will be picked up by
|
||||||
[Crowdin](https://translate.gitlab.com) and be presented for
|
[Crowdin](https://translate.gitlab.com) and be presented for
|
||||||
translation.
|
translation.
|
||||||
|
|
||||||
We don't need to check in any changes to the
|
We don't need to check in any changes to the `locale/[language]/gitlab.po` files.
|
||||||
`locale/[language]/gitlab.po` files. Those will be updated in a [when
|
They are updated automatically when [translations from Crowdin are merged](merging_translations.md).
|
||||||
translations from Crowdin are merged](merging_translations.md).
|
|
||||||
|
|
||||||
If there are merge conflicts in the `gitlab.pot` file, you can delete the file
|
If there are merge conflicts in the `gitlab.pot` file, you can delete the file
|
||||||
and regenerate it using the same command.
|
and regenerate it using the same command.
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# Merging translations from Crowdin
|
# Merging translations from Crowdin
|
||||||
|
|
||||||
Crowdin automatically syncs the `gitlab.pot` file presenting newly
|
Crowdin automatically syncs the `gitlab.pot` file with the Crowdin service, presenting
|
||||||
added translations to the community of translators.
|
newly added externalized strings to the community of translators.
|
||||||
|
|
||||||
At the same time, it creates a merge request to merge all newly added
|
[GitLab Crowdin Bot](https://gitlab.com/gitlab-crowdin-bot) also creates merge requests
|
||||||
& approved translations. Find the [merge request created by
|
to take newly approved translation submissions and merge them into the `locale/<language>/gitlab.po`
|
||||||
`gitlab-crowdin-bot`](https://gitlab.com/gitlab-org/gitlab/merge_requests?scope=all&utf8=%E2%9C%93&state=opened&author_username=gitlab-crowdin-bot)
|
files. Check the [merge requests created by `gitlab-crowdin-bot`](https://gitlab.com/gitlab-org/gitlab/merge_requests?scope=all&utf8=%E2%9C%93&state=opened&author_username=gitlab-crowdin-bot)
|
||||||
to see new and merged merge requests.
|
to see new and merged merge requests.
|
||||||
|
|
||||||
## Validation
|
## Validation
|
||||||
|
@ -31,17 +31,16 @@ clicking `Pause sync` on the [Crowdin integration settings
|
||||||
page](https://translate.gitlab.com/project/gitlab-ee/settings#integration).
|
page](https://translate.gitlab.com/project/gitlab-ee/settings#integration).
|
||||||
|
|
||||||
When all failures are resolved, the translations need to be double
|
When all failures are resolved, the translations need to be double
|
||||||
checked once more as discussed in [confidential issue](../../user/project/issues/confidential_issues.md) `https://gitlab.com/gitlab-org/gitlab-foss/issues/37850`.
|
checked once more as discussed in [confidential issue](../../user/project/issues/confidential_issues.md) `https://gitlab.com/gitlab-org/gitlab/issues/19485`.
|
||||||
|
|
||||||
## Merging translations
|
## Merging translations
|
||||||
|
|
||||||
When all translations are found good and pipelines pass the
|
When all translations are found good and pipelines pass the
|
||||||
translations can be merged into the master branch. When merging the translations, make sure to check the `Remove
|
translations can be merged into the master branch. When merging the translations,
|
||||||
source branch` checkbox, so Crowdin recreates the `master-i18n` from
|
make sure to check the **Remove source branch** checkbox, so Crowdin recreates the
|
||||||
master after the new translation was merged.
|
`master-i18n` from master after the new translation was merged.
|
||||||
|
|
||||||
We are discussing automating this entire process
|
We are discussing [automating this entire process](https://gitlab.com/gitlab-org/gitlab/issues/19896).
|
||||||
[here](https://gitlab.com/gitlab-org/gitlab/issues/19896).
|
|
||||||
|
|
||||||
## Recreate the merge request
|
## Recreate the merge request
|
||||||
|
|
||||||
|
|
|
@ -292,9 +292,11 @@ module Gitlab
|
||||||
|
|
||||||
existing_object
|
existing_object
|
||||||
else
|
else
|
||||||
object = relation_class.new
|
# Because of single-type inheritance, we need to be careful to use the `type` field
|
||||||
|
# See https://gitlab.com/gitlab-org/gitlab/issues/34860#note_235321497
|
||||||
# Use #assign_attributes here to call object custom setters
|
inheritance_column = relation_class.try(:inheritance_column)
|
||||||
|
inheritance_attributes = parsed_relation_hash.slice(inheritance_column)
|
||||||
|
object = relation_class.new(inheritance_attributes)
|
||||||
object.assign_attributes(parsed_relation_hash)
|
object.assign_attributes(parsed_relation_hash)
|
||||||
object
|
object
|
||||||
end
|
end
|
||||||
|
|
|
@ -6226,7 +6226,9 @@
|
||||||
"job_id": null,
|
"job_id": null,
|
||||||
"name": "test build 1",
|
"name": "test build 1",
|
||||||
"deploy": false,
|
"deploy": false,
|
||||||
"options": null,
|
"options": {
|
||||||
|
"image": "busybox:latest"
|
||||||
|
},
|
||||||
"allow_failure": false,
|
"allow_failure": false,
|
||||||
"stage": "test",
|
"stage": "test",
|
||||||
"trigger_request_id": null,
|
"trigger_request_id": null,
|
||||||
|
|
|
@ -283,6 +283,10 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
|
||||||
it 'correctly restores association between a pipeline and a job' do
|
it 'correctly restores association between a pipeline and a job' do
|
||||||
expect(CommitStatus.all).to all(have_attributes(pipeline_id: a_value > 0))
|
expect(CommitStatus.all).to all(have_attributes(pipeline_id: a_value > 0))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'restores a Hash for CommitStatus options' do
|
||||||
|
expect(CommitStatus.all.map(&:options).compact).to all(be_a(Hash))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue