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

Merge Release #3544

Merged
merged 72 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
f490ce1
puts mina related method in separate class
thoniTUB Jul 31, 2024
bcc3e1b
include scheduler into ClusterConnectionShard
thoniTUB Jul 31, 2024
6bb6066
use MdcFilter for Mina filter chain
thoniTUB Jul 31, 2024
67377ba
sets verbose logs to trace
thoniTUB Jul 31, 2024
0a08304
fix build error
thoniTUB Aug 1, 2024
572e16c
close scheduler before disconnect to avoid scheduled reconnects
thoniTUB Aug 1, 2024
4495349
Merge branch 'develop' into feature/refactor-shard-mina
thoniTUB Aug 1, 2024
8e52c60
use awaitility to check for cluster up
thoniTUB Aug 1, 2024
7bfc425
don't spin up shard nodes async in standalone mode, because adding ma…
thoniTUB Aug 1, 2024
3ae3619
extract sync object from persistable execution class
thoniTUB Aug 8, 2024
9f6e7ea
removes unused member from class
thoniTUB Aug 8, 2024
4d90441
revert client timeouts
thoniTUB Aug 8, 2024
bdd05d9
cleanup
thoniTUB Aug 8, 2024
99b4c08
Merge branch 'develop' into feature/extract-execution-synchronization
thoniTUB Aug 8, 2024
9b78a5c
enable healthcheck for sql connection
thoniTUB Aug 9, 2024
6bc2267
makes connectivityCheckTimeoutMs configurable
thoniTUB Aug 9, 2024
03fb266
fix whitespaces that broke freemarker
thoniTUB Aug 13, 2024
08f94d6
adds smoke tests for queries and jobs ui
thoniTUB Aug 13, 2024
887c3cb
Merge pull request #3523 from ingef/fix/admin-ui-query-freemarker
thoniTUB Aug 13, 2024
eec0621
Merge pull request #3522 from ingef/master
thoniTUB Aug 13, 2024
6018205
fix missing argument
thoniTUB Aug 13, 2024
e25126e
Merge branch 'develop' into feature/sql-health-check
thoniTUB Aug 13, 2024
21d5916
Merge pull request #3521 from ingef/feature/sql-health-check
thoniTUB Aug 13, 2024
2a67e1d
sort dropdown options
thoniTUB Aug 14, 2024
71e2cee
Merge pull request #3526 from ingef/feature/sort-admin-ui-dropdowns
thoniTUB Aug 14, 2024
982afcf
capsule object mapper creation and configuration in one factory
thoniTUB Aug 15, 2024
fd68b4a
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
thoniTUB Aug 15, 2024
87534ed
improve log message
thoniTUB Aug 15, 2024
26ea90f
Merge pull request #3511 from ingef/feature/refactor-shard-mina
thoniTUB Aug 15, 2024
549d1b6
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
thoniTUB Aug 15, 2024
7666907
use list instead of class map to retrieve query visitors
thoniTUB Aug 16, 2024
e0ef22f
unlocks external executions after completion
thoniTUB Aug 16, 2024
386d82f
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
thoniTUB Aug 16, 2024
1cbe570
Fix negation conversion if negation is not the first node (#3527)
jnsrnhld Aug 19, 2024
9587461
Merge branch 'develop' into feature/capsule-object-mapper-creator
thoniTUB Aug 19, 2024
e8f9c04
Merge pull request #3528 from ingef/feature/capsule-object-mapper-cre…
thoniTUB Aug 19, 2024
1231591
update java parser
thoniTUB Aug 20, 2024
be5cd58
adds docs and registers them to autodoc
thoniTUB Aug 20, 2024
8aeff62
support enums and records
thoniTUB Aug 20, 2024
4cb743b
Merge pull request #3530 from ingef/feature/sql-config-doc
thoniTUB Aug 20, 2024
9d5022e
Adds timeout check to ClusterHealthCheck
thoniTUB Aug 21, 2024
146aed3
adds missing changes to universally handy nodes with members
thoniTUB Aug 21, 2024
2a94ee5
Merge branch 'refs/heads/develop' into feature/sql-config-doc
thoniTUB Aug 21, 2024
15c6180
Merge pull request #3532 from ingef/feature/health-shard-heartbeat
thoniTUB Aug 22, 2024
4a0c0d9
fix sign mistake in calculation
thoniTUB Aug 22, 2024
8f09ad1
Merge pull request #3534 from ingef/feature/health-shard-heartbeat
thoniTUB Aug 22, 2024
59b68f6
cleanup and renaming
thoniTUB Aug 22, 2024
04f34d5
Merge branch 'develop' into feature/extract-execution-synchronization
thoniTUB Aug 22, 2024
8229aa3
Merge branch 'develop' into feature/sql-config-doc
thoniTUB Aug 22, 2024
795c705
Merge pull request #3533 from ingef/feature/sql-config-doc
thoniTUB Aug 22, 2024
0854f74
restructures ResultType and decouples printing into ResultPrinters: (…
awildturtok Aug 22, 2024
3b2142b
combine all execution states in one cache
thoniTUB Aug 23, 2024
b3accd4
Merge remote-tracking branch 'origin/feature/extract-execution-synchr…
thoniTUB Aug 23, 2024
00d0f79
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
thoniTUB Aug 23, 2024
8ec01aa
review changes
thoniTUB Aug 27, 2024
c178dfa
Merge pull request #3519 from ingef/feature/extract-execution-synchro…
thoniTUB Aug 27, 2024
0b4f0ab
remove cqpp import via file path
thoniTUB Aug 27, 2024
c071c64
Merge branch 'develop' into fix/user-input-file-path
thoniTUB Aug 27, 2024
095d36e
Merge pull request #3536 from ingef/fix/user-input-file-path
thoniTUB Aug 27, 2024
7b85945
fixes typo
thoniTUB Aug 29, 2024
bc417fe
Merge pull request #3537 from ingef/fix/trigger-external-bump
thoniTUB Aug 29, 2024
c0a8edd
makes static field final
thoniTUB Aug 29, 2024
8159e15
Merge pull request #3538 from ingef/fix/trigger-external-bump
thoniTUB Aug 29, 2024
c520162
removes unnecessary modifiers
thoniTUB Aug 29, 2024
2bea915
Merge pull request #3539 from ingef/fix/trigger-external-bump
thoniTUB Aug 29, 2024
7e6d2d9
removes unnecessary modifier
thoniTUB Aug 29, 2024
40b8afe
Merge pull request #3540 from ingef/fix/trigger-external-bump
thoniTUB Aug 29, 2024
c95d838
removes unnecessary modifier
thoniTUB Aug 29, 2024
abf9e36
Merge pull request #3541 from ingef/fix/trigger-external-bump
thoniTUB Aug 29, 2024
95f7ad1
Merge branch 'refs/heads/master' into reintegrate-master
thoniTUB Aug 29, 2024
3cd0bcb
fixes github action commands
thoniTUB Aug 29, 2024
765fb7a
Merge pull request #3542 from ingef/reintegrate-master
thoniTUB Aug 29, 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
9 changes: 9 additions & 0 deletions .github/workflows/reintegrate-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- name: Configure git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config push.autoSetupRemote true
- name: Switch to intermediate branch
run: git checkout -b $REINTEGRATE_BRANCH_NAME
- name: Push intermediate Branch
run: git push -f
- name: Create pull-request
run: >
gh pr create
Expand All @@ -28,11 +35,13 @@ jobs:
-B develop
--title "Reintegrate Main"
--head $REINTEGRATE_BRANCH_NAME
--fill
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Modify pull request
run: >
gh pr merge
--merge
--auto
--delete-branch
env:
Expand Down
2 changes: 1 addition & 1 deletion autodoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


<properties>
<javaparser.version>3.24.4</javaparser.version>
<javaparser.version>3.26.1</javaparser.version>
</properties>

<parent>
Expand Down
11 changes: 10 additions & 1 deletion autodoc/src/main/java/com/bakdata/conquery/AutoDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.bakdata.conquery.handler.GroupHandler;
import com.bakdata.conquery.handler.SimpleWriter;
import com.bakdata.conquery.model.Group;
import com.github.javaparser.ParserConfiguration;
import com.github.javaparser.StaticJavaParser;
import com.github.powerlibraries.io.Out;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ScanResult;
Expand All @@ -17,10 +19,17 @@
public class AutoDoc {

public static void main(String[] args) throws IOException {
configureJavaParser();

new AutoDoc().start(new File(args.length == 0 ? "./docs/" : args[0]));
}

private ScanResult scan;
private static void configureJavaParser() {
ParserConfiguration parserConfiguration = StaticJavaParser.getParserConfiguration();
parserConfiguration.setLanguageLevel(ParserConfiguration.LanguageLevel.JAVA_17);
}

private final ScanResult scan;

public AutoDoc() {
scan = new ClassGraph()
Expand Down
5 changes: 5 additions & 0 deletions autodoc/src/main/java/com/bakdata/conquery/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.nio.charset.Charset;
import java.time.ZonedDateTime;
import java.util.Currency;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import jakarta.ws.rs.DELETE;
Expand Down Expand Up @@ -41,12 +42,15 @@
import com.bakdata.conquery.models.config.CSVConfig;
import com.bakdata.conquery.models.config.ClusterConfig;
import com.bakdata.conquery.models.config.ConqueryConfig;
import com.bakdata.conquery.models.config.DatabaseConfig;
import com.bakdata.conquery.models.config.Dialect;
import com.bakdata.conquery.models.config.FrontendConfig;
import com.bakdata.conquery.models.config.LocaleConfig;
import com.bakdata.conquery.models.config.MinaConfig;
import com.bakdata.conquery.models.config.PluginConfig;
import com.bakdata.conquery.models.config.PreprocessingConfig;
import com.bakdata.conquery.models.config.QueryConfig;
import com.bakdata.conquery.models.config.SqlConnectorConfig;
import com.bakdata.conquery.models.config.StandaloneConfig;
import com.bakdata.conquery.models.config.XodusConfig;
import com.bakdata.conquery.models.config.XodusStoreFactory;
Expand Down Expand Up @@ -129,6 +133,7 @@ public class Constants {
.otherClass(MinaConfig.class)
.otherClass(FrontendConfig.CurrencyConfig.class)
.otherClass(XodusConfig.class)
.otherClasses(List.of(SqlConnectorConfig.class, DatabaseConfig.class, Dialect.class))
.hide(Charset.class)
.hide(Currency.class)
.hide(InetAddress.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import jakarta.ws.rs.core.UriBuilder;

import com.bakdata.conquery.introspection.Introspection;
Expand Down Expand Up @@ -98,7 +97,7 @@ public void handle() throws IOException {
}
if (!endpoints.isEmpty()) {
out.heading("REST endpoints");
for (Pair<String, MethodInfo> endpoint : endpoints.stream().sorted(Comparator.comparing(Pair::getLeft)).collect(Collectors.toList())) {
for (Pair<String, MethodInfo> endpoint : endpoints.stream().sorted(Comparator.comparing(Pair::getLeft)).toList()) {
handleEndpoint(endpoint.getLeft(), endpoint.getRight());
}
}
Expand All @@ -108,13 +107,13 @@ public void handle() throws IOException {
}

out.subHeading("Other Types");
for (Class<?> t : group.getOtherClasses().stream().sorted(Comparator.comparing(Class::getSimpleName)).collect(Collectors.toList())) {
for (Class<?> t : group.getOtherClasses().stream().sorted(Comparator.comparing(Class::getSimpleName)).toList()) {
handleClass(typeTitle(t), scan.getClassInfo(t.getName()));
}

if (!group.getMarkerInterfaces().isEmpty()) {
out.subHeading("Marker Interfaces");
for (Class<?> t : group.getMarkerInterfaces().stream().sorted(Comparator.comparing(Class::getSimpleName)).collect(Collectors.toList())) {
for (Class<?> t : group.getMarkerInterfaces().stream().sorted(Comparator.comparing(Class::getSimpleName)).toList()) {
handleMarkerInterface(markerTitle(t), scan.getClassInfo(t.getName()));
}
}
Expand All @@ -135,7 +134,7 @@ private void handleEndpoint(String url, MethodInfo method) throws IOException {
}
}

private void collectEndpoints(Class<?> resource) throws IOException {
private void collectEndpoints(Class<?> resource) {
final ClassInfo info = scan.getClassInfo(resource.getName());

for (MethodInfo method : info.getMethodInfo()) {
Expand Down Expand Up @@ -172,7 +171,7 @@ public void handleBase(Base base) throws IOException {
+ code(typeProperty)
+ " to one of the following values:");

for (Pair<CPSType, ClassInfo> pair : content.get(base).stream().sorted(Comparator.comparing(p -> p.getLeft().id())).collect(Collectors.toList())) {
for (Pair<CPSType, ClassInfo> pair : content.get(base).stream().sorted(Comparator.comparing(p -> p.getLeft().id())).toList()) {

handleClass(pair.getLeft(), pair.getRight());
}
Expand All @@ -198,7 +197,7 @@ private void handleClass(String name, ClassInfo c) throws IOException {
out.line("Supported Fields:");

out.tableHeader("", "Field", "Type", "Default", "Example", "Description");
for (FieldInfo field : c.getFieldInfo().stream().sorted().collect(Collectors.toList())) {
for (FieldInfo field : c.getFieldInfo().stream().sorted().toList()) {
handleField(c, field);
}
}
Expand Down Expand Up @@ -226,12 +225,7 @@ private Closeable details(String name, ClassInfo c, Introspection source) throws
);
}

return new Closeable() {
@Override
public void close() throws IOException {
out.line("</p></details>");
}
};
return () -> out.line("</p></details>");
}

private void handleMarkerInterface(String name, ClassInfo c) throws IOException {
Expand Down Expand Up @@ -487,6 +481,7 @@ private boolean isJSONSettableField(FieldInfo field) {
}
}

return false;
// is record
return field.getClassInfo().isRecord();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,55 @@
import io.github.classgraph.MethodInfo;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequiredArgsConstructor
public class AbstractJavadocIntrospection<VALUE extends NodeWithJavadoc<?>&NodeWithRange<?>> implements Introspection {
public class AbstractJavadocIntrospection<VALUE extends NodeWithJavadoc<?> & NodeWithRange<?>> implements Introspection {

@Getter
protected final File file;
@Getter
protected final VALUE value;

@Getter(lazy = true)
private final String description = extractDescription();
@Getter(lazy = true)
private final String example = extractExample();

private String extractDescription() {
if(!value.getJavadoc().isPresent()) {
protected String extractDescription() {
if (value.getJavadoc().isEmpty()) {
return "";
}
var javadoc = value.getJavadoc().get();
return javadoc.getDescription().toText().replaceAll("\\s+", " ");
}

private String extractExample() {
if(!value.getJavadoc().isPresent()) {
if (value.getJavadoc().isEmpty()) {
return "";
}
var javadoc = value.getJavadoc().get();
return javadoc.getBlockTags()
.stream()
.filter(b->b.getTagName().equals("jsonExample"))
.findAny()
.map(JavadocBlockTag::getContent)
.map(JavadocDescription::toText)
.orElse("");
.stream()
.filter(b -> b.getTagName().equals("jsonExample"))
.findAny()
.map(JavadocBlockTag::getContent)
.map(JavadocDescription::toText)
.orElse("");
}

@Override
public String getLine() {
if(value.getJavadocComment().isPresent()) {
if (value.getJavadocComment().isPresent()) {
return "L"
+ value.getJavadocComment().get().getBegin().get().line
+ "-L"
+ value.getJavadocComment().get().getEnd().get().line;
+ value.getJavadocComment().get().getBegin().get().line
+ "-L"
+ value.getJavadocComment().get().getEnd().get().line;
}
return "L"+value.getBegin().get().line;
return "L" + value.getBegin().get().line;
}

@Override
public Introspection findMethod(MethodInfo method) {
return new SimpleIntrospection(file);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
package com.bakdata.conquery.introspection;

import java.io.File;
import java.util.Arrays;

import com.github.javaparser.ast.body.EnumDeclaration;
import com.github.javaparser.ast.body.FieldDeclaration;
import com.github.javaparser.ast.body.TypeDeclaration;
import com.github.javaparser.ast.nodeTypes.NodeWithJavadoc;
import com.github.javaparser.ast.nodeTypes.NodeWithMembers;
import com.github.javaparser.ast.nodeTypes.NodeWithRange;
import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName;
import com.google.common.collect.MoreCollectors;
import io.github.classgraph.ArrayTypeSignature;
import io.github.classgraph.BaseTypeSignature;
import io.github.classgraph.ClassRefTypeSignature;
import io.github.classgraph.FieldInfo;
import io.github.classgraph.MethodInfo;
import io.github.classgraph.MethodParameterInfo;
import io.github.classgraph.TypeSignature;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class AbstractNodeWithMemberIntrospection<VALUE extends NodeWithJavadoc<?> & NodeWithRange<?> & NodeWithMembers<?>> extends AbstractJavadocIntrospection<VALUE> {

public AbstractNodeWithMemberIntrospection(File file, VALUE nodeWithJavadoc) {
super(file, nodeWithJavadoc);
}

@Override
public Introspection findMethod(MethodInfo method) {
var types = Arrays.stream(method.getParameterInfo())
.map(MethodParameterInfo::getTypeSignatureOrTypeDescriptor)
.map(this::toClass)
.toArray(Class[]::new);

return new AbstractJavadocIntrospection<>(
file,
value
.getMethodsByParameterTypes(types)
.stream()
.filter(md -> md.getNameAsString().equals(method.getName()))
.collect(MoreCollectors.onlyElement())
);

}

@Override
public Introspection findField(FieldInfo field) {

var f = value.getFieldByName(field.getName());
if (f.isPresent()) {
FieldDeclaration fieldDeclaration = f.get();
return new AbstractJavadocIntrospection<>(file, fieldDeclaration);
}
log.warn("Could not find field '{}'", field.getName());
return new SimpleIntrospection(file);
}

public Introspection findInnerType(String simpleName) {
for (var decl : value.getMembers()) {
if (decl instanceof NodeWithSimpleName<?> node) {
if (!node.getNameAsString().equals(simpleName)) {
continue;
}
}
else {
continue;
}
if (decl instanceof EnumDeclaration enumDeclaration) {
return new EnumIntrospection(file, enumDeclaration);
}
if (decl instanceof TypeDeclaration<?> cType) {
return new AbstractNodeWithMemberIntrospection<>(file, cType);
}
}
throw new IllegalStateException(value.getNameAsString() + " has no inner type " + simpleName);
}

private Class<?> toClass(TypeSignature sig) {
if (sig instanceof BaseTypeSignature) {
return ((BaseTypeSignature) sig).getType();
}
else if (sig instanceof ArrayTypeSignature) {
return ((ArrayTypeSignature) sig).loadClass();
}
else if (sig instanceof ClassRefTypeSignature) {
return ((ClassRefTypeSignature) sig).loadClass();
}
throw new IllegalStateException("Can't find class for signature " + sig);
}

}
Loading
Loading