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

neuvector-manager/5.4.1 package update #34379

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Nov 16, 2024

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Nov 16, 2024
Copy link
Contributor Author

octo-sts bot commented Nov 16, 2024

Gen AI suggestions to solve the build error:

Based on the build error, there seems to be an issue with the Scala compilation and assembly jar creation. Here are the key issues and suggested fixes:

  1. Scala Version Mismatch:
    The error shows it's trying to find admin/target/scala-2.11/admin-assembly-1.0.jar but the compilation is happening with Scala 3.3.4. The build paths are mismatched.

Fix: Update the build.sbt file to use consistent Scala versions. Since it's compiling with Scala 3.x but looking for 2.11, you need to either:

  • Update the jar path in the pipeline to match Scala 3.3.4
  • Or downgrade the Scala version in build.sbt to 2.11
  1. Assembly JAR Location:
    The zip command can't find the assembly jar, suggesting it's either not being created or being created in a different location.

Fix: Update the pipeline section to use the correct path:

- runs: |
      # Build UI
      npm install --legacy-peer-deps --prefix admin/webapp
      npm run build --prefix admin/webapp

      # Build and compress JAR
      sbt admin/assembly
      # Update path to match Scala 3.x
      zip -d admin/target/scala-3.3.4/admin-assembly-1.0.jar rest-management-private-classpath\*

      mkdir -p ${{targets.contextdir}}/usr/local/bin
      # Update jar path here too
      install -Dm755 admin/target/scala-3.3.4/admin-assembly-1.0.jar ${{targets.contextdir}}/usr/local/bin/
      install -Dm755 scripts/* ${{targets.contextdir}}/usr/local/bin/
  1. Node.js Version:
    The build is using Node.js v23.1.0 which is an odd-numbered version not recommended for production.

Fix: Update the environment section to use a LTS version of Node.js:

environment:
  contents:
    packages:
      - nodejs-lts # Use LTS version instead
  1. Scala Warnings:
    There are some Scala deprecation and type warnings that should be addressed but aren't causing the build failure.

Try these changes and rebuild. The main issue appears to be the Scala version mismatch causing the assembly jar to be created in a different location than where the pipeline is looking for it.

Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
@rawlingsj rawlingsj force-pushed the wolfictl-c60725b0-1ec8-47c8-9d97-592a26dd5efb branch from 33db34a to 0956235 Compare November 18, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated pr request-version-update request for a newer version of a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant