Skip to content

Commit

Permalink
Merge pull request #38199 from gsmet/3.6.6-backports-1
Browse files Browse the repository at this point in the history
3.6.6 backports 1
  • Loading branch information
gsmet authored Jan 16, 2024
2 parents e456a38 + 518d71f commit 1647866
Show file tree
Hide file tree
Showing 17 changed files with 414 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .mvn/gradle-enterprise-custom-user-data.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ if(session?.getRequest()?.getBaseDirectory() != null) {
if(!publish) {
// do not publish a build scan for test builds
log.debug("Disabling build scan publication for " + session.getRequest().getBaseDirectory())

// change storage location on CI to avoid Develocity scan dumps with disabled publication to be captured for republication
if (System.env.GITHUB_ACTIONS) {
try {
def storageLocationTmpDir = java.nio.file.Files.createTempDirectory(java.nio.file.Paths.get(System.env.RUNNER_TEMP), "buildScanTmp").toAbsolutePath()
log.debug('Update storage location to ' + storageLocationTmpDir)
gradleEnterprise.setStorageDirectory(storageLocationTmpDir)
} catch (IOException e) {
log.error('Temporary storage location directory cannot be created, the Build Scan will be published', e)
}
}
}
}
buildScan.publishAlwaysIf(publish)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import org.eclipse.microprofile.config.ConfigProvider;
Expand Down Expand Up @@ -42,7 +43,8 @@ public void handleConfigChange(Map<String, ConfigValue> buildTimeRuntimeValues)
for (Map.Entry<String, ConfigValue> entry : buildTimeRuntimeValues.entrySet()) {
ConfigValue currentValue = config.getConfigValue(entry.getKey());
// Check for changes. Also, we only have a change if the source ordinal is higher
if (currentValue.getValue() != null && !entry.getValue().getValue().equals(currentValue.getValue())
// The config value can be null (for ex. if the property uses environment variables not available at build time)
if (currentValue.getValue() != null && !Objects.equals(entry.getValue().getValue(), currentValue.getValue())
&& entry.getValue().getSourceOrdinal() < currentValue.getSourceOrdinal()) {
mismatches.add(
" - " + entry.getKey() + " is set to '" + currentValue.getValue()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ public boolean isSatisfiedBy(Task t) {

TaskProvider<QuarkusDev> quarkusDev = tasks.register(QUARKUS_DEV_TASK_NAME, QuarkusDev.class, devRuntimeDependencies,
quarkusExt);
TaskProvider<QuarkusRun> quarkusRun = tasks.register(QUARKUS_RUN_TASK_NAME, QuarkusRun.class);
TaskProvider<QuarkusRun> quarkusRun = tasks.register(QUARKUS_RUN_TASK_NAME, QuarkusRun.class,
build -> build.dependsOn(quarkusBuild));
TaskProvider<QuarkusRemoteDev> quarkusRemoteDev = tasks.register(QUARKUS_REMOTE_DEV_TASK_NAME, QuarkusRemoteDev.class,
devRuntimeDependencies, quarkusExt);
TaskProvider<QuarkusTest> quarkusTest = tasks.register(QUARKUS_TEST_TASK_NAME, QuarkusTest.class,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/resteasy-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ public class Person {
private final Long id;
private final String first;
private final String last;
@SecureField(rolesAllowed = ${role:admin}") <1>
@SecureField(rolesAllowed = "${role:admin}") <1>
private String address;
public Person(Long id, String first, String last) {
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/writing-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3051,5 +3051,7 @@ group-id: <YOUR_EXTENSION_RUNTIME_GROUP_ID>
artifact-id: <YOUR_EXTENSION_RUNTIME_ARTIFACT_ID>
----

NOTE: When your repository contains multiple extensions, you need to create a separate file for each individual extension, not just one file for the entire repository.

That's all. Once the pull request is merged, a scheduled job will check Maven Central for new versions and update the xref:extension-registry-user.adoc[Quarkus Extension Registry].

Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package io.quarkus.docs.generation;

//These are here to allow running the script directly from command line/IDE
//The real deps and call are in the pom.xml
//DEPS org.jboss.logging:jboss-logging:3.4.1.Final
//DEPS com.fasterxml.jackson.core:jackson-databind:2.12.3
//DEPS com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.0.rc1
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -88,7 +94,30 @@ public static void main(String[] args) throws Exception {
ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory());
yamlObjectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

ConfigFile configFile = yamlObjectMapper.readValue(new File("downstreamdoc.yaml"), ConfigFile.class);
String configFilePath = System.getenv("DOWNSTREAM_CONFIG_FILE");
if (configFilePath == null) {
configFilePath = "downstreamdoc.yaml";
}
ConfigFile configFile = yamlObjectMapper.readValue(new File(configFilePath), ConfigFile.class);

String additionals = System.getenv("DOWNSTREAM_ADDITIONALS");
if (additionals != null) {
String[] additional_files = additionals.split(",");
LOG.info("Additional files: " + Arrays.toString(additional_files));
for (String file : additional_files) {
configFile.guides.add(file);
}
}

String excludes = System.getenv("DOWNSTREAM_EXCLUDES");
if (excludes != null) {
String[] excludePatterns = excludes.split(",");
LOG.info("Excluding patterns: " + Arrays.toString(excludePatterns));
for (String pattern : excludePatterns) {
Pattern regexPattern = Pattern.compile(pattern);
configFile.guides.removeIf(guide -> regexPattern.matcher(guide).find());
}
}

Set<Path> guides = new TreeSet<>();
Set<Path> simpleIncludes = new TreeSet<>();
Expand Down
4 changes: 4 additions & 0 deletions extensions/cache/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-mutiny-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-http-dev-ui-spi</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions extensions/cache/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-mutiny</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-cache-runtime-spi</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
Expand Down Expand Up @@ -186,6 +187,7 @@ void processAnnotationsAndIndexFiles(
BuildProducer<NativeImageProxyDefinitionBuildItem> proxyDefinitions,
CombinedIndexBuildItem combinedIndexBuildItem,
List<JaxbFileRootBuildItem> fileRoots,
BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchies,
BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
BuildProducer<NativeImageResourceBuildItem> resource,
BuildProducer<NativeImageResourceBundleBuildItem> resourceBundle,
Expand All @@ -202,10 +204,11 @@ void processAnnotationsAndIndexFiles(
for (DotName jaxbRootAnnotation : JAXB_ROOT_ANNOTATIONS) {
for (AnnotationInstance jaxbRootAnnotationInstance : index
.getAnnotations(jaxbRootAnnotation)) {
if (jaxbRootAnnotationInstance.target().kind() == Kind.CLASS) {
String className = jaxbRootAnnotationInstance.target().asClass().name().toString();
reflectiveClass.produce(ReflectiveClassBuildItem.builder(className).methods().fields().build());
classesToBeBound.add(className);
if (jaxbRootAnnotationInstance.target().kind() == Kind.CLASS
&& !JAXB_ANNOTATIONS.contains(jaxbRootAnnotationInstance.target().asClass().getClass())) {
DotName targetClass = jaxbRootAnnotationInstance.target().asClass().name();
addReflectiveHierarchyClass(targetClass, reflectiveHierarchies, index);
classesToBeBound.add(targetClass.toString());
jaxbRootAnnotationsDetected = true;
}
}
Expand Down Expand Up @@ -412,6 +415,17 @@ public static Stream<Path> safeWalk(Path p) {
}
}

private void addReflectiveHierarchyClass(DotName className,
BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchy,
IndexView index) {
Type jandexType = Type.create(className, Type.Kind.CLASS);
reflectiveHierarchy.produce(new ReflectiveHierarchyBuildItem.Builder()
.type(jandexType)
.index(index)
.source(getClass().getSimpleName() + " > " + jandexType.name().toString())
.build());
}

private void addReflectiveClass(BuildProducer<ReflectiveClassBuildItem> reflectiveClass, boolean methods, boolean fields,
String... className) {
reflectiveClass.produce(new ReflectiveClassBuildItem(methods, fields, className));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,27 @@ public Uni<UpdateResult> updateOne(ClientSession clientSession, Bson filter, Bso
return Wrappers.toUni(collection.updateOne(clientSession, filter, update, options));
}

@Override
public Uni<UpdateResult> updateOne(Bson filter, List<? extends Bson> update) {
return Wrappers.toUni(collection.updateOne(filter, update));
}

@Override
public Uni<UpdateResult> updateOne(Bson filter, List<? extends Bson> update, UpdateOptions options) {
return Wrappers.toUni(collection.updateOne(filter, update, options));
}

@Override
public Uni<UpdateResult> updateOne(ClientSession clientSession, Bson filter, List<? extends Bson> update) {
return Wrappers.toUni(collection.updateOne(clientSession, filter, update));
}

@Override
public Uni<UpdateResult> updateOne(ClientSession clientSession, Bson filter, List<? extends Bson> update,
UpdateOptions options) {
return Wrappers.toUni(collection.updateOne(clientSession, filter, update, options));
}

@Override
public Uni<UpdateResult> updateMany(Bson filter, Bson update) {
return Wrappers.toUni(collection.updateMany(filter, update));
Expand All @@ -605,6 +626,27 @@ public Uni<UpdateResult> updateMany(ClientSession clientSession, Bson filter, Bs
return Wrappers.toUni(collection.updateMany(clientSession, filter, update, options));
}

@Override
public Uni<UpdateResult> updateMany(Bson filter, List<? extends Bson> update) {
return Wrappers.toUni(collection.updateMany(filter, update));
}

@Override
public Uni<UpdateResult> updateMany(Bson filter, List<? extends Bson> update, UpdateOptions options) {
return Wrappers.toUni(collection.updateMany(filter, update, options));
}

@Override
public Uni<UpdateResult> updateMany(ClientSession clientSession, Bson filter, List<? extends Bson> update) {
return Wrappers.toUni(collection.updateMany(clientSession, filter, update));
}

@Override
public Uni<UpdateResult> updateMany(ClientSession clientSession, Bson filter, List<? extends Bson> update,
UpdateOptions options) {
return Wrappers.toUni(collection.updateMany(clientSession, filter, update, options));
}

@Override
public Uni<T> findOneAndDelete(Bson filter) {
return Wrappers.toUni(collection.findOneAndDelete(filter));
Expand Down Expand Up @@ -667,6 +709,27 @@ public Uni<T> findOneAndUpdate(ClientSession clientSession, Bson filter, Bson up
return Wrappers.toUni(collection.findOneAndUpdate(clientSession, filter, update, options));
}

@Override
public Uni<T> findOneAndUpdate(Bson filter, List<? extends Bson> update) {
return Wrappers.toUni(collection.findOneAndUpdate(filter, update));
}

@Override
public Uni<T> findOneAndUpdate(Bson filter, List<? extends Bson> update, FindOneAndUpdateOptions options) {
return Wrappers.toUni(collection.findOneAndUpdate(filter, update, options));
}

@Override
public Uni<T> findOneAndUpdate(ClientSession clientSession, Bson filter, List<? extends Bson> update) {
return Wrappers.toUni(collection.findOneAndUpdate(clientSession, filter, update));
}

@Override
public Uni<T> findOneAndUpdate(ClientSession clientSession, Bson filter, List<? extends Bson> update,
FindOneAndUpdateOptions options) {
return Wrappers.toUni(collection.findOneAndUpdate(clientSession, filter, update, options));
}

@Override
public Uni<Void> drop() {
return Wrappers.toUni(collection.drop());
Expand Down
Loading

0 comments on commit 1647866

Please sign in to comment.