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

3.9.3 backports 1 #39965

Merged
merged 29 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
34b12d9
Add .mvn/.develocity/ to .gitignore
gsmet Apr 9, 2024
c40968f
Bump com.fasterxml.jackson:jackson-bom from 2.16.1 to 2.17.0
dependabot[bot] Mar 14, 2024
257c5a9
Jackson should use HybridJacksonPool
franz1981 Mar 27, 2024
d2673c8
Fix native compilation for Netty and Mutiny
jponge Apr 9, 2024
8cb1a3e
Removing `quarkus-panache-common` annotation processor from docs
edeandrea Apr 2, 2024
1cabffe
Add js-scriptengine and collections as parent first artifacts
gsmet Apr 2, 2024
24a864e
Explain in the docs how to map the X509 CN attribute to roles
sberyozkin Mar 31, 2024
9dd3e2f
Added MP's Input.class to the index (SmallRye GraphQL Client) + test
mskacelik Apr 3, 2024
a64a635
Fix broken GraphQL client tests
jmartisk Apr 3, 2024
1b29539
Warn users when using older GraalVM or Mandrel versions
zakkak Apr 3, 2024
a6574d4
No build time init of classes used in `UnsafeAccessedFieldBuildItem`
zakkak Apr 2, 2024
c15f39c
Fix StorkClientRequestFilter exception handling
damianorenfer Mar 27, 2024
47845ad
Mention ScheduledExecutorService in scheduler reference doc
manovotn Apr 4, 2024
e179cef
Use cache-control header to make sure health checks aren't cached
geoand Apr 4, 2024
1a13f79
Bump MINIMUM working mandrel/graalvm version to 22.3
zakkak Apr 4, 2024
8a44cd2
Bump the `recommended-java-version` to 21
gastaldi Apr 4, 2024
8190695
Fix Servlet/Rest ExceptionMapper
phillip-kruger Apr 5, 2024
f16dd83
Revert removal of redirec in Dev UI Deep links
phillip-kruger Apr 5, 2024
3e645c0
Fix typo in docs
viniciusvasti Apr 7, 2024
8c74cf7
Add more non-platform extensions to dev services guide; make guide mo…
holly-cummins Apr 5, 2024
44418fd
Add Microcks.
holly-cummins Apr 6, 2024
e864cbf
Update - Only consider recipes when generating the list of recipes
gsmet Apr 5, 2024
1b2d338
Fix javadoc in UpdateMojo
gsmet Apr 5, 2024
c1ff69b
Fixed an issue where source field name and field name are equal in th…
mskacelik Mar 18, 2024
6e6fabd
Update of SmallRye-GraphQL 2.8.2
mskacelik Mar 18, 2024
7ffc564
Ensure that index.html works in any directory in native mode
geoand Apr 4, 2024
dd85e93
Adjust some user-visible references to RESTEasy Reactive
holly-cummins Apr 7, 2024
d363d59
Inconsistent variable naming - OIDC Client docs, OidcClientCreator.
ZanHorvat Apr 8, 2024
8be2978
Point to 3.9 branch for quickstarts
gsmet Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,7 @@ jobs:
env:
CAPTURE_BUILD_SCAN: true
run: |
git clone https://github.com/quarkusio/quarkus-quickstarts.git && cd quarkus-quickstarts
git checkout development
git clone -b 3.9 https://github.com/quarkusio/quarkus-quickstarts.git && cd quarkus-quickstarts
export LANG=en_US && ./mvnw -e -B -fae --settings .github/mvn-settings.xml clean verify -DskipTests
- name: Prepare build reports archive
if: always()
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ nb-configuration.xml
.envrc
.jekyll-cache
.mvn/.gradle-enterprise
.mvn/.develocity
.quarkus
4 changes: 2 additions & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<smallrye-health.version>4.1.0</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>3.10.0</smallrye-open-api.version>
<smallrye-graphql.version>2.8.1</smallrye-graphql.version>
<smallrye-graphql.version>2.8.2</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.2.6</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.5.0</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.0</smallrye-context-propagation.version>
Expand Down Expand Up @@ -92,7 +92,7 @@
<!-- GraalVM sdk 23.1.2 has a minimum JDK requirement of 17+ at runtime -->
<graal-sdk.version>23.1.2</graal-sdk.version>
<gizmo.version>1.8.0</gizmo.version>
<jackson-bom.version>2.16.1</jackson-bom.version>
<jackson-bom.version>2.17.0</jackson-bom.version>
<commons-logging-jboss-logging.version>1.0.0.Final</commons-logging-jboss-logging.version>
<commons-lang3.version>3.14.0</commons-lang3.version>
<commons-codec.version>1.16.1</commons-codec.version>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<!-- These 2 properties are used in catalog-overrides.json -->
<minimum-java-version>${maven.compiler.release}</minimum-java-version>
<recommended-java-version>17</recommended-java-version>
<recommended-java-version>21</recommended-java-version>

<!--
Supported Maven versions, interpreted as a version range (Also defined in quarkus-enforcer-rules)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,25 @@ public static final class Version implements Comparable<Version> {
static final Version VERSION_21_3 = new Version("GraalVM 21.3", "21.3", Distribution.GRAALVM);
static final Version VERSION_21_3_0 = new Version("GraalVM 21.3.0", "21.3.0", Distribution.GRAALVM);
public static final Version VERSION_22_3_0 = new Version("GraalVM 22.3.0", "22.3.0", "17", Distribution.GRAALVM);
public static final Version VERSION_22_2_0 = new Version("GraalVM 22.2.0", "22.2.0", "17", Distribution.GRAALVM);
public static final Version VERSION_23_0_0 = new Version("GraalVM 23.0.0", "23.0.0", "17", Distribution.GRAALVM);
public static final Version VERSION_23_1_0 = new Version("GraalVM 23.1.0", "23.1.0", "21", Distribution.GRAALVM);
public static final Version VERSION_24_0_0 = new Version("GraalVM 24.0.0", "24.0.0", "22", Distribution.GRAALVM);

public static final Version MINIMUM = VERSION_22_2_0;
/**
* The minimum version of GraalVM supported by Quarkus.
* Versions prior to this are expected to cause major issues.
*/
public static final Version MINIMUM = VERSION_22_3_0;
/**
* The current version of GraalVM supported by Quarkus.
* This version is the one actively being tested and is expected to give the best experience.
*/
public static final Version CURRENT = VERSION_23_1_0;
/**
* The minimum version of GraalVM officially supported by Quarkus.
* Versions prior to this are expected to work but are not given the same level of testing or priority.
*/
public static final Version MINIMUM_SUPPORTED = CURRENT;

final String fullVersion;
public final Runtime.Version javaVersion;
Expand Down Expand Up @@ -227,6 +239,10 @@ boolean isObsolete() {
return this.compareTo(MINIMUM) < 0;
}

boolean isSupported() {
return this.compareTo(MINIMUM_SUPPORTED) >= 0;
}

boolean isMandrel() {
return distribution == Distribution.MANDREL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,15 @@ private void checkGraalVMVersion(GraalVM.Version version) {
log.info("Running Quarkus native-image plugin on " + version.distribution.name() + " " + version.getVersionAsString()
+ " JDK " + version.javaVersion);
if (version.isObsolete()) {
throw new IllegalStateException("Out of date version of GraalVM detected: " + version.getVersionAsString() + "."
throw new IllegalStateException(
"Out of date version of GraalVM or Mandrel detected: " + version.getVersionAsString() + "."
+ " Quarkus currently supports " + GraalVM.Version.CURRENT.getVersionAsString()
+ ". Please upgrade to this version.");
}
if (!version.isSupported()) {
log.warn("You are using an older version of GraalVM or Mandrel : " + version.getVersionAsString() + "."
+ " Quarkus currently supports " + GraalVM.Version.CURRENT.getVersionAsString()
+ ". Please upgrade GraalVM to this version.");
+ ". Please upgrade to this version.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,6 @@ public void write(String s, byte[] bytes) {
MethodCreator beforeAn = file.getMethodCreator("beforeAnalysis", "V", BEFORE_ANALYSIS_ACCESS);
TryBlock overallCatch = beforeAn.tryBlock();

ResultHandle beforeAnalysisParam = beforeAn.getMethodParam(0);

MethodCreator registerAsUnsafeAccessed = file
.getMethodCreator("registerAsUnsafeAccessed", void.class, Feature.BeforeAnalysisAccess.class)
.setModifiers(Modifier.PRIVATE | Modifier.STATIC);
for (UnsafeAccessedFieldBuildItem unsafeAccessedField : unsafeAccessedFields) {
TryBlock tc = registerAsUnsafeAccessed.tryBlock();
ResultHandle declaringClassHandle = tc.invokeStaticMethod(
ofMethod(Class.class, "forName", Class.class, String.class),
tc.load(unsafeAccessedField.getDeclaringClass()));
ResultHandle fieldHandle = tc.invokeVirtualMethod(
ofMethod(Class.class, "getDeclaredField", Field.class, String.class), declaringClassHandle,
tc.load(unsafeAccessedField.getFieldName()));
tc.invokeInterfaceMethod(
ofMethod(Feature.BeforeAnalysisAccess.class, "registerAsUnsafeAccessed", void.class, Field.class),
registerAsUnsafeAccessed.getMethodParam(0), fieldHandle);
CatchBlockCreator cc = tc.addCatch(Throwable.class);
cc.invokeVirtualMethod(ofMethod(Throwable.class, "printStackTrace", void.class), cc.getCaughtException());
}
registerAsUnsafeAccessed.returnVoid();
overallCatch.invokeStaticMethod(registerAsUnsafeAccessed.getMethodDescriptor(), beforeAnalysisParam);

overallCatch.invokeStaticMethod(BUILD_TIME_INITIALIZATION,
overallCatch.marshalAsArray(String.class, overallCatch.load(""))); // empty string means initialize everything

Expand Down Expand Up @@ -179,6 +157,35 @@ public void write(String s, byte[] bytes) {
overallCatch.invokeStaticMethod(runtimeReinitializedClasses.getMethodDescriptor());
}

// Ensure registration of fields being accessed through unsafe is done last to ensure that the class
// initialization configuration is done first. Registering the fields before configuring class initialization
// may results in classes being marked for runtime initialization even if not explicitly requested.
if (!unsafeAccessedFields.isEmpty()) {
ResultHandle beforeAnalysisParam = beforeAn.getMethodParam(0);
MethodCreator registerAsUnsafeAccessed = file
.getMethodCreator("registerAsUnsafeAccessed", void.class, Feature.BeforeAnalysisAccess.class)
.setModifiers(Modifier.PRIVATE | Modifier.STATIC);
ResultHandle thisClass = registerAsUnsafeAccessed.loadClassFromTCCL(GRAAL_FEATURE);
ResultHandle cl = registerAsUnsafeAccessed
.invokeVirtualMethod(ofMethod(Class.class, "getClassLoader", ClassLoader.class), thisClass);
for (UnsafeAccessedFieldBuildItem unsafeAccessedField : unsafeAccessedFields) {
TryBlock tc = registerAsUnsafeAccessed.tryBlock();
ResultHandle declaringClassHandle = tc.invokeStaticMethod(
ofMethod(Class.class, "forName", Class.class, String.class, boolean.class, ClassLoader.class),
tc.load(unsafeAccessedField.getDeclaringClass()), tc.load(false), cl);
ResultHandle fieldHandle = tc.invokeVirtualMethod(
ofMethod(Class.class, "getDeclaredField", Field.class, String.class), declaringClassHandle,
tc.load(unsafeAccessedField.getFieldName()));
tc.invokeInterfaceMethod(
ofMethod(Feature.BeforeAnalysisAccess.class, "registerAsUnsafeAccessed", void.class, Field.class),
registerAsUnsafeAccessed.getMethodParam(0), fieldHandle);
CatchBlockCreator cc = tc.addCatch(Throwable.class);
cc.invokeVirtualMethod(ofMethod(Throwable.class, "printStackTrace", void.class), cc.getCaughtException());
}
registerAsUnsafeAccessed.returnVoid();
overallCatch.invokeStaticMethod(registerAsUnsafeAccessed.getMethodDescriptor(), beforeAnalysisParam);
}

CatchBlockCreator print = overallCatch.addCatch(Throwable.class);
print.invokeVirtualMethod(ofMethod(Throwable.class, "printStackTrace", void.class), print.getCaughtException());

Expand Down
4 changes: 4 additions & 0 deletions core/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
<!-- support for GraalVM js -->
<parentFirstArtifact>org.graalvm.polyglot:js-community</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.js:js-language</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.js:js-scriptengine</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.polyglot:js</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.polyglot:polyglot</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.regex:regex</parentFirstArtifact>
Expand All @@ -170,6 +171,7 @@
<parentFirstArtifact>org.graalvm.shadowed:icu4j</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:jniutils</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:word</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:collections</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:native-bridge</parentFirstArtifact>
<!-- /support for GraalVM js -->
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-core</parentFirstArtifact>
Expand Down Expand Up @@ -220,6 +222,7 @@
<!-- support for GraalVM js -->
<runnerParentFirstArtifact>org.graalvm.polyglot:js-community</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.js:js-language</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.js:js-scriptengine</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.polyglot:js</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.polyglot:polyglot</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.regex:regex</runnerParentFirstArtifact>
Expand All @@ -230,6 +233,7 @@
<runnerParentFirstArtifact>org.graalvm.shadowed:icu4j</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:jniutils</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:word</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:collections</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:native-bridge</runnerParentFirstArtifact>
<!-- /support for GraalVM js -->
<runnerParentFirstArtifact>io.quarkus:quarkus-bootstrap-runner</runnerParentFirstArtifact>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class UpdateMojo extends QuarkusProjectStateMojoBase {

/**
* Version of the target platform (e.g: 2.0.0.Final)
* You may instead use streamId to target the latest version of a specific platform stream.
* You may instead use stream to target the latest version of a specific platform stream.
*/
@Parameter(property = "platformVersion", required = false)
private String platformVersion;
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/config-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ With the `dev` profile enabled, the property `bar` has the value `hallo`, but th
`bonjour`. If the `prod` profile is enabled, `bar` has the value `hello` (as there is no specific value for the `prod`
profile), and `baz` the value `bonjour`.

[[default-profiles]]
=== Default Profiles

By default, Quarkus provides three profiles, that activate automatically in certain conditions:
Expand Down
Loading
Loading