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
HDDS-7569. Recon: pnpm and other library update to latest version. #4070
Conversation
@devmadhuu @dombizita can you'll please take a look |
@@ -233,7 +233,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs | |||
<checkstyle.version>9.3</checkstyle.version> | |||
<surefire.fork.timeout>1200</surefire.fork.timeout> | |||
<aws-java-sdk.version>1.12.261</aws-java-sdk.version> | |||
<frontend-maven-plugin.version>1.12.0</frontend-maven-plugin.version> | |||
<frontend-maven-plugin.version>1.12.1</frontend-maven-plugin.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this the culprit where it fails to create dir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh looks like the build is failing in CI:
https://github.com/apache/ozone/actions/runs/3677105755/jobs/6218636117
[INFO] --- frontend-maven-plugin:1.12.1:npx (set pnpm@7.18.1 store path) @ ozone-recon ---
[INFO] npm not inheriting proxy config from Maven
[INFO] Running 'npx pnpm@7.18.1 config set store-dir ~/.pnpm-store' in /home/runner/work/ozone/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web
[INFO] npm ERR! code ENOENT
[INFO] npm ERR! syscall lstat
[INFO] npm ERR! path /home/runner/work/ozone/ozone/hadoop-ozone/recon/target/lib
[INFO] npm ERR! errno -2
[INFO] npm ERR! enoent ENOENT: no such file or directory, lstat '/home/runner/work/ozone/ozone/hadoop-ozone/recon/target/lib'
[INFO] npm ERR! enoent This is related to npm not being able to find a file.
[INFO] npm ERR! enoent
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! /home/runner/.npm/_logs/2022-12-12T15_16_06_248Z-debug-0.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes Same Issue is happening in Local also. Not able to understand root cause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smitajoshi12 - pls check if below link will help. Few community members have reported since v7 of pnpm
pnpm/pnpm#4658
cc: @smengcl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can see bin is created using this command pnpm bin and pnpm store path /home/root1/.pnpm-store/v3 If I do pnpm run build then local pnpm build is successful but if we do build with Maven then it is failing because of lib folder in target of Recon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to create directory by adding a plugin in initialize
phase in recon pom but it didn't seem to work (the lib
directory doesn't seem to be created at all despite maven build shows this is being executed):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Workaround: Create lib directory under target</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="Create lib dir">
<mkdir dir="${project.build.directory}/lib"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that npx
somehow lost track of its node_modules
root directory path in the process. Might be a bug in frontend-maven-plugin
or npx
or npm
or pnpm
. I don't know too much about those nodejs build system so I can't be sure without digging even further. At least I see tons of lib
directory for each nodejs module:
ozone$ find . -name lib
...
./hadoop-ozone/recon/target/node/node_modules/npm/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib
./hadoop-ozone/recon/target/node/node_modules/npm/node_modules/npm-bundled/lib
./hadoop-ozone/recon/target/node/node_modules/npm/node_modules/nopt/lib
./hadoop-ozone/recon/target/node/node_modules/npm/lib
...
If this is the case merely creating the empty directory won't do much either, since it might still need the actual .js files in it. But we can try.
Need to debug this somehow. Or search for solutions.
@smitajoshi12 Can you address the license check failure? The new |
Do you mean below Changes we need to do in .npmrc file? |
Looks like the change here is failing the CI because of OOM:
https://github.com/smitajoshi12/ozone/actions/runs/4193312304/jobs/7270039425 @smitajoshi12 Can you look into that? See what is causing the memory issue. Although this might be a GitHub action issue, I can't merge this in this state because once I do that it could start to fail master branch CI build. |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
store-dir=~/.pnpm-store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try:
NODE_OPTIONS=--max_old_space_size=5120
Closing PR Having Some Issues in CI Build for Heap out of Memory so will raise new PR for pnpm new version update. |
What changes were proposed in this pull request?
Currently Recon is still using v16.14.2 upgrade to New node version and update package.json with new updated versions.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7569
How was this patch tested?
Manually Please check at your end also some times having build issue to create lib in taget folder.