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

Add latest changes from gitlab-org/gitlab@master

parent 6b8d671d
......@@ -6,6 +6,7 @@
- tmp/cache/assets/sprockets
- tmp/cache/babel-loader
- tmp/cache/vue-loader
- tmp/cache/webpack-dlls
.gitlab:assets:compile-metadata:
extends:
......@@ -78,6 +79,7 @@ gitlab:assets:compile pull-cache:
SETUP_DB: "false"
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584
WEBPACK_VENDOR_DLL: "true"
cache:
key: "assets-compile:v9"
artifacts:
......
......@@ -56,6 +56,7 @@
padding-left: 12px;
position: relative;
margin-bottom: 0;
width: 1px;
}
.input-token {
......
......@@ -75,7 +75,7 @@ $ide-commit-header-height: 48px;
.multi-file-tabs {
display: flex;
background-color: $white-normal;
background-color: $gray-light;
box-shadow: inset 0 -1px $white-dark;
> ul {
......
---
title: Simplifying colors in the Web IDE
merge_request: 25304
author:
type: other
......@@ -117,23 +117,18 @@ if (IS_EE) {
});
}
// if there is a compiled DLL with a matching hash string, use it
let dll;
if (VENDOR_DLL && !IS_PRODUCTION) {
const dllHash = vendorDllHash();
const dllCachePath = path.join(ROOT_PATH, `tmp/cache/webpack-dlls/${dllHash}`);
if (fs.existsSync(dllCachePath)) {
console.log(`Using vendor DLL found at: ${dllCachePath}`);
dll = {
manifestPath: path.join(dllCachePath, 'vendor.dll.manifest.json'),
cacheFrom: dllCachePath,
cacheTo: path.join(ROOT_PATH, `public/assets/webpack/dll.${dllHash}/`),
publicPath: `dll.${dllHash}/vendor.dll.bundle.js`,
};
} else {
console.log(`Warning: No vendor DLL found at: ${dllCachePath}. DllPlugin disabled.`);
}
dll = {
manifestPath: path.join(dllCachePath, 'vendor.dll.manifest.json'),
cacheFrom: dllCachePath,
cacheTo: path.join(ROOT_PATH, `public/assets/webpack/dll.${dllHash}/`),
publicPath: `dll.${dllHash}/vendor.dll.bundle.js`,
exists: null,
};
}
module.exports = {
......@@ -314,6 +309,51 @@ module.exports = {
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
dll &&
new webpack.DllReferencePlugin({
......
......@@ -15,6 +15,9 @@ module.exports = {
extensions: ['.js'],
},
// ensure output is not generated when errors are encountered
bail: true,
context: ROOT_PATH,
entry: {
......
......@@ -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
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:
1. Modify your `config/gitlab.yml` file:
......@@ -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
`https://projects.example.io/auth`. It does not need to be a "trusted"
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
-auth-client-secret <OAuth code generated by GitLab> \
-auth-redirect-uri http://projects.example.io/auth \
-auth-secret <40 random hex characters> \
-auth-server <URL of the GitLab instance>
auth-client-id=<OAuth Application ID generated by GitLab>
auth-client-secret=<OAuth code generated by GitLab>
auth-redirect-uri='http://projects.example.io/auth'
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).
......
......@@ -4,7 +4,8 @@
# for more information on how to write migrations for GitLab.
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.
DOWNTIME = false
......
......@@ -4,7 +4,8 @@
# for more information on how to write migrations for GitLab.
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
......
......@@ -35,6 +35,11 @@ module Gitlab
docstring 'blob.truncated? == false'
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
def find(repository, sha, path, limit: MAX_DATA_DISPLAY_SIZE)
tree_entry(repository, sha, path, limit)
......
......@@ -2,5 +2,7 @@
# Clean up cached files that are older than 4 days
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/webpack-dlls | cut -f1 | xargs -I % echo "tmp/cache/webpack-dlls is currently %"
......@@ -597,5 +597,9 @@ describe Gitlab::Git::Blob, :seed_helper do
it 'defines :gitlab_blob_truncated_false counter' do
expect(described_class).to respond_to(:gitlab_blob_truncated_false)
end
it 'defines :gitlab_blob_size histogram' do
expect(described_class).to respond_to(:gitlab_blob_size)
end
end
end
......@@ -740,15 +740,15 @@
dependencies:
vue-eslint-parser "^7.0.0"
"@gitlab/svgs@^1.96.0":
version "1.96.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.96.0.tgz#1d32730389e94358dc245e8336912523446d1269"
integrity sha512-mhg6kndxDhwjWChKhs5utO6PowlOyFdaCXUrkkxxe2H3cd8DYa40QOEcJeUrSIhkmgIMVesUawesx5tt4Bnnnw==
"@gitlab/ui@^9.8.0":
version "9.8.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.8.0.tgz#b1a0b5f1f6ac9fdb19b64d74f0f729e3ec182495"
integrity sha512-0VjSTjCCtevdoeByxf5o/OimzV3zt1MMH5DlZSqakML38uoOM0WpgXI/4xAipzfYwiKUW+IWbuyZGJ3ucaJnhQ==
"@gitlab/svgs@^1.99.0":
version "1.99.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.99.0.tgz#bcf971c3a14920218e86da71ca115244b23a4a3f"
integrity sha512-bxYFxnmuoWPBU9isL3/CYFlr+k2YWU47Pq0vfmSmL7uLnb/vYymfZZF5p3erlZ62WGwuT3kp4GnuoZBMfmannA==
"@gitlab/ui@^9.11.1":
version "9.11.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.11.1.tgz#f234687d2d1b555ebeaf05156e16b4fd97aef453"
integrity sha512-3INIA2n9rxz+VCc0hO4EnmET00XCAMS25hHnIJ6ffKeJz40diCvEZ6Asusv4BiIPosmTyz8VufYGQRq+8v8rNQ==
dependencies:
"@babel/standalone" "^7.0.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