Skip to content

Conversation

@diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented May 5, 2025

This fixes the ongoing nightly failures.

gax-java contains native-image configurations that are common to all libraries. In this PR, we add this testlib jar to the libraries that fail during our nightly GraalVM tests.

The affected libraries were inferred from the list of failures in this nightly job. This job uses --fail-at-end (.kokoro/common.sh), so the list is complete (i.e. the failures don't prevent us from finding other failures).

The affected libraries fail with messages that are caught by this gax testlib. For example:

1) If it is intended that objects of type 'jdk.proxy4.$Proxy68' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.Ignore,java.lang.annotation.Annotation'

and

1) If it is intended that objects of type 'org.junit.runners.model.FrameworkField' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.runners.model.FrameworkField'

The gax testlib includes these classes:

Args=--initialize-at-build-time=java.lang.annotation.Annotation,\
  org.junit.experimental.categories.Category,\
  org.junit.experimental.categories.CategoryValidator,\
  org.junit.Ignore,\
  org.junit.runner.RunWith,\
  org.junit.runners.model.FrameworkField,\
  org.junit.validator.AnnotationValidator,\
  org.junit.vintage.engine.discovery.FilterableIgnoringRunnerDecorator,\
  org.junit.vintage.engine.discovery.IgnoringRunnerDecorator

gax-java [contains native-image configurations](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties) that are common to all libraries.

This fixes the ongoing nightly failures with messages such as:
```
1) If it is intended that objects of type 'jdk.proxy4.$Proxy68' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.Ignore,java.lang.annotation.Annotation'
```

and

```
1) If it is intended that objects of type 'org.junit.runners.model.FrameworkField' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.runners.model.FrameworkField'
```

The gax testlib [includes these classes](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties):
```
Args=--initialize-at-build-time=java.lang.annotation.Annotation,\
  org.junit.experimental.categories.Category,\
  org.junit.experimental.categories.CategoryValidator,\
  org.junit.Ignore,\
  org.junit.runner.RunWith,\
  org.junit.runners.model.FrameworkField,\
  org.junit.validator.AnnotationValidator,\
  org.junit.vintage.engine.discovery.FilterableIgnoringRunnerDecorator,\
  org.junit.vintage.engine.discovery.IgnoringRunnerDecorator
```
This matches the minimum supported java version by the spotify fmt plugin
@diegomarquezp diegomarquezp marked this pull request as ready for review May 5, 2025 16:23
@diegomarquezp diegomarquezp requested a review from a team as a code owner May 5, 2025 16:23
@diegomarquezp diegomarquezp merged commit 3d398b7 into main May 5, 2025
32 checks passed
@diegomarquezp diegomarquezp deleted the fix-nightly-graalmv-jobs branch May 5, 2025 18:52
lqiu96 pushed a commit that referenced this pull request Jun 10, 2025
* fix: include gax testlib for native image testing

gax-java [contains native-image configurations](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties) that are common to all libraries.

This fixes the ongoing nightly failures with messages such as:
```
1) If it is intended that objects of type 'jdk.proxy4.$Proxy68' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.Ignore,java.lang.annotation.Annotation'
```

and

```
1) If it is intended that objects of type 'org.junit.runners.model.FrameworkField' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.runners.model.FrameworkField'
```

The gax testlib [includes these classes](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties):
```
Args=--initialize-at-build-time=java.lang.annotation.Annotation,\
  org.junit.experimental.categories.Category,\
  org.junit.experimental.categories.CategoryValidator,\
  org.junit.Ignore,\
  org.junit.runner.RunWith,\
  org.junit.runners.model.FrameworkField,\
  org.junit.validator.AnnotationValidator,\
  org.junit.vintage.engine.discovery.FilterableIgnoringRunnerDecorator,\
  org.junit.vintage.engine.discovery.IgnoringRunnerDecorator
```

* fix: include gax testlib in specific poms

* chore: run lint job on java 17

This matches the minimum supported java version by the spotify fmt plugin
lqiu96 pushed a commit that referenced this pull request Jun 10, 2025
* fix: include gax testlib for native image testing

gax-java [contains native-image configurations](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties) that are common to all libraries.

This fixes the ongoing nightly failures with messages such as:
```
1) If it is intended that objects of type 'jdk.proxy4.$Proxy68' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.Ignore,java.lang.annotation.Annotation'
```

and

```
1) If it is intended that objects of type 'org.junit.runners.model.FrameworkField' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.runners.model.FrameworkField'
```

The gax testlib [includes these classes](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties):
```
Args=--initialize-at-build-time=java.lang.annotation.Annotation,\
  org.junit.experimental.categories.Category,\
  org.junit.experimental.categories.CategoryValidator,\
  org.junit.Ignore,\
  org.junit.runner.RunWith,\
  org.junit.runners.model.FrameworkField,\
  org.junit.validator.AnnotationValidator,\
  org.junit.vintage.engine.discovery.FilterableIgnoringRunnerDecorator,\
  org.junit.vintage.engine.discovery.IgnoringRunnerDecorator
```

* fix: include gax testlib in specific poms

* chore: run lint job on java 17

This matches the minimum supported java version by the spotify fmt plugin
lqiu96 pushed a commit that referenced this pull request Jul 7, 2025
* fix: include gax testlib for native image testing

gax-java [contains native-image configurations](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties) that are common to all libraries.

This fixes the ongoing nightly failures with messages such as:
```
1) If it is intended that objects of type 'jdk.proxy4.$Proxy68' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.Ignore,java.lang.annotation.Annotation'
```

and

```
1) If it is intended that objects of type 'org.junit.runners.model.FrameworkField' are persisted in the image heap, add 

    '--initialize-at-build-time=org.junit.runners.model.FrameworkField'
```

The gax testlib [includes these classes](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties):
```
Args=--initialize-at-build-time=java.lang.annotation.Annotation,\
  org.junit.experimental.categories.Category,\
  org.junit.experimental.categories.CategoryValidator,\
  org.junit.Ignore,\
  org.junit.runner.RunWith,\
  org.junit.runners.model.FrameworkField,\
  org.junit.validator.AnnotationValidator,\
  org.junit.vintage.engine.discovery.FilterableIgnoringRunnerDecorator,\
  org.junit.vintage.engine.discovery.IgnoringRunnerDecorator
```

* fix: include gax testlib in specific poms

* chore: run lint job on java 17

This matches the minimum supported java version by the spotify fmt plugin
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.

2 participants