Skip to content

Commit

Permalink
Merge pull request #3421 from ingef/release
Browse files Browse the repository at this point in the history
Merge Release
  • Loading branch information
thoniTUB authored May 6, 2024
2 parents e397e32 + b3de537 commit fec0ef6
Show file tree
Hide file tree
Showing 519 changed files with 8,232 additions and 3,471 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ hs_err_pid*
/storage/
*.iml

# Jupyter notebook tutorial development
/workspace.code-workspace
**/Lib/
**/Include/
Expand All @@ -70,6 +71,9 @@ hs_err_pid*
**/pyvenv.cfg
tutorial/mimic_iii_demo/data/**

# Include frontend container assets
!/frontend/container/etc

/node_modules
cypress/screenshots/
cypress/videos/
17 changes: 8 additions & 9 deletions autodoc/src/main/java/com/bakdata/conquery/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
import java.util.Locale;
import java.util.Set;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;

import com.bakdata.conquery.apiv1.FilterTemplate;
import com.bakdata.conquery.apiv1.IdLabel;
import com.bakdata.conquery.apiv1.KeyValue;
Expand Down Expand Up @@ -86,6 +77,14 @@
import io.dropwizard.jersey.PATCH;
import io.dropwizard.util.DataSize;
import io.dropwizard.util.Duration;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Response;

public class Constants {
public static final Group[] GROUPS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Set;
import java.util.stream.Collectors;

import javax.ws.rs.core.UriBuilder;
import jakarta.ws.rs.core.UriBuilder;

import com.bakdata.conquery.introspection.Introspection;
import com.bakdata.conquery.io.cps.CPSType;
Expand Down
2 changes: 1 addition & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<properties>
<mock-server.version>5.11.1</mock-server.version>
<apache-poi.version>5.2.2</apache-poi.version>
<apache-arrow.version>10.0.1</apache-arrow.version>
<apache-arrow.version>16.0.0</apache-arrow.version>
<apache-parquet.version>1.12.3</apache-parquet.version>
</properties>

Expand Down
11 changes: 5 additions & 6 deletions backend/src/main/java/com/bakdata/conquery/Conquery.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.bakdata.conquery;

import javax.validation.Validator;

import ch.qos.logback.classic.Level;
import com.bakdata.conquery.commands.DistributedStandaloneCommand;
import com.bakdata.conquery.commands.ManagerNode;
Expand All @@ -17,12 +15,13 @@
import com.bakdata.conquery.mode.local.LocalManagerProvider;
import com.bakdata.conquery.models.config.ConqueryConfig;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.dropwizard.Application;
import io.dropwizard.ConfiguredBundle;
import io.dropwizard.configuration.JsonConfigurationFactory;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.dropwizard.core.Application;
import io.dropwizard.core.ConfiguredBundle;
import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;
import jakarta.validation.Validator;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
Expand Down
12 changes: 9 additions & 3 deletions backend/src/main/java/com/bakdata/conquery/apiv1/ApiV1.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.bakdata.conquery.io.jetty.CORSResponseFilter;
import com.bakdata.conquery.io.result.ResultRender.ResultRendererProvider;
import com.bakdata.conquery.metrics.ActiveUsersFilter;
import com.bakdata.conquery.models.auth.basic.JWTokenHandler;
import com.bakdata.conquery.models.auth.web.DefaultAuthFilter;
import com.bakdata.conquery.models.forms.frontendconfiguration.FormConfigProcessor;
import com.bakdata.conquery.models.forms.frontendconfiguration.FormProcessor;
import com.bakdata.conquery.resources.ResourcesProvider;
Expand All @@ -25,14 +27,15 @@
import com.bakdata.conquery.resources.api.QueryResource;
import io.dropwizard.jersey.setup.JerseyEnvironment;
import org.glassfish.jersey.internal.inject.AbstractBinder;
import org.glassfish.jersey.server.ResourceConfig;

@CPSType(base = ResourcesProvider.class, id = "ApiV1")
public class ApiV1 implements ResourcesProvider {
public class ApiV1 extends ResourceConfig implements ResourcesProvider {

@Override
public void registerResources(ManagerNode manager) {

JerseyEnvironment jersey = manager.getEnvironment().jersey();
final JerseyEnvironment jersey = manager.getEnvironment().jersey();
// TODO this does not work, if we really want to do api versioning
jersey.setUrlPattern("/api");

Expand Down Expand Up @@ -60,7 +63,10 @@ protected void configure() {
* We use the same instance of the filter for the api servlet and the admin servlet to have a single
* point for authentication.
*/
jersey.register(manager.getAuthController().getAuthenticationFilter());
jersey.register(DefaultAuthFilter.class);
DefaultAuthFilter.registerTokenExtractor(JWTokenHandler.JWTokenExtractor.class, jersey.getResourceConfig());


jersey.register(IdParamConverter.Provider.INSTANCE);

jersey.register(QueryResource.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.net.URI;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import com.bakdata.conquery.apiv1.frontend.FrontendValue;
import com.bakdata.conquery.io.cps.CPSType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.bakdata.conquery.apiv1;


import javax.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotEmpty;

import com.bakdata.conquery.models.identifiable.ids.Id;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Map;
import java.util.stream.Collectors;

import javax.inject.Inject;
import jakarta.inject.Inject;

import com.bakdata.conquery.io.storage.MetaStorage;
import com.bakdata.conquery.models.auth.AuthorizationHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,12 @@
import java.util.stream.IntStream;
import java.util.stream.Stream;

import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.BadRequestException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;

import com.bakdata.conquery.apiv1.execution.ExecutionStatus;
import com.bakdata.conquery.apiv1.execution.FullExecutionStatus;
import com.bakdata.conquery.apiv1.execution.OverviewExecutionStatus;
import com.bakdata.conquery.apiv1.execution.ResultAsset;
import com.bakdata.conquery.apiv1.query.CQElement;
import com.bakdata.conquery.apiv1.query.ConceptQuery;
import com.bakdata.conquery.apiv1.query.EditorQuery;
import com.bakdata.conquery.apiv1.query.ExternalUpload;
import com.bakdata.conquery.apiv1.query.ExternalUploadResult;
import com.bakdata.conquery.apiv1.query.Query;
Expand Down Expand Up @@ -89,6 +82,11 @@
import com.bakdata.conquery.util.io.IdColumnUtil;
import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.MutableClassToInstanceMap;
import jakarta.inject.Inject;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.BadRequestException;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriBuilder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -138,11 +136,11 @@ public Stream<ExecutionStatus> getQueriesFiltered(Dataset datasetId, UriBuilder
*/
private static boolean canFrontendRender(ManagedExecution q) {
//TODO FK: should this be used to fill into canExpand instead of hiding the Executions?
if (!(q instanceof EditorQuery)) {
if (!(q instanceof ManagedQuery)) {
return false;
}

final Query query = ((EditorQuery) q).getQuery();
final Query query = ((ManagedQuery) q).getQuery();

if (query instanceof ConceptQuery) {
return isFrontendStructure(((ConceptQuery) query).getRoot());
Expand Down Expand Up @@ -292,14 +290,15 @@ public FullExecutionStatus getQueryFullStatus(ManagedExecution query, Subject su
public ExternalUploadResult uploadEntities(Subject subject, Dataset dataset, ExternalUpload upload) {

final Namespace namespace = datasetRegistry.get(dataset.getId());
final CQExternal.ResolveStatistic
statistic =
CQExternal.resolveEntities(upload.getValues(), upload.getFormat(), namespace
.getStorage()
.getIdMapping(), config.getIdColumns(), config.getLocale()
.getDateReader(), upload.isOneRowPerEntity()

);
final CQExternal.ResolveStatistic statistic = CQExternal.resolveEntities(
upload.getValues(),
upload.getFormat(),
namespace.getStorage().getIdMapping(),
config.getIdColumns(),
config.getLocale().getDateReader(),
upload.isOneRowPerEntity(),
true
);

// Resolving nothing is a problem thus we fail.
if (statistic.getResolved().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import static com.bakdata.conquery.resources.ResourceConstants.API;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.UriBuilder;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.core.UriBuilder;
import lombok.experimental.UtilityClass;

@UtilityClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import java.net.URI;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.MultivaluedMap;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.container.ContainerRequestContext;
import jakarta.ws.rs.core.MultivaluedMap;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.bakdata.conquery.apiv1.auth;

import javax.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotEmpty;

import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.models.auth.basic.LocalAuthenticationRealm;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.bakdata.conquery.apiv1.auth;

import javax.validation.constraints.NotEmpty;

import com.bakdata.conquery.io.cps.CPSType;
import jakarta.validation.constraints.NotEmpty;

@CPSType(base = CredentialType.class, id = "PASSWORD_HASH")
public record PasswordHashCredential(@NotEmpty String hash) implements CredentialType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
import java.util.Objects;
import java.util.Set;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.bakdata.conquery.io.storage.MetaStorage;
import com.bakdata.conquery.models.auth.entities.Role;
import com.bakdata.conquery.models.auth.permissions.WildcardPermission;
import com.bakdata.conquery.models.identifiable.ids.specific.RoleId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Getter;
import lombok.NonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import java.util.Collections;
import java.util.Set;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.bakdata.conquery.io.storage.MetaStorage;
import com.bakdata.conquery.models.auth.UserManageable;
import com.bakdata.conquery.models.auth.basic.LocalAuthenticationRealm;
Expand All @@ -16,6 +12,9 @@
import com.bakdata.conquery.models.identifiable.ids.specific.RoleId;
import com.bakdata.conquery.models.identifiable.ids.specific.UserId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Getter;
import lombok.NonNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.bakdata.conquery.apiv1.auth;

import javax.validation.constraints.NotEmpty;

import com.bakdata.conquery.models.auth.basic.LocalAuthenticationRealm;
import com.bakdata.conquery.models.identifiable.ids.specific.UserId;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.time.LocalDateTime;
import java.util.UUID;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import com.bakdata.conquery.models.auth.entities.User;
import com.bakdata.conquery.models.datasets.Dataset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import java.util.List;
import java.util.function.Consumer;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import com.bakdata.conquery.apiv1.query.ArrayConceptQuery;
import com.bakdata.conquery.apiv1.query.Query;
import com.bakdata.conquery.io.cps.CPSType;
Expand All @@ -18,6 +15,8 @@
import com.bakdata.conquery.models.query.QueryResolveContext;
import com.bakdata.conquery.models.query.Visitable;
import com.fasterxml.jackson.annotation.JsonView;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import java.util.function.Consumer;

import javax.annotation.CheckForNull;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import com.bakdata.conquery.apiv1.query.ArrayConceptQuery;
import com.bakdata.conquery.apiv1.query.Query;
Expand All @@ -19,6 +17,8 @@
import com.bakdata.conquery.models.query.QueryResolveContext;
import com.bakdata.conquery.models.query.Visitable;
import com.fasterxml.jackson.annotation.JsonView;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import java.util.stream.Collectors;

import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.ValidationException;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.ValidationException;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import c10n.C10N;
import com.bakdata.conquery.ConqueryConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import java.util.function.Consumer;

import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;

import c10n.C10N;
import com.bakdata.conquery.ConqueryConstants;
Expand Down
Loading

0 comments on commit fec0ef6

Please sign in to comment.