-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(NA): build external plugins with correct bazel artifacts output m…
…ode (#159630) Closes #159328 , #154325, #157440 This PR fixes a problem in the plugin helpers tasks used to build external plugins. After changes to transpile packages differently in the past months a bug was introduced and external plugins were being built with the wrong shared ui deps output mode causing development form imports to be bundled and causing problems at page load time. --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 7e067ec)
- Loading branch information
Showing
8 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { runBazel } from '@kbn/bazel-runner'; | ||
import { TaskContext } from '../task_context'; | ||
|
||
export async function buildBazelPackages({ log, dist }: TaskContext) { | ||
log.info('run bazel and build required artifacts for the optimizer'); | ||
|
||
try { | ||
await runBazel( | ||
[ | ||
'build', | ||
'//packages/kbn-ui-shared-deps-npm:shared_built_assets', | ||
'//packages/kbn-ui-shared-deps-src:shared_built_assets', | ||
'//packages/kbn-monaco:target_workers', | ||
'--show_result=1', | ||
].concat(dist ? [`--define=dist=true`] : []), | ||
{ | ||
logPrefix: ' │ ', | ||
quiet: true, | ||
} | ||
); | ||
|
||
log.success('bazel run successfully and artifacts were created'); | ||
} catch (e) { | ||
log.error(`bazel run failed: ${e}`); | ||
process.exit(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters