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

Port notification publisher fixes and tests #1073

Merged
merged 4 commits into from
Feb 21, 2024
Merged

Port notification publisher fixes and tests #1073

merged 4 commits into from
Feb 21, 2024

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Feb 12, 2024

Ports the following PRs:

Closes #1071

Further fixes:

Corresponding template fixes in API server: DependencyTrack/hyades-apiserver#571

Ports the following PRs:

* DependencyTrack/dependency-track#3198

Closes #1071

Further fixes:

* Wrong base URL being set for `JiraPublisher`
* Bearer token authentication with Jira not working (DependencyTrack/dependency-track#2642 was not ported for some reason)
* Notification template using values that no longer exist
  * Observed differences between Hyades and DT v4.x have been documented here: #927 (comment)

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added defect Something isn't working domain/notifications qa labels Feb 12, 2024
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this pull request Feb 12, 2024
Resolves issues identified while working on DependencyTrack/hyades#1073

Signed-off-by: nscuro <[email protected]>
Snappy doesn't play well with multiple `TestProfile`s being used in a single test suite execution. Disabling for the test profile. This is already done in `mirror-service`.

For future reference, this is the error caused by Snappy:

```
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:638)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:722)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:101)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.runner.bootstrap.StartupActionImpl.run(StartupActionImpl.java:285)
	at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:252)
	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:605)
	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:655)
	... 1 more
Caused by: java.lang.UnsatisfiedLinkError: Native Library /tmp/libsnappyjava.so already loaded in another classloader
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:201)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1957)
	at io.quarkus.kafka.client.runtime.SnappyRecorder.loadSnappy(SnappyRecorder.java:34)
	at io.quarkus.deployment.steps.KafkaProcessor$loadSnappyIfEnabled852439731.deploy_0(Unknown Source)
	at io.quarkus.deployment.steps.KafkaProcessor$loadSnappyIfEnabled852439731.deploy(Unknown Source)
```

Note that this does not affect integration tests, so we will still have basic coverage of things working *with* compression.

Signed-off-by: nscuro <[email protected]>
Copy link

sonarcloud bot commented Feb 13, 2024

nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this pull request Feb 13, 2024
Resolves issues identified while working on DependencyTrack/hyades#1073

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added this to the 0.4.0 milestone Feb 19, 2024
@VithikaS VithikaS merged commit 8fae84e into main Feb 21, 2024
11 checks passed
@VithikaS VithikaS deleted the port-pr-3198 branch February 21, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port notification publisher tests from DT v4.x
2 participants