Commit 93d7441c authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 6b8d671d
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
- tmp/cache/assets/sprockets - tmp/cache/assets/sprockets
- tmp/cache/babel-loader - tmp/cache/babel-loader
- tmp/cache/vue-loader - tmp/cache/vue-loader
- tmp/cache/webpack-dlls
.gitlab:assets:compile-metadata: .gitlab:assets:compile-metadata:
extends: extends:
...@@ -78,6 +79,7 @@ gitlab:assets:compile pull-cache: ...@@ -78,6 +79,7 @@ gitlab:assets:compile pull-cache:
SETUP_DB: "false" SETUP_DB: "false"
# we override the max_old_space_size to prevent OOM errors # we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584 NODE_OPTIONS: --max_old_space_size=3584
WEBPACK_VENDOR_DLL: "true"
cache: cache:
key: "assets-compile:v9" key: "assets-compile:v9"
artifacts: artifacts:
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
padding-left: 12px; padding-left: 12px;
position: relative; position: relative;
margin-bottom: 0; margin-bottom: 0;
width: 1px;
} }
.input-token { .input-token {
......
...@@ -75,7 +75,7 @@ $ide-commit-header-height: 48px; ...@@ -75,7 +75,7 @@ $ide-commit-header-height: 48px;
.multi-file-tabs { .multi-file-tabs {
display: flex; display: flex;
background-color: $white-normal; background-color: $gray-light;
box-shadow: inset 0 -1px $white-dark; box-shadow: inset 0 -1px $white-dark;
> ul { > ul {
......
---
title: Simplifying colors in the Web IDE
merge_request: 25304
author:
type: other
...@@ -117,23 +117,18 @@ if (IS_EE) { ...@@ -117,23 +117,18 @@ if (IS_EE) {
}); });
} }
// if there is a compiled DLL with a matching hash string, use it
let dll; let dll;
if (VENDOR_DLL && !IS_PRODUCTION) { if (VENDOR_DLL && !IS_PRODUCTION) {
const dllHash = vendorDllHash(); const dllHash = vendorDllHash();
const dllCachePath = path.join(ROOT_PATH, `tmp/cache/webpack-dlls/${dllHash}`); const dllCachePath = path.join(ROOT_PATH, `tmp/cache/webpack-dlls/${dllHash}`);
if (fs.existsSync(dllCachePath)) { dll = {
console.log(`Using vendor DLL found at: ${dllCachePath}`); manifestPath: path.join(dllCachePath, 'vendor.dll.manifest.json'),
dll = { cacheFrom: dllCachePath,
manifestPath: path.join(dllCachePath, 'vendor.dll.manifest.json'), cacheTo: path.join(ROOT_PATH, `public/assets/webpack/dll.${dllHash}/`),
cacheFrom: dllCachePath, publicPath: `dll.${dllHash}/vendor.dll.bundle.js`,
cacheTo: path.join(ROOT_PATH, `public/assets/webpack/dll.${dllHash}/`), exists: null,
publicPath: `dll.${dllHash}/vendor.dll.bundle.js`, };
};
} else {
console.log(`Warning: No vendor DLL found at: ${dllCachePath}. DllPlugin disabled.`);
}
} }
module.exports = { module.exports = {
...@@ -314,6 +309,51 @@ module.exports = { ...@@ -314,6 +309,51 @@ module.exports = {
jQuery: 'jquery', jQuery: 'jquery',
}), }),
// if DLLs are enabled, detect whether the DLL exists and create it automatically if necessary
dll && {
apply(compiler) {
compiler.hooks.beforeCompile.tapAsync('DllAutoCompilePlugin', (params, callback) => {
if (dll.exists) {
callback();
} else if (fs.existsSync(dll.manifestPath)) {
console.log(`Using vendor DLL found at: ${dll.cacheFrom}`);
dll.exists = true;
callback();
} else {
console.log(
`Warning: No vendor DLL found at: ${dll.cacheFrom}. Compiling DLL automatically.`,
);
const dllConfig = require('./webpack.vendor.config.js');
const dllCompiler = webpack(dllConfig);
dllCompiler.run((err, stats) => {
if (err) {
return callback(err);
}
const info = stats.toJson();
if (stats.hasErrors()) {
console.error(info.errors.join('\n\n'));
return callback('DLL not compiled successfully.');
}
if (stats.hasWarnings()) {
console.warn(info.warnings.join('\n\n'));
console.warn('DLL compiled with warnings.');
} else {
console.log('DLL compiled successfully.');
}
dll.exists = true;
callback();
});
}
});
},
},
// reference our compiled DLL modules // reference our compiled DLL modules
dll && dll &&
new webpack.DllReferencePlugin({ new webpack.DllReferencePlugin({
......
...@@ -15,6 +15,9 @@ module.exports = { ...@@ -15,6 +15,9 @@ module.exports = {
extensions: ['.js'], extensions: ['.js'],
}, },
// ensure output is not generated when errors are encountered
bail: true,
context: ROOT_PATH, context: ROOT_PATH,
entry: { entry: {
......
...@@ -388,6 +388,11 @@ Each request to view a resource in a private site is authenticated by Pages ...@@ -388,6 +388,11 @@ Each request to view a resource in a private site is authenticated by Pages
using that token. For each request it receives, it makes a request to the GitLab using that token. For each request it receives, it makes a request to the GitLab
API to check that the user is authorized to read that site. API to check that the user is authorized to read that site.
From [GitLab 12.8](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/3689) onwards,
Access Control parameters for Pages are set in a configuration file, which
by convention is named `gitlab-pages-config`. The configuration file is passed to
pages using the `-config flag` or CONFIG environment variable.
Pages access control is disabled by default. To enable it: Pages access control is disabled by default. To enable it:
1. Modify your `config/gitlab.yml` file: 1. Modify your `config/gitlab.yml` file:
...@@ -402,13 +407,14 @@ Pages access control is disabled by default. To enable it: ...@@ -402,13 +407,14 @@ Pages access control is disabled by default. To enable it:
This should be called `GitLab Pages` and have a `Redirect URL` of This should be called `GitLab Pages` and have a `Redirect URL` of
`https://projects.example.io/auth`. It does not need to be a "trusted" `https://projects.example.io/auth`. It does not need to be a "trusted"
application, but it does need the `api` scope. application, but it does need the `api` scope.
1. Start the Pages daemon with the following additional arguments: 1. Start the Pages daemon by passing a configuration file with the following arguments:
```shell ```shell
-auth-client-secret <OAuth code generated by GitLab> \ auth-client-id=<OAuth Application ID generated by GitLab>
-auth-redirect-uri http://projects.example.io/auth \ auth-client-secret=<OAuth code generated by GitLab>
-auth-secret <40 random hex characters> \ auth-redirect-uri='http://projects.example.io/auth'
-auth-server <URL of the GitLab instance> auth-secret=<40 random hex characters>
auth-server=<URL of the GitLab instance>
``` ```
1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core). 1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core).
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
# for more information on how to write migrations for GitLab. # for more information on how to write migrations for GitLab.
class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>] class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
include Gitlab::Database::MigrationHelpers # Uncomment the following include if you require helper functions:
# include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime. # Set this constant to true if this migration requires downtime.
DOWNTIME = false DOWNTIME = false
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
# for more information on how to write migrations for GitLab. # for more information on how to write migrations for GitLab.
class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>] class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
include Gitlab::Database::MigrationHelpers # Uncomment the following include if you require helper functions:
# include Gitlab::Database::MigrationHelpers
DOWNTIME = false DOWNTIME = false
......
...@@ -35,6 +35,11 @@ module Gitlab ...@@ -35,6 +35,11 @@ module Gitlab
docstring 'blob.truncated? == false' docstring 'blob.truncated? == false'
end end
define_histogram :gitlab_blob_size do
docstring 'Gitlab::Git::Blob size'
buckets [1_000, 5_000, 10_000, 50_000, 100_000, 500_000, 1_000_000]
end
class << self class << self
def find(repository, sha, path, limit: MAX_DATA_DISPLAY_SIZE) def find(repository, sha, path, limit: MAX_DATA_DISPLAY_SIZE)
tree_entry(repository, sha, path, limit) tree_entry(repository, sha, path, limit)
......
...@@ -2,5 +2,7 @@ ...@@ -2,5 +2,7 @@
# Clean up cached files that are older than 4 days # Clean up cached files that are older than 4 days
find tmp/cache/assets/sprockets/ -type f -mtime +4 -execdir rm -- "{}" \; find tmp/cache/assets/sprockets/ -type f -mtime +4 -execdir rm -- "{}" \;
find tmp/cache/webpack-dlls/ -maxdepth 1 -type d -mtime +4 -exec rm -rf -- "{}" \;
du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %" du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"
du -d 0 -h tmp/cache/webpack-dlls | cut -f1 | xargs -I % echo "tmp/cache/webpack-dlls is currently %"
...@@ -597,5 +597,9 @@ describe Gitlab::Git::Blob, :seed_helper do ...@@ -597,5 +597,9 @@ describe Gitlab::Git::Blob, :seed_helper do
it 'defines :gitlab_blob_truncated_false counter' do it 'defines :gitlab_blob_truncated_false counter' do
expect(described_class).to respond_to(:gitlab_blob_truncated_false) expect(described_class).to respond_to(:gitlab_blob_truncated_false)
end end
it 'defines :gitlab_blob_size histogram' do
expect(described_class).to respond_to(:gitlab_blob_size)
end
end end
end end
...@@ -740,15 +740,15 @@ ...@@ -740,15 +740,15 @@
dependencies: dependencies:
vue-eslint-parser "^7.0.0" vue-eslint-parser "^7.0.0"
"@gitlab/svgs@^1.96.0": "@gitlab/svgs@^1.99.0":
version "1.96.0" version "1.99.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.96.0.tgz#1d32730389e94358dc245e8336912523446d1269" resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.99.0.tgz#bcf971c3a14920218e86da71ca115244b23a4a3f"
integrity sha512-mhg6kndxDhwjWChKhs5utO6PowlOyFdaCXUrkkxxe2H3cd8DYa40QOEcJeUrSIhkmgIMVesUawesx5tt4Bnnnw== integrity sha512-bxYFxnmuoWPBU9isL3/CYFlr+k2YWU47Pq0vfmSmL7uLnb/vYymfZZF5p3erlZ62WGwuT3kp4GnuoZBMfmannA==
"@gitlab/ui@^9.8.0": "@gitlab/ui@^9.11.1":
version "9.8.0" version "9.11.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.8.0.tgz#b1a0b5f1f6ac9fdb19b64d74f0f729e3ec182495" resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.11.1.tgz#f234687d2d1b555ebeaf05156e16b4fd97aef453"
integrity sha512-0VjSTjCCtevdoeByxf5o/OimzV3zt1MMH5DlZSqakML38uoOM0WpgXI/4xAipzfYwiKUW+IWbuyZGJ3ucaJnhQ== integrity sha512-3INIA2n9rxz+VCc0hO4EnmET00XCAMS25hHnIJ6ffKeJz40diCvEZ6Asusv4BiIPosmTyz8VufYGQRq+8v8rNQ==
dependencies: dependencies:
"@babel/standalone" "^7.0.0" "@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0" "@gitlab/vue-toasted" "^1.3.0"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment