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

jaeger/1.63.0-r0: cve remediation #36694

Closed
wants to merge 3 commits into from

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Dec 12, 2024

Copy link
Contributor Author

octo-sts bot commented Dec 12, 2024

Gen AI suggestions to solve the build error:

• Detected Error: error RangeError: Internal error. Icu error. during yarn install
• Error Category: Build/Configuration
• Failure Point: yarn install step in jaeger-all-in-one subpackage pipeline
• Root Cause Analysis: The error occurs due to an ICU (International Components for Unicode) compatibility issue between Node.js and the system's ICU libraries

• Suggested Fix:

  1. Add icu and icu-full to the environment packages:
environment:
  contents:
    packages:
      - busybox
      - ca-certificates-bundle
      - nodejs-20
      - npm
      - yarn
      - icu
      - icu-full
  1. Set the ICU environment variable before yarn install:
subpackages:
  - range: jaeger-components
    name: "${{package.name}}-${{range.key}}"
    pipeline:
      - runs: |
          if [[ "${{range.key}}" = "all-in-one" ]]; then
            export NODE_ICU_DATA=/usr/share/icu
            mkdir -p jaeger-ui/packages/jaeger-ui/build
            rm -rf cmd/query/app/ui/actual/*
            yarn install --frozen-lockfile --cwd jaeger-ui
            cd jaeger-ui/packages/jaeger-ui/build
            yarn build
          fi

• Explanation: The error occurs because Node.js requires proper ICU support for internationalization features, including string sorting used by yarn. Adding the ICU packages and setting NODE_ICU_DATA ensures proper locale handling.

• Additional Notes:

  • This is a known issue when building Node.js applications in containers without proper ICU support
  • The fix ensures proper internationalization support needed by yarn's dependency resolution
  • Consider using --ignore-scripts with yarn install if security is a concern

• References:

@mamccorm mamccorm force-pushed the cve-jaeger-24822774d1fcbfd4fb349645af912758 branch from 52d6652 to b2b1ec1 Compare December 12, 2024 23:45
Copy link
Contributor Author

octo-sts bot commented Dec 12, 2024

Gen AI suggestions to solve the build error:

• Detected Error: error RangeError: Internal error. Icu error. at String.localeCompare

• Error Category: Build/Configuration

• Failure Point: Yarn package installation during the jaeger-all-in-one subpackage build

• Root Cause Analysis: The error occurs due to an ICU (International Components for Unicode) localization issue when Yarn tries to sort packages. This is typically caused by missing or incompatible ICU data libraries.

• Suggested Fix:

  1. Add icu-libs and icu-data-full to the environment contents section:
environment:
  contents:
    packages:
      - busybox
      - ca-certificates-bundle
      - nodejs-20
      - npm
      - yarn
      - icu-libs
      - icu-data-full
  1. Set the LANG environment variable:
environment:
  contents:
    packages:
      # ... existing packages ...
  environment:
    LANG: "en_US.UTF-8"

• Explanation: The error occurs because Yarn's string sorting operations require proper ICU support. Adding the ICU libraries and setting the locale ensures proper internationalization support during the build process.

• Additional Notes:

  • This is a known issue with Yarn when running in environments with incomplete locale/ICU support
  • The fix ensures proper internationalization support for Node.js/Yarn operations
  • The error specifically appears during package dependency resolution and linking
  • Setting LANG ensures consistent locale behavior

• References:

@hbh7
Copy link
Member

hbh7 commented Dec 16, 2024

Looks to be suffering from https://chainguard-dev.slack.com/archives/C05CM0DM7RV/p1734381916719169, can't proceed until we have a fix.

@hbh7 hbh7 self-assigned this Dec 16, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 16, 2024

Gen AI suggestions to solve the build error:

Based on the build error, here's my analysis and solution:

• Detected Error:

error during build:
src/components/common/LoadingIndicator.tsx (16:9): "LuLoader2" is not exported by "../../node_modules/react-icons/lu/index.mjs"

• Error Category: Dependency/Build

• Failure Point: React component build step in jaeger-ui frontend compilation

• Root Cause Analysis: The LoadingIndicator component is trying to import a non-existent icon (LuLoader2) from react-icons/lu package, likely due to a version mismatch or incorrect import path

• Suggested Fix:

  1. Add missing react-icons dependency first:
environment:
  contents:
    packages:
      - busybox
      - ca-certificates-bundle
      - nodejs-20
      - npm
      - yarn
      # Add react-icons
      - react-icons
  1. Update the LoadingIndicator.tsx import to use a different loader icon that exists in react-icons:
// Change from:
import { LuLoader2 } from 'react-icons/lu';
// To:
import { CgSpinner } from 'react-icons/cg';
// or
import { AiOutlineLoading } from 'react-icons/ai';

• Explanation: The build is failing because it cannot find the specified icon in the react-icons package. This is likely because either:

  1. The react-icons version being used doesn't contain this specific icon
  2. The import path is incorrect
  3. The package is not properly installed

• Additional Notes:

  • The build system is using Node.js 20.x
  • This is a UI component build failure, not a backend service issue
  • The error is happening during the Vite build process
  • Consider adding a package.json check step to verify dependencies

• References:

@hbh7
Copy link
Member

hbh7 commented Dec 16, 2024

No idea how to fix this issue as it has nothing to do with any changes made here (1.63.0 doesn't build at all anymore) and I can't find any info online. Escalating in the interest of sustaining focusing on CVEs this week.

@hbh7 hbh7 added help wanted Extra attention is needed blocked indicates there are blocking issues that need to be addressed before progress can be made interrupt eng:ecosystems labels Dec 16, 2024
@hbh7
Copy link
Member

hbh7 commented Dec 18, 2024

Reason for Escalation / Level of Urgency

Failing build blocking CVE remediation, somewhat urgent but not immediately critical.

If prospect/customer issue, please provide needed by date

N/A

Short Description (Context / Steps already done) / Error Messages / Logs

There's an error during build:
src/components/common/LoadingIndicator.tsx (16:9): "LuLoader2" is not exported by "../../node_modules/react-icons/lu/index.mjs"

Steps to Reproduce

  1. Run build before or after CVE remediation (doesn't matter)
  2. See error

Customers / Images / SLA affected

Unknown

Possible Solution

Unknown

@mamccorm
Copy link
Member

Out of date PR with conflicts. this has been fixed in v1.65 which is the latest in wolfi. See fixed events:

@mamccorm mamccorm closed this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated pr blocked indicates there are blocking issues that need to be addressed before progress can be made GHSA-v778-237x-gjrc go/bump help wanted Extra attention is needed interrupt jaeger/1.63.0-r0 request-cve-remediation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants