mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
move optimize into data folder (#25944)
* move optimize into data folder * path * replace optimize with data in notice glob * update docs * more updates * update snapshots * re-add folder references * prettier * save changes * rm optimize from .eslintignore * rm extra file * fix merge
This commit is contained in:
parent
1f982132db
commit
bad947d7d1
17 changed files with 22 additions and 27 deletions
|
@ -5,7 +5,6 @@ bower_components
|
|||
/target
|
||||
/.es
|
||||
/plugins
|
||||
/optimize
|
||||
/built_assets
|
||||
/html_docs
|
||||
/src/fixtures/vislib/mock_data
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,7 +8,6 @@ node_modules
|
|||
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
|
||||
!/src/dev/notice/__fixtures__/node_modules
|
||||
trash
|
||||
/optimize
|
||||
/built_assets
|
||||
target
|
||||
/build
|
||||
|
|
|
@ -74,4 +74,10 @@ specified explicitly.
|
|||
|
||||
*Impact:* Define `xpack.security.authc.saml.realm` when using the SAML authentication provider instead.
|
||||
|
||||
// end::notable-breaking-changes[]
|
||||
[float]
|
||||
=== `optimize` directory is now in the `data` folder
|
||||
*Details:* Generated bundles have moved to the configured `path.data` folder.
|
||||
|
||||
*Impact:* Any workflow that involved manually clearing generated bundles will have to be updated with the new path.
|
||||
|
||||
// end::notable-breaking-changes[]
|
||||
|
|
|
@ -209,7 +209,7 @@ locations for a Debian-based system:
|
|||
| optimize
|
||||
| Transpiled source code. Certain administrative actions (e.g. plugin install)
|
||||
result in the source code being retranspiled on the fly.
|
||||
| /usr/share/kibana/optimize
|
||||
| /var/lib/kibana/optimize
|
||||
d|
|
||||
|
||||
| plugins
|
||||
|
|
|
@ -200,7 +200,7 @@ locations for an RPM-based system:
|
|||
| optimize
|
||||
| Transpiled source code. Certain administrative actions (e.g. plugin install)
|
||||
result in the source code being retranspiled on the fly.
|
||||
| /usr/share/kibana/optimize
|
||||
| /var/lib/kibana/optimize
|
||||
d|
|
||||
|
||||
| plugins
|
||||
|
|
|
@ -128,7 +128,7 @@ important data later on.
|
|||
| optimize
|
||||
| Transpiled source code. Certain administrative actions (e.g. plugin install)
|
||||
result in the source code being retranspiled on the fly.
|
||||
| $KIBANA_HOME\optimize
|
||||
| $KIBANA_HOME\data\optimize
|
||||
d|
|
||||
|
||||
| plugins
|
||||
|
|
|
@ -96,7 +96,7 @@ important data later on.
|
|||
| optimize
|
||||
| Transpiled source code. Certain administrative actions (e.g. plugin install)
|
||||
result in the source code being retranspiled on the fly.
|
||||
| $KIBANA_HOME\optimize
|
||||
| $KIBANA_HOME\data\optimize
|
||||
d|
|
||||
|
||||
| plugins
|
||||
|
|
|
@ -32,4 +32,4 @@ export const KIBANA_FTR_SCRIPT = resolve(KIBANA_ROOT, 'scripts/functional_test_r
|
|||
export const PROJECT_ROOT = resolve(__dirname, '../../../../../../');
|
||||
export const FUNCTIONAL_CONFIG_PATH = resolve(KIBANA_ROOT, 'test/functional/config');
|
||||
export const API_CONFIG_PATH = resolve(KIBANA_ROOT, 'test/api_integration/config');
|
||||
export const OPTIMIZE_BUNDLE_DIR = resolve(KIBANA_ROOT, 'optimize/bundles');
|
||||
export const OPTIMIZE_BUNDLE_DIR = resolve(KIBANA_ROOT, 'data/optimize/bundles');
|
||||
|
|
|
@ -25,8 +25,8 @@ export const CreateEmptyDirsAndFilesTask = {
|
|||
async run(config, log, build) {
|
||||
await Promise.all([
|
||||
mkdirp(build.resolvePath('plugins')),
|
||||
mkdirp(build.resolvePath('data')),
|
||||
write(build.resolvePath('optimize/.babel_register_cache.json'), '{}'),
|
||||
mkdirp(build.resolvePath('data/optimize')),
|
||||
write(build.resolvePath('data/optimize/.babel_register_cache.json'), '{}'),
|
||||
]);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -34,6 +34,5 @@ case $1 in
|
|||
;;
|
||||
esac
|
||||
|
||||
chown -R <%= user %>:<%= group %> <%= optimizeDir %>
|
||||
chown <%= user %>:<%= group %> <%= dataDir %>
|
||||
chown -R <%= user %>:<%= group %> <%= dataDir %>
|
||||
chown <%= user %>:<%= group %> <%= pluginsDir %>
|
||||
|
|
|
@ -44,10 +44,6 @@ if [ "$REMOVE_USER_AND_GROUP" = "true" ]; then
|
|||
fi
|
||||
|
||||
if [ "$REMOVE_DIRS" = "true" ]; then
|
||||
if [ -d "<%= optimizeDir %>" ]; then
|
||||
rm -rf "<%= optimizeDir %>"
|
||||
fi
|
||||
|
||||
if [ -d "<%= pluginsDir %>" ]; then
|
||||
rm -rf "<%= pluginsDir %>"
|
||||
fi
|
||||
|
|
|
@ -89,7 +89,6 @@ export async function runFpm(config, log, build, type, pkgSpecificFlags) {
|
|||
// scripts, also causes scripts to be processed with erb
|
||||
'--template-value', `user=kibana`,
|
||||
'--template-value', `group=kibana`,
|
||||
'--template-value', `optimizeDir=/usr/share/kibana/optimize`,
|
||||
'--template-value', `configDir=/etc/kibana`,
|
||||
'--template-value', `pluginsDir=/usr/share/kibana/plugins`,
|
||||
'--template-value', `dataDir=/var/lib/kibana`,
|
||||
|
|
|
@ -42,9 +42,9 @@ export async function generateNoticeFromSource({ productName, directory, log })
|
|||
cwd: directory,
|
||||
nodir: true,
|
||||
ignore: [
|
||||
'{node_modules,build,target,dist,optimize,built_assets}/**',
|
||||
'{node_modules,build,target,dist,data,built_assets}/**',
|
||||
'packages/*/{node_modules,build,target,dist}/**',
|
||||
'x-pack/{node_modules,build,target,dist,optimize}/**',
|
||||
'x-pack/{node_modules,build,target,dist,data}/**',
|
||||
'x-pack/packages/*/{node_modules,build,target,dist}/**',
|
||||
]
|
||||
};
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
|
||||
import Joi from 'joi';
|
||||
import os from 'os';
|
||||
|
||||
import {
|
||||
fromRoot
|
||||
} from '../../utils';
|
||||
import { join } from 'path';
|
||||
import {
|
||||
getData
|
||||
} from '../path';
|
||||
|
@ -170,7 +167,7 @@ export default () => Joi.object({
|
|||
optimize: Joi.object({
|
||||
enabled: Joi.boolean().default(true),
|
||||
bundleFilter: Joi.string().default('!tests'),
|
||||
bundleDir: Joi.string().default(fromRoot('optimize/bundles')),
|
||||
bundleDir: Joi.string().default(join(getData(), 'optimize')),
|
||||
viewCaching: Joi.boolean().default(Joi.ref('$prod')),
|
||||
watch: Joi.boolean().default(false),
|
||||
watchPort: Joi.number().default(5602),
|
||||
|
|
|
@ -212,7 +212,7 @@ export default class BaseOptimizer {
|
|||
/**
|
||||
* Adds a cache loader if we're running in dev mode. The reason we're not adding
|
||||
* the cache-loader when running in production mode is that it creates cache
|
||||
* files in optimize/.cache that are not necessary for distributable versions
|
||||
* files in data/optimize/.cache that are not necessary for distributable versions
|
||||
* of Kibana and just make compressing and extracting it more difficult.
|
||||
*/
|
||||
const maybeAddCacheLoader = (cacheName, loaders) => {
|
||||
|
|
|
@ -22,7 +22,7 @@ var resolve = require('path').resolve;
|
|||
// this must happen before `require('@babel/register')` and can't be changed
|
||||
// once the module has been loaded
|
||||
if (!process.env.BABEL_CACHE_PATH) {
|
||||
process.env.BABEL_CACHE_PATH = resolve(__dirname, '../../../optimize/.babel_register_cache.json');
|
||||
process.env.BABEL_CACHE_PATH = resolve(__dirname, '../../../data/optimize/.babel_register_cache.json');
|
||||
}
|
||||
|
||||
// paths that @babel/register should ignore
|
||||
|
|
|
@ -208,7 +208,7 @@ module.exports = function (grunt) {
|
|||
'--no-base-path',
|
||||
'--optimize.watchPort=5611',
|
||||
'--optimize.watchPrebuild=true',
|
||||
'--optimize.bundleDir=' + resolve(__dirname, '../../optimize/testdev'),
|
||||
'--optimize.bundleDir=' + resolve(__dirname, '../../data/optimize/testdev'),
|
||||
]
|
||||
}),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue