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

Fix/wavefront proxy #17601

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Fix/wavefront proxy #17601

merged 2 commits into from
Apr 24, 2024

Conversation

smoser
Copy link
Contributor

@smoser smoser commented Apr 24, 2024

Fixes:

Related:

Pre-review Checklist

For new package PRs only

  • This PR is marked as fixing a pre-existing package request bug
    • Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
  • REQUIRED - The package is available under an OSI-approved or FSF-approved license
  • REQUIRED - The version of the package is still receiving security updates
  • This PR links to the upstream project's support policy (e.g. endoflife.date)

For new version streams

  • The upstream project actually supports multiple concurrent versions.
  • Any subpackages include the version string in their package name (e.g. name: ${{package.name}}-compat)
  • The package (and subpackages) provides: logical unversioned forms of the package (e.g. nodejs, nodejs-lts)

For security-related PRs

  • The security fix is recorded in the advisories repo

For version bump PRs

  • The epoch field is reset to 0

For PRs that add patches

  • Patch source is documented

@smoser
Copy link
Contributor Author

smoser commented Apr 24, 2024

Well, bummer. Test fails like this:

 2024/04/24 13:39:03 WARN + cat out
2024/04/24 13:39:03 INFO failed [1]: java -jar /usr/share/java/wavefront/wavefront-proxy/wavefront-proxy.jar
2024/04/24 13:39:03 INFO Exception in thread "main" java.lang.NoClassDefFoundError: io/netty/handler/codec/http/cors/CorsConfig
2024/04/24 13:39:03 INFO     at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
2024/04/24 13:39:03 INFO     at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
2024/04/24 13:39:03 INFO     at java.base/java.lang.Class.getDeclaredMethod(Class.java:2473)
2024/04/24 13:39:03 INFO     at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:47)
2024/04/24 13:39:03 INFO     at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
2024/04/24 13:39:03 INFO     at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
2024/04/24 13:39:03 INFO     at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
2024/04/24 13:39:03 INFO Caused by: java.lang.ClassNotFoundException: io.netty.handler.codec.http.cors.CorsConfig
2024/04/24 13:39:03 INFO     at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
2024/04/24 13:39:03 INFO     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
2024/04/24 13:39:03 INFO     at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
2024/04/24 13:39:03 INFO     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
2024/04/24 13:39:03 INFO     ... 7 more
2024/04/24 13:39:03 WARN + exit 1
2024/04/24 13:39:03 INFO pod e02a90f14c3452f5ca879b358265b4e48b836169795298c31e38abfa860c28b9 terminated
2024/04/24 13:39:03 INFO ERROR: failed to test package. the test environment has been preserved:
2024/04/24 13:39:03 INFO   workspace dir: /temp/melange-workspace-706052928

some local user error made the test pass locally. I had removed the bump of netty-codec-http entirely, and then built the package, seen it work and then saw a 4.1.109 available and thought "oh maybe that fixes it". I put in that change, but didn't bump the epoch again.

Anyway, the test is good to have, and you can make the test pass simply with this diff:

diff --git a/wavefront-proxy/proxy/pombump-deps.yaml b/wavefront-proxy/proxy/pombump-deps.yaml
index a3d5de67b..aad2bee73 100644
--- a/wavefront-proxy/proxy/pombump-deps.yaml
+++ b/wavefront-proxy/proxy/pombump-deps.yaml
@@ -17,11 +17,6 @@ patches:
     version: 4.1.109.Final
     scope: import
     type: jar
-  - groupId: io.netty
-    artifactId: netty-codec-http
-    version: 4.1.109.Final
-    scope: import
-    type: jar
   - groupId: com.squareup.okio
     artifactId: okio
     version: 3.4.0

@pdeslaur
Copy link
Contributor

Interesting, thanks for adding the test! Let's drop dependency bumps if they break the package, we can file a CVE advisory!

@smoser
Copy link
Contributor Author

smoser commented Apr 24, 2024

Interesting, thanks for adding the test! Let's drop dependency bumps if they break the package, we can file a CVE advisory!

ack. will do that.

The pombump of netty-codec-http causes stacktrace below, so
remove it.
Since we're here, go ahead and bump netty-bom to current version.

CorsConfig is deprecated in 4.1, but should still be present.
https://netty.io/4.1/api/io/netty/handler/codec/http/cors/CorsConfig.html

Exception in thread "main" java.lang.NoClassDefFoundError: io/netty/handler/codec/http/cors/CorsConfig
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
    at java.base/java.lang.Class.getDeclaredMethod(Class.java:2473)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:47)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Just a simple invocation of 'java -jar' to get help output
is would show the stacktrace fixed by the previous commit.
Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pdeslaur pdeslaur merged commit 08a791d into wolfi-dev:main Apr 24, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants