os icon indicating copy to clipboard operation
os copied to clipboard

trino/461 package update

Open octo-sts[bot] opened this issue 1 year ago • 2 comments

octo-sts[bot] avatar Oct 10 '24 21:10 octo-sts[bot]

Open AI suggestions to solve the build error:

The error log indicates a failure in executing the goal `com.github.eirslett:frontend-maven-plugin:1.15.1:npm` on the project `trino-web-ui`. The specific task `npm run package` failed with an exit value of 127, which typically means a command was not found. Here are some steps to resolve the issue:

1. **Ensure Node.js and npm are installed**: Make sure both Node.js and npm are installed and accessible in your system's PATH.

2. **Verify the `package.json` file**: Check that the `package.json` file contains a valid `package` script.

3. **Check for missing dependencies**: Ensure all necessary dependencies are listed in the `package.json` file.

4. **Run `npm install`**: Execute `npm install` to install any missing dependencies.

5. **Check plugin compatibility**: Make sure the `frontend-maven-plugin` version is compatible with your current setup.

octo-sts[bot] avatar Oct 10 '24 21:10 octo-sts[bot]

Open AI suggestions to solve the build error:

The error log indicates a failure in executing the goal of the `frontend-maven-plugin` during the `npm run package` task. The process exited with error code 127, which typically means a command was not found. Here are some steps to resolve the issue:

1. **Ensure Node.js and npm are installed**: Make sure both Node.js and npm are installed and accessible in your system's PATH.

2. **Verify the npm script**: Check that the `npm run package` script is correctly defined in your `package.json`.

3. **Check for missing dependencies**: Ensure all necessary dependencies are listed in your `package.json`.

4. **Install dependencies**: Run `npm install` to make sure all dependencies are installed.

5. **Check plugin compatibility**: Ensure that the version of `frontend-maven-plugin` you are using is compatible with your project setup.

octo-sts[bot] avatar Oct 14 '24 13:10 octo-sts[bot]

Going to need some help with this one. Here is what i've tried (note not all these changes are pushed up to this PR, I was testing locally).

trino-web-ui was recently introduced as a new component. The build issues stem from not being able to successfully build trino, and this component. trino-web-ui has a dependency on npm and nodejs. I tried adding them as buildtime dependencies.

This is the main highlight from the error log:

Failed to run task: 'npm run package' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)

If we look at the pom.xml for trino-web-ui, we can see it also includes steps to install nodejs and npm:

  • https://github.com/trinodb/trino/blob/3c20a5c4442f22df11d0c510d24500929b68e287/core/trino-web-ui/pom.xml#L86

I've also tried patching the pom.xml to remove these bundled installs of nodejs and npm, in case that was overriding our system installed versions, but to no affect.

I also tried running 'npm install' in the trino-web-ui directory first (this succeeds), like so:

  - working-directory: core/trino-web-ui/src/main/resources/webapp/src
    runs: |
      npm install

But same error results later when running the main build (./mvnw package ....). I also tried dropping the '-Dmaven.source.skip=true' flag.

mamccorm avatar Oct 15 '24 10:10 mamccorm

Open AI suggestions to solve the build error:

The error log indicates a failure in executing the goal `com.github.eirslett:frontend-maven-plugin:1.15.1:npm` on the project `trino-web-ui`. The specific task `npm run package` failed with an exit value of 127. Here are some steps to resolve the issue:

1. Ensure that Node.js and npm are installed and accessible in your system's PATH.
2. Verify that the `npm run package` script is defined in your `package.json` file.
3. Check for any missing dependencies in your `package.json`.
4. Try reinstalling node modules by running `npm install`.
5. Confirm that the version of `frontend-maven-plugin` is compatible with your project setup.

octo-sts[bot] avatar Oct 15 '24 10:10 octo-sts[bot]

converted to draft to stop the automation replacing this PR with updated versions - we want to maintain history of whats been tried

mamccorm avatar Oct 15 '24 10:10 mamccorm

given upstream is using frontend-maven-plugin to download node and npm, it won't work on aarch64 architecture because the plugin doesn't support aarch64 architecture.

It'll download node for x86 on arch which is incompatible. We need to use local nodejs and npm and from my previous work on hadoop, the local nodejs use is not officially allowed by the plugin. Somehow exec plugin needs to be tweaked to hack into node and allow local node usage.

upstream issues about the same: https://github.com/eirslett/frontend-maven-plugin/issues/884 and https://github.com/eirslett/frontend-maven-plugin/issues/1154

kranurag7 avatar Oct 15 '24 11:10 kranurag7

given upstream is using frontend-maven-plugin to download node and npm, it won't work on aarch64 architecture because the plugin doesn't support aarch64 architecture.

the x86 build is still failing with the same error though, unlike Keycloak, which passes x86 and fails ARM with this issue

mamccorm avatar Oct 15 '24 21:10 mamccorm

superseded by https://github.com/wolfi-dev/os/pull/30973

octo-sts[bot] avatar Oct 16 '24 22:10 octo-sts[bot]