Skip to content

Commit

Permalink
Merge branch 'main' into undertow-28028
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Oct 16, 2024
2 parents 4156d57 + 13d48dd commit 4312334
Show file tree
Hide file tree
Showing 11,783 changed files with 451,793 additions and 148,994 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .forbiddenapis/banned-signatures-common.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@defaultMessage Never use Type#toString() as it's almost always the wrong thing to do. Usually org.jboss.jandex.DotName#toString() is what is needed
org.jboss.jandex.Type#toString()
@defaultMessage Never use AnnotationValue#toString() as it's almost always the wrong thing to do. Usually AnnotationValueDotName#asString() is what is needed
org.jboss.jandex.AnnotationValue#toString()

@defaultMessage Replace this by using InputStream.transferTo(OutputStream)
org.apache.commons.io.IOUtils#copy(java.io.InputStream,java.io.OutputStream)
Expand Down
19 changes: 13 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ name: Bug Report
description: Report a bug in Quarkus
labels: kind/bug
body:
- type: markdown
attributes:
value: |
**To report a Quarkus security vulnerability, please [send an email to `[email protected]`](mailto:[email protected]) with all the details.**
:warning: Do **NOT** create a public issue on GitHub for security vulnerabilities. See our [security policy](https://github.com/quarkusio/quarkus/security/policy) for more details. :warning:
- type: markdown
attributes:
value: |
To maximize the chance of your issue being handled in a timely manner, please ensure you have tested that the issue occurs on the absolute latest version of Quarkus, or latest LTS version.
Moreover, providing a minimal canonical sample project that makes it easy to reproduce the issue is a huge help to the community when it comes to understanding, debugging, fixing the problem and testing the fix.
- type: textarea
id: description
validations:
Expand Down Expand Up @@ -35,8 +46,8 @@ body:
Reproducer:
Steps to reproduce the behavior:
1.
2.
1.
2.
3.
- type: markdown
id: environment
Expand All @@ -51,10 +62,6 @@ body:
id: java_version
attributes:
label: Output of `java -version`
- type: input
id: graalvm_version
attributes:
label: GraalVM version (if different from Java)
- type: input
id: quarkus_version
attributes:
Expand Down
84 changes: 84 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Bug Report for Quarkus native executables
description: Report a bug in Quarkus that only appears when building a native executable
labels:
- kind/bug
- area/native-image
body:
- type: markdown
attributes:
value: |
**To report a Quarkus security vulnerability, please [send an email to `[email protected]`](mailto:[email protected]) with all the details.**
:warning: Do **NOT** create a public issue on GitHub for security vulnerabilities. See our [security policy](https://github.com/quarkusio/quarkus/security/policy) for more details. :warning:
- type: textarea
id: description
validations:
required: true
attributes:
label: Describe the bug
description: >-
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened.
Make sure the issue is not reproducible in JVM mode. If the
issue is reproducible in JVM mode please open a "Bug Report".
Provide a clear and concise description of what the problem is.
- type: textarea
id: expected_behavior
attributes:
label: Expected behavior
description: >-
Describe the expected behavior clearly and concisely.
- type: textarea
id: actual_behavior
attributes:
label: Actual behavior
description: >-
Describe the actual behavior clearly and concisely.
- type: textarea
id: how_to_reproduce
attributes:
label: How to Reproduce?
description: >-
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific) or attach an archive containing the reproducer to the issue.
placeholder: |
Reproducer:
Steps to reproduce the behavior:
1.
2.
3.
- type: markdown
id: environment
attributes:
value: |
## Environment
- type: input
id: uname
attributes:
label: Output of `uname -a` or `ver`
- type: input
id: java_version
attributes:
label: Output of `java -version`
- type: input
id: graalvm_version
attributes:
label: Mandrel or GraalVM version (if different from Java)
- type: input
id: quarkus_version
attributes:
label: Quarkus version or git rev
- type: input
id: build_tool
attributes:
label: Build tool (ie. output of `mvnw --version` or `gradlew --version`)
- type: textarea
id: additional_info
attributes:
label: Additional information
description: >
If you have any additional information for us, use the field below.
Please note, you can attach screenshots or screen recordings here, by
dragging and dropping files in the field below.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ assignees: ''
---

### Description

(A high level description of the work)

### Analysis

(links to analysis docs containing architecture design work, requirements gathering, etc)

<!-- task list will be automatically generated from below.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/extension_proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ body:
description: >-
A URL with more information about the technology this extension promotes (defaults to the Quarkiverse Docs repository)
value:
https://quarkiverse.github.io/quarkiverse-docs/<REPOSITORY_NAME>/dev/
https://docs.quarkiverse.io/<REPOSITORY_NAME>/dev/

- type: textarea
id: repository_topics
Expand Down
176 changes: 176 additions & 0 deletions .github/ModuleBuildDurationReport.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.quarkus:quarkus-bom:3.4.3@pom
//DEPS io.quarkus:quarkus-picocli

import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@Command(
name = "ModuleBuildDurationReport",
mixinStandardHelpOptions = true,
version = "1.0",
description = "Analyzes JVM build logs and outputs module build times.")
public class ModuleBuildDurationReport implements Runnable {

private static final DateTimeFormatter TIMESTAMP_FORMATTER =
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSSX");

private static final String TIMESTAMP = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+Z";

private static final Pattern TIMESTAMP_PATTERN =
Pattern.compile("^(" + TIMESTAMP + ") \\[INFO\\].*");

// we will assume the previous module ends on this and a new one begins
private static final Pattern BUILD_START_PATTERN =
Pattern.compile("^" + TIMESTAMP + " \\[INFO\\] Building (.+?) (\\S+-SNAPSHOT).* \\[([0-9]+)/[0-9]+\\]");

private static final Pattern BUILD_END_PATTERN = Pattern.compile("^" + TIMESTAMP + " \\[INFO\\] Reactor Summary");

@Option(
names = {"-f", "--file"},
description = "Path to the raw log file",
required = true)
private String logFilePath;

@CommandLine.Option(
names = { "-s", "--sort" },
description = "Sort order"
+ "%nPossible values: ${COMPLETION-CANDIDATES}",
defaultValue = "execution")
private Sort sort;

public static void main(String... args) {
int exitCode = new CommandLine(new ModuleBuildDurationReport()).execute(args);
System.exit(exitCode);
}

@Override
public void run() {
try {
analyzeLogFile(logFilePath);
} catch (IOException e) {
e.printStackTrace();
}
}

private void analyzeLogFile(String logFilePath) throws IOException {
Map<String, Optional<Duration>> moduleDurations = new LinkedHashMap<>();
Optional<LocalDateTime> previousTimestamp = Optional.empty();
LocalDateTime timestamp = null;
Optional<LocalDateTime> startingTimestamp = Optional.empty();
Optional<String> previousModule = Optional.empty();

try (BufferedReader reader = new BufferedReader(new FileReader(logFilePath))) {
String line;
while ((line = reader.readLine()) != null) {
Matcher timestampMatcher = TIMESTAMP_PATTERN.matcher(line);
if (timestampMatcher.matches()) {
timestamp = LocalDateTime.parse(timestampMatcher.group(1), TIMESTAMP_FORMATTER);
Matcher buildStart = BUILD_START_PATTERN.matcher(line);

if (buildStart.matches()) {
String moduleName = "[" + buildStart.group(3) + "] " + buildStart.group(1);

if (startingTimestamp.isPresent() && previousModule.isPresent()) {
moduleDurations.put(previousModule.get(), Optional.of(Duration.between(startingTimestamp.get(), timestamp)));
}
startingTimestamp = Optional.of(timestamp);
previousModule = Optional.of(moduleName);
} else {
if (BUILD_END_PATTERN.matcher(line).matches() && previousModule.isPresent() && previousTimestamp.isPresent()) {
moduleDurations.put(previousModule.get(), Optional.of(Duration.between(startingTimestamp.get(), previousTimestamp.get())));
previousModule = Optional.empty();
break;
}
}
previousTimestamp = Optional.of(timestamp);
}
}
if (previousModule.isPresent() && timestamp != null && startingTimestamp.isPresent()) {
moduleDurations.put(previousModule.get() + " - /!\\ unfinished", Optional.of(Duration.between(startingTimestamp.get(), timestamp)));
}
}

// Print the results
System.out.printf("%-85s | %s\n", "Name of Module", "Time");
System.out.println(separator());

moduleDurations.entrySet().stream()
.sorted(sort == Sort.execution ? ((a1, a2) -> 0) : (sort == Sort.name ? Map.Entry.comparingByKey() : Map.Entry.comparingByValue(OptionalDurationComparator.INSTANCE)))
.forEach(
entry -> {
if (!entry.getValue().isPresent()) {
return;
}

Duration duration = entry.getValue().get();
System.out.printf(
"%-85s | %02d:%02d:%02d:%03d\n",
entry.getKey(),
duration.toHoursPart(),
duration.toMinutesPart(),
duration.toSecondsPart(),
duration.toMillisPart());
});

Duration totalDuration = moduleDurations.values().stream()
.filter(d -> d.isPresent())
.map(d -> d.get())
.reduce(Duration.ZERO, (d1, d2) -> d1.plus(d2));

System.out.println(separator());
System.out.printf("%-85s | %02d:%02d:%02d:%03d\n", "Total duration for " + moduleDurations.size() + " modules",
totalDuration.toHoursPart(),
totalDuration.toMinutesPart(),
totalDuration.toSecondsPart(),
totalDuration.toMillisPart());
System.out.println(separator());
}

private String separator() {
return "----------------------------------------------------------------------------------------------------";
}

public enum Sort {
execution,
name,
duration
}

private static class OptionalDurationComparator implements Comparator<Optional<Duration>> {

private static final OptionalDurationComparator INSTANCE = new OptionalDurationComparator();

public int compare(Optional<Duration> value1, Optional<Duration> value2) {
if (value1.isEmpty() && value2.isEmpty()) {
return 0;
}
if (value1.isEmpty()) {
return 1;
}
if (value2.isEmpty()) {
return -1;
}

return value1.get().compareTo(value2.get());
}
}
}

21 changes: 21 additions & 0 deletions .github/ci-disk-usage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# this script might be useful to get some insights about the disk usage
# obviously, it needs to be tuned adjusted

# if you can actually write something to the disk and execute an action,
# using ncdu to dump an analysis of the disk and upload it as an artifact
# might be a better option that this adhoc script

echo "# df -h"
df -h
echo "# du -sh /"
sudo du -sh /* || true
echo "# du -sh /home/runner/work/quarkus/quarkus/integration-tests/*"
sudo du -sh /home/runner/work/quarkus/quarkus/integration-tests/* || true
echo "# docker images"
docker images || true
echo "# du -sh /var/lib/*"
sudo du -sh /var/lib/* || true
echo "# du -sh /opt/hostedtoolcache/*"
sudo du -sh /opt/hostedtoolcache/* || true
echo "# du -sh /imagegeneration/installers/*"
sudo du -sh /imagegeneration/installers/* || true
29 changes: 23 additions & 6 deletions .github/ci-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,31 @@
# alpine 3.14 dd53f409bf0b 4 months ago 5.6MB
# alpine 3.15 c4fc93816858 4 months ago 5.58MB

time docker rmi node:14 node:16 node:18 node:14-alpine node:16-alpine node:18-alpine buildpack-deps:buster buildpack-deps:bullseye
time sudo docker image prune --all --force || true
# That is 979M
time sudo rm -rf /usr/share/dotnet
time sudo rm -rf /usr/share/dotnet || true
# That is 1.7G
time sudo rm -rf /usr/share/swift
time sudo rm -rf /usr/share/swift || true
# Remove Android
time sudo rm -rf /usr/local/lib/android
time sudo rm -rf /usr/local/lib/android || true
# Remove Haskell
time sudo rm -rf /opt/ghc
time sudo rm -rf /opt/ghc || true
time sudo rm -rf /usr/local/.ghcup || true
# Remove pipx
time sudo rm -rf /opt/pipx
time sudo rm -rf /opt/pipx || true
# Remove Rust
time sudo rm -rf /usr/share/rust || true
# Remove Go
time sudo rm -rf /usr/local/go || true
# Remove miniconda
time sudo rm -rf /usr/share/miniconda || true
# Remove powershell
time sudo rm -rf /usr/local/share/powershell || true
# Remove Google Cloud SDK
time sudo rm -rf /usr/lib/google-cloud-sdk || true

# Remove infrastructure things that are unused and take a lot of space
time sudo rm -rf /opt/hostedtoolcache/CodeQL || true
time sudo rm -rf /imagegeneration/installers/go-* || true
time sudo rm -rf /imagegeneration/installers/node-* || true
time sudo rm -rf /imagegeneration/installers/python-* || true
Loading

0 comments on commit 4312334

Please sign in to comment.