forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/cleanup-codestarter-tests
- Loading branch information
Showing
4,140 changed files
with
123,730 additions
and
56,227 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ 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: textarea | ||
id: description | ||
validations: | ||
|
@@ -35,8 +41,8 @@ body: | |
Reproducer: | ||
Steps to reproduce the behavior: | ||
1. | ||
2. | ||
1. | ||
2. | ||
3. | ||
- type: markdown | ||
id: environment | ||
|
@@ -51,10 +57,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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
//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" | ||
+ "%Possible 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()); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.