Skip to content
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

Test cases are failing while the dependency of gulp library is upgraded from 4.0.2 to 5.0.0. #418

Open
gilbysunil14 opened this issue Dec 4, 2024 · 2 comments · May be fixed by #333 or #429
Open
Assignees
Labels
automated tests dependencies Pull requests that update a dependency file

Comments

@gilbysunil14
Copy link

Test cases are failing while the dependency of gulp library is upgraded from 4.0.2 to 5.0.0. Primary analysis shown that the project is not detected by the liberty dashboard.

@gilbysunil14 gilbysunil14 added dependencies Pull requests that update a dependency file automated tests labels Dec 4, 2024
@gilbysunil14 gilbysunil14 self-assigned this Dec 4, 2024
@gilbysunil14 gilbysunil14 moved this from New Issues to In Progress in Open Liberty Developer Experience Dec 4, 2024
@gilbysunil14 gilbysunil14 linked a pull request Dec 4, 2024 that will close this issue
@gilbysunil14 gilbysunil14 linked a pull request Dec 4, 2024 that will close this issue
@gilbysunil14
Copy link
Author

Findings are noted here in this comment: #333 (comment)

@gilbysunil14
Copy link
Author

Checked the encoding of the file that is being downloaded. As per the gulp 5.0.0 documentation, by default the file encodings are treated as utf8. Since the jar is a binary file, this utf8 encoding causes the file to be corrupted. As a solution, tried giving the following option when the file is downloaded using gulp-download2 library {encoding: false}. This solution is not working.

Tried with an alternative library “got” which is used to download files. This solution is working.

gulp.task("downloadLibertyLSJars", async () => {
  try{
    const libertyLemminxFileStream = fs.createWriteStream('jars/' + libertyLemminxName);
    // Use got to download the file as a buffer
    const libertyLemminx = await got(libertyLemminxURL, { responseType: 'buffer' });
    // Write the binary data to a file
    libertyLemminxFileStream.write(libertyLemminx.body);
    libertyLemminxFileStream.end();

    const libertyLSFileStream = fs.createWriteStream('jars/' + libertyLSName);
    // Use got to download the file as a buffer
    const libertyLS = await got(libertyLSURL, { responseType: 'buffer' });
    // Write the binary data to a file
    libertyLSFileStream.write(libertyLS.body);
    libertyLSFileStream.end();
  } catch (error) {
    console.error('Error downloading the file:', error);
  }
});

@gilbysunil14 gilbysunil14 linked a pull request Dec 6, 2024 that will close this issue
@aparnamichael aparnamichael modified the milestones: CI/CD 24.0.11, Next Dec 12, 2024
@gilbysunil14 gilbysunil14 moved this from In Progress to In Review in Open Liberty Developer Experience Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated tests dependencies Pull requests that update a dependency file
Projects
2 participants