-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins do not compile #157440
Comments
I could reproduce this issue on main following @desean1625 steps. |
Pinging @elastic/kibana-core (Team:Core) |
@elastic/kibana-operations I'm not sure which one of our two teams the plugin generator is owned by 😅 ? |
It's not the plugin generation that is broken it is more the web pack configuration and serving of compiled plugins. |
I just broke the issue down into an easily reproducible example utilizing only the documented toolset. |
@desean1625 I believe you are missing the step to actually build your plugin https://www.elastic.co/guide/en/kibana/current/plugin-tooling.html#_run_kibana_with_your_plugin_in_dev_mode |
@mistic |
If it works on |
From the doc @mistic linked:
The relevant part being: you need to run yarn dev --watch in the plugin root folder at a dedicated terminal IIRC the 'default' dev optimizer process (launched with the server via FWIW, doing exactly what's documented works on my side. @desean1625 can you confirm that following the instructions works on your side too? |
For what is worth, running |
@pgayvallet you are right. looks like 1b85815 removed the kbn-plugin-discovery that changed the default pluginScanDirs Running |
I would argue that since that folder is hardcoded to be watched as a plugin discovery path here it should also as a default be fed into the optimizer to be compiled. Like it used to be. |
True, can't deny it. OTOH, are you often developing more than one or two custom Kibana plugin at a time?
I lack the history behind that change unfortunatly, as it was driven by another team. @elastic/kibana-operations does anyone remember why this change was performed? |
Our projects are structured similar to x-pack. Some of our plugins have dependencies on other plugins. |
reassigning to @elastic/kibana-operations given the question / change request is on their side. |
We are running into this issue as well after upgrading our plugin from Kibana 8.6.2 to 8.8.0. We get this error with 'yarn dev --watch' yarn dev --watch --debug --verbose |
…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]>
…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)
…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)
…tput mode (#159630) (#159760) # Backport This will backport the following commits from `main` to `8.7`: - [fix(NA): build external plugins with correct bazel artifacts output mode (#159630)](#159630) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tiago Costa","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-14T23:43:05Z","message":"fix(NA): build external plugins with correct bazel artifacts output mode (#159630)\n\nCloses #159328 ,\r\nhttps://github.com//issues/154325,\r\nhttps://github.com//issues/157440\r\n\r\nThis PR fixes a problem in the plugin helpers tasks used to build\r\nexternal plugins. After changes to transpile packages differently in the\r\npast months a bug was introduced and external plugins were being built\r\nwith the wrong shared ui deps output mode causing development form\r\nimports to be bundled and causing problems at page load time.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"7e067ec47866007051be6afad2a46ab9f8438cb7","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","auto-backport","v8.7.2","v8.9.0","v8.8.2"],"number":159630,"url":"https://github.com/elastic/kibana/pull/159630","mergeCommit":{"message":"fix(NA): build external plugins with correct bazel artifacts output mode (#159630)\n\nCloses #159328 ,\r\nhttps://github.com//issues/154325,\r\nhttps://github.com//issues/157440\r\n\r\nThis PR fixes a problem in the plugin helpers tasks used to build\r\nexternal plugins. After changes to transpile packages differently in the\r\npast months a bug was introduced and external plugins were being built\r\nwith the wrong shared ui deps output mode causing development form\r\nimports to be bundled and causing problems at page load time.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"7e067ec47866007051be6afad2a46ab9f8438cb7"}},"sourceBranch":"main","suggestedTargetBranches":["8.7","8.8"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159630","number":159630,"mergeCommit":{"message":"fix(NA): build external plugins with correct bazel artifacts output mode (#159630)\n\nCloses #159328 ,\r\nhttps://github.com//issues/154325,\r\nhttps://github.com//issues/157440\r\n\r\nThis PR fixes a problem in the plugin helpers tasks used to build\r\nexternal plugins. After changes to transpile packages differently in the\r\npast months a bug was introduced and external plugins were being built\r\nwith the wrong shared ui deps output mode causing development form\r\nimports to be bundled and causing problems at page load time.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"7e067ec47866007051be6afad2a46ab9f8438cb7"}},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Tiago Costa <[email protected]>
…tput mode (#159630) (#159761) # Backport This will backport the following commits from `main` to `8.8`: - [fix(NA): build external plugins with correct bazel artifacts output mode (#159630)](#159630) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tiago Costa","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-14T23:43:05Z","message":"fix(NA): build external plugins with correct bazel artifacts output mode (#159630)\n\nCloses #159328 ,\r\nhttps://github.com//issues/154325,\r\nhttps://github.com//issues/157440\r\n\r\nThis PR fixes a problem in the plugin helpers tasks used to build\r\nexternal plugins. After changes to transpile packages differently in the\r\npast months a bug was introduced and external plugins were being built\r\nwith the wrong shared ui deps output mode causing development form\r\nimports to be bundled and causing problems at page load time.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"7e067ec47866007051be6afad2a46ab9f8438cb7","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","auto-backport","v8.7.2","v8.9.0","v8.8.2"],"number":159630,"url":"https://github.com/elastic/kibana/pull/159630","mergeCommit":{"message":"fix(NA): build external plugins with correct bazel artifacts output mode (#159630)\n\nCloses #159328 ,\r\nhttps://github.com//issues/154325,\r\nhttps://github.com//issues/157440\r\n\r\nThis PR fixes a problem in the plugin helpers tasks used to build\r\nexternal plugins. After changes to transpile packages differently in the\r\npast months a bug was introduced and external plugins were being built\r\nwith the wrong shared ui deps output mode causing development form\r\nimports to be bundled and causing problems at page load time.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"7e067ec47866007051be6afad2a46ab9f8438cb7"}},"sourceBranch":"main","suggestedTargetBranches":["8.7","8.8"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159630","number":159630,"mergeCommit":{"message":"fix(NA): build external plugins with correct bazel artifacts output mode (#159630)\n\nCloses #159328 ,\r\nhttps://github.com//issues/154325,\r\nhttps://github.com//issues/157440\r\n\r\nThis PR fixes a problem in the plugin helpers tasks used to build\r\nexternal plugins. After changes to transpile packages differently in the\r\npast months a bug was introduced and external plugins were being built\r\nwith the wrong shared ui deps output mode causing development form\r\nimports to be bundled and causing problems at page load time.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"7e067ec47866007051be6afad2a46ab9f8438cb7"}},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Tiago Costa <[email protected]>
Kibana version:
main branch
Describe the bug:
Plugins are not compiling correctly
Steps to reproduce:
2
yarn start --config ./config/kibana.dev.yml --no-base-path
I see my plugin [plugins-system.standard] Setting up [137] plugins: [.... testMe ...]
But the plugin is never actually compiled and I get 404 when served
GET http://localhost:55601/9007199254740991/bundles/plugin/testMe/1.0.0/testMe.plugin.js net::ERR_ABORTED 404 (Not Found)
loadScript @ bootstrap.js:81
Expected behavior:
It to work.
The text was updated successfully, but these errors were encountered: