Skip to content

Commit

Permalink
Merge branch 'main' into feature/cleanup-codestarter-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
turing85 authored Oct 27, 2023
2 parents b4e8f36 + d110270 commit 93b437e
Show file tree
Hide file tree
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.
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -35,8 +41,8 @@ body:
Reproducer:
Steps to reproduce the behavior:
1.
2.
1.
2.
3.
- type: markdown
id: environment
Expand All @@ -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:
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.
174 changes: 174 additions & 0 deletions .github/ModuleBuildDurationReport.java
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());
}
}
}

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
18 changes: 12 additions & 6 deletions .github/ci-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@
# 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
# Remove pipx
time sudo rm -rf /opt/pipx
time sudo rm -rf /opt/pipx || 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
15 changes: 7 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ updates:
- dependency-name: io.smallrye.common:*
- dependency-name: io.smallrye.config:*
- dependency-name: io.smallrye.reactive:*
# Swagger-UI
- dependency-name: org.webjars:swagger-ui
# RX Java 2
- dependency-name: io.reactivex.rxjava2:rxjava
# Test dependencies
- dependency-name: net.sourceforge.htmlunit:htmlunit
- dependency-name: io.rest-assured:*
- dependency-name: org.hamcrest:hamcrest
- dependency-name: org.junit:junit-bom
- dependency-name: org.junit.jupiter:*
- dependency-name: org.assertj:assertj-core
Expand All @@ -80,14 +79,16 @@ updates:
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
- dependency-name: net.revelc.code:impsort-maven-plugin
- dependency-name: org.apache.maven.plugins:maven-invoker-plugin
- dependency-name: org.codehaus.mojo:build-helper-maven-plugin
# Narayana
- dependency-name: org.jboss.narayana.jta:*
- dependency-name: org.jboss.narayana.jts:*
- dependency-name: org.jboss.narayana.stm:*
# Agroal
- dependency-name: io.agroal:*
# WireMock
- dependency-name: com.github.tomakehurst:wiremock-jre8-standalone
- dependency-name: org.wiremock:wiremock
- dependency-name: org.wiremock:wiremock-standalone
- dependency-name: uk.co.automatictester:wiremock-maven-plugin
# Picocli
- dependency-name: info.picocli:*
Expand Down Expand Up @@ -140,11 +141,8 @@ updates:
- dependency-name: org.eclipse.microprofile.opentracing:microprofile-opentracing-tck*
- dependency-name: org.eclipse.microprofile.rest.client:microprofile-rest-client-tck
# Dev UI web dependencies
- dependency-name: org.webjars:bootstrap
- dependency-name: org.webjars:font-awesome
- dependency-name: org.webjars:jquery
- dependency-name: org.webjars:codemirror
- dependency-name: org.webjars.npm:mermaid
- dependency-name: org.mvnpm:*
- dependency-name: org.mvnpm.*:*
# Elasticsearch - we do not update the high level client
- dependency-name: org.elasticsearch.client:elasticsearch-rest-client
- dependency-name: org.elasticsearch.client:elasticsearch-rest-client-sniffer
Expand Down Expand Up @@ -175,6 +173,7 @@ updates:
- dependency-name: org.glassfish.*:*
- dependency-name: org.apache.groovy:*
- dependency-name: org.apache.qpid:*
- dependency-name: biz.paluch.logging:logstash-gelf
ignore:
# this one cannot be upgraded due to the usage of proxies in new versions
# the proxy implements interfaces in a random order which causes issues
Expand Down
Loading

0 comments on commit 93b437e

Please sign in to comment.