Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

755 lines
33 KiB
Java
Raw Normal View History

2021-08-01 14:27:44 -07:00
/*
* Copyright 2021 Collate
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
2021-08-01 14:27:44 -07:00
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openmetadata.service;
2021-08-01 14:27:44 -07:00
import static org.openmetadata.service.util.jdbi.JdbiUtils.createAndSetupJDBI;
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.core.Application;
import io.dropwizard.core.server.DefaultServerFactory;
import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;
2021-08-01 14:27:44 -07:00
import io.dropwizard.jersey.errors.EarlyEofExceptionMapper;
import io.dropwizard.jersey.errors.LoggingExceptionMapper;
2021-10-21 21:13:27 -07:00
import io.dropwizard.jersey.jackson.JsonProcessingExceptionMapper;
import io.dropwizard.jetty.MutableServletContextHandler;
2021-08-01 14:27:44 -07:00
import io.dropwizard.lifecycle.Managed;
import io.federecio.dropwizard.swagger.SwaggerBundle;
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;
import io.socket.engineio.server.EngineIoServerOptions;
import io.socket.engineio.server.JettyWebSocketHandler;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.info.License;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import io.swagger.v3.oas.annotations.security.SecuritySchemes;
import io.swagger.v3.oas.annotations.servers.Server;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.FilterRegistration;
import jakarta.servlet.ServletRegistration;
import jakarta.validation.Validation;
import jakarta.ws.rs.container.ContainerRequestFilter;
import jakarta.ws.rs.container.ContainerResponseFilter;
import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.util.EnumSet;
import java.util.Optional;
import javax.naming.ConfigurationException;
2021-08-01 14:27:44 -07:00
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
2021-08-01 14:27:44 -07:00
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerInitializer;
2021-08-01 14:27:44 -07:00
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ServerProperties;
import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;
2021-10-21 21:13:27 -07:00
import org.jdbi.v3.core.Jdbi;
import org.jdbi.v3.sqlobject.SqlObjects;
import org.jetbrains.annotations.NotNull;
import org.openmetadata.schema.api.security.AuthenticationConfiguration;
import org.openmetadata.schema.api.security.AuthorizerConfiguration;
import org.openmetadata.schema.api.security.ClientType;
Pluggable API/Features Limits (#16782) * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits: add entity resource enforcer * Limits: fix rebase * update limits enforcement * Add OperationContext to limits * chore: Bump versions to `1.4.0` * chore: Bump Ingestion Versions to `1.4.0.1` for Release * chore: Bump Ingestion Versions to `1.4.0.1` in Dockerfiles for Release * Remove Retry From Abstract Event Consumer (#16405) (cherry picked from commit f8ed079731cc238dc136306fe018c5df35dd2f3b) * Fix Migrations: Add postgres migrations (#16403) (cherry picked from commit 9416a7ac5fa8fd9695063b108501790d813e8e6e) * Add Null Check for isAdmin (#16407) * Remove Retry From Abstract Event Consumer * - Add Check for null Or Empty in isAdmin * - Fix Test (cherry picked from commit fe2db2d63c5495b6c288d4252a19ab77481b6de0) * Fix OpenLineage ingestor (#16416) * Fix OpenLineage ingestor * py format --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com> * Minor: added whats new for 1.4.1 (#16420) * Minor: added whats new for 1.4.1 * added note in to whats new * Fix SSL issue (#16412) * chore: Bump Versions for `1.4.1` Release * chore(release): Prepare Branch for `1.4.2` * [MINOR] partition migration issue with redshift servics (#16452) * fix: partition migration issue with redshift servics * chore: typo in sql comment (cherry picked from commit 451d73593e813151c24f2c1d17efb3dcdebb71c8) * minor(ui): update what's new for 1.4.2 (#16457) (cherry picked from commit d55981adfd2321de706e4a043828bb473a4b05f1) * fix: ingestion for dbt > 1.8.0 resource_type is not an enum (#16415) * fix: resource_type is not an enum * feat: add log to display finis * improve readability * use getattr to be compatible * format * Add Cache Query Param for Limits * Only Parse view query (#16470) * add limit check during user creation via PUT * add limit check during user creation via PUT * MINOR: Kafka Setup SSL Arg Fix (#16469) * Fix#16404 - Show Node level lineage by default (#16445) * default to node layer * update cypress * code cleanup * fix cypress (cherry picked from commit f0cda8464f34a21f45f18fa557e980fb2f105d8e) * Invalidate count of data asset after hard delete. add limit exception to ingestion client * - Remove Change Description from Lineage (#16488) (cherry picked from commit 9e5c5529a84dfc781382b3a3b6abd80ee41f11f5) * - Non Indexable fields should be remvoed at the end (#16499) (cherry picked from commit f0b0f7a9426ca601d3bfee3989d4ce47e732a7af) * fix announcement not redirect from landing page (#16506) * fix announcement not redirect from landing page * minor changes * change in cypress test (cherry picked from commit ee7cddd169a3a1fb1e598e80035c2fc15a5a129b) * Fix Schema Field Null Issue (#16510) (cherry picked from commit 022772943f1b33f6230cb35547d1da6acfaf6cfa) * feat(ui): limits integration with application (#16206) * feat(ui): limits integration with application * support pipelineSchedules via limit api * enforce limit to all the modules * update banner styling * update * support disable option for ManageButton * limit version * fix spotlight * update tests * Add name and version history to resource limits Refactor the getEntityIcon function and add new icon mappings * limit version * hide access token tab * fix version for all the entity * fix tests * fix DQ tests * Add fallback for the icon * Revert the fallback icon changes * Apply the limit to the add ingestion button in the service details page * Fix the data quality tab add test button not working * fix banner styling * minor fix * Fix ingestion component unit test * Add InlineAlert component * update entityNameLabels mapping object * Fix the incorrect link in LimitBanner * update pricing page url * Create the GlobalSettingsClassBase * Update URLs for pricing page and upgrade options * fix global settings uncaught error * add parameters to the resource limit API * implement inline alerts for service and alert creation form * update PRIVILEGES for docker * fix layout issues * fix tests --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> * Add token limitations * Add token limitations * Add appType as part of schema in ingestion pipeline (#16519) * #16489: fix the redirect issue to new tab for tags and glossary (#16512) * fix the redirect issue to new tab for tags and glossary * fix the redirect on cancel icon and unit test issue * changes as per comments (cherry picked from commit 8d312f0853609cfef260739cf789d459838a3421) * Fix #16229 - Tag and Service filters for test cases (#16484) * fix: added test case support for tags (inherit from table/column)]" * feat: add tag and service filter for test cases * feat: add tier query param * fix: tests (cherry picked from commit 6b00dde90285924445567ee7c396c89f0fcf3f1d) * fix: None type is not iterable (#16496) (cherry picked from commit 656da03b14ca24171cf7924b9dd33663e6bed423) * minor(ui): refresh token for OIDC SSO (#16483) * minor(ui): refresh token for OIDC SSO * remove frame window timeout issue * increase iFrame timeout for oidc (cherry picked from commit 1a6c4c972052836a9b3cfa273b7ea1aa3202eafe) * feat(ui): support tag & tier filter for test case (#16502) * feat(ui): support tag & tier filter for test case * fix tag filter * allow single select for tier * added service name filter * update cypress for tags, tier & service * add specific add for filters * fix tier api call (cherry picked from commit 5b71d79e8ac2d08a154882dfe71b9b3a0f73bffc) * minor: sanitize activity feed editor content (#16533) * Add appType as part of schema in ingestion pipeline (#16519) * Fixed quicksight conn (#16537) * fix: saml auth for new user not created (#16543) * fix: saml auth for new user not created * doc: add comment * Fix#16491 - fix lineage edge description update (#16538) * fix lineage edge description update * fix tests (cherry picked from commit dff0aa8dbedcd4064ad63765cadda65bb998772e) * CYPRESS: fix announcement cypress (#16536) * fix announcement cypress * changes as per comments * fix the cypress failure (cherry picked from commit fcb87b5866ba06aa7a6db516677e311c24053db7) * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration [MINOR] Fix Test Failure for EventRegistration * Fix Event Handlers registration Issue (#16544) * Fix Event Handlers Issue * Review Comments (cherry picked from commit d374e48b7938e8ad3514dc5cf8dff619a12595e3) * [MINOR] Fix Test Failure for EventRegistration (cherry picked from commit 4563ad4fd10f9790c21fe744d8fc131ebd028ac8) * Fix Topic Schema missing messageSchema (#16545) (cherry picked from commit b612dd90c07f564d38392b1ccfe0de1505a4867b) * Add limits exception cache in rest client * MINOR: Ignore Cluster Information from columns (#16495) * minor: improve the block editor initial content history (#16540) * Minor: fixed data quality page type issue (#16556) * #16521: fix issue in userProfilePage for roles. teams and displayName (#16527) * fix update on roles and backlink them in user profile page * fix teams, displayName and profile pic issue * sonar fix * fix cypress issue * minor changes (cherry picked from commit 98945cb2db87ebb325d3a72131f049abffcba345) * Empty quick filters (#16402) * initial commit for empty quick filters * update progress * fix field title * cleanup * add tests * unit tests * fix encoding of search query * add cypress tests * add cypress * fix flaky cypress * fix review comments * revert tooltip changes * fix tests * fix tests (cherry picked from commit 5930cd7a7a4bef73f6850848c85118eb64843e2d) * Fix #16278 : Search to display Draft glossaryTerms on Explore page (#16462) * Fix #16278 : Search to display Draft glossaryTerms as well on Explore page * add term status quick filter * change aggregation key for status field * change aggregation key for status field * add lowercase_normalizer in status filed for aggregate api * add cypress tests * fix cypress --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> (cherry picked from commit ae5e9d61cc9e6a39d65972987de9149a421395b1) * [FIX] GlossaryTerm reviewers should be user or team only (#16372) * add teams as reviewer * Check Users to be reviewers * Reviewers can be a team or user * Fix check by id or name * Review can be team or user both * Validate Reviewers * add multi select control * - Fix Reviewers * - Centralize Reviewer Relationship to EntityRepository * - Sort * add team as reviewer for glossary terms * locales * cleanup * - Update Reviewer should remove existing reviewers * fix selectable owner control * fix code smells * fix reviewer issue * add glossary cypress * fix patch issue on reviewers set to null * update cypress tests * fix cypress * fix cypress * fix reviewers in glossary task and supported cypress * fix pytest * Fix * fix cypress * fix code smells * Inherited Reviewers need to be present always * filter out inherited users * fix cypress * fix backend tests failure * fix backend tests failure -checkstyle * restrict owner to accept task in case of reviewer present * fix pytest --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 9ec3d94e3b8445e63a7d77239c92c92a32536bf2) * Add testSuite tags, domain field and check for TestCase limits * fix owner not showing after refersh in teams page (#16567) (cherry picked from commit 119fcf8959732a980b75e1f795a9f2dc5288cd27) * [ISSUE-16503] Fix createUser to use EntityResource (#16549) * Fix createUser to use EntityResource * fix broken tests * Fix Tests - 3 (cherry picked from commit aeb020ae3b0cbab3a2ee5995c61480cdd1eae405) * what's new for 1.4.2 (#16568) (cherry picked from commit c86468d9929e433922886852381269b46d69c832) * address feedbacks * fix error for bots page * update banner text * allow force fetch limit * fix ingestion schedule * Revert "Merge branch '1.4.2' into limits" This reverts commit 8e965207a23ba527d0f5ba91463c1869077bf091, reversing changes made to 4d16531965fb0d489a4afdebd45ab5b7f3d1eb5c. * Merge 1.4.2 (#16578) * fix explore page conflicts * fix tests --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> * fix subheader * Updating glossary reviewers should propagate reviewers in glossary term (#16580) * highlight inherited reviewer in glossary * locales * use glossary name for search query * fix glossary version cypress * add union datatype for subfields * Adding reviewer to glossary also adds them as an assignee to the task * add glossary approval cypress --------- Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 4c8bf1cac14074df87dafe7a719e2795b0a29895) * Update documentation for Search Index apis (#16539) (cherry picked from commit d3123c49143652015c416d271d9fd0f9cfa9e324) * cypress: fixed flakiness and announcment cypress (#16579) * fetch latest limit for create / delete operations * guard datAsset limit got topic, dashboard, mlmodel etc * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (#16589) * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (cherry picked from commit 8723b8c36afe31410c31d1ebbdafe7b1770921fa) * cypress: fixed cypress AUT for mysql (#16446) * cypress: fixed cypress AUT for mysql * minor fix * skip announcment redirection cypress * Minor: Ensure correct index mapping in Elasticsearch for clusterAlias (#16598) (cherry picked from commit 04543722a6f6e2b1eaf7a451ebb1c176862bc346) * Fix Postgres Application listing (#16600) * Fix Postgres Application listing * Fix Listing (cherry picked from commit 77dfe1f6af53d187ff7a61fdb1e1416de7178f5a) * fix limit related issue * Fix Automations limits invalidation during the uninstall * cypress: fixed 1.4.2 AUT cypress (#16602) * cypress: fixed 1.4.2 AUT cypress * fix cypress around announcement,user,glossary, lineage and mydata * searchIndexApplication fix and minor changes --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> * test: add updateJWTTokenExpiryTime util (#16606) (cherry picked from commit 8c173bed6a279cb0a648bd30632ea6ebdf4a2a90) * OSS changes for adding automator cypress tests (#16611) * Fix Test Suite Filter (#16615) Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> (cherry picked from commit 3db41f08e27f388495040e5b23cc7bee5ae665f1) * MINOR: Fix Profiler for SSL Enabled Source (#16613) * Add Test Suite SSL (#16619) * MINOR: Fix ssl connection in usage & lineage (#16625) * Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners (cherry picked from commit cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3) * chore(release): Prepare Branch for `1.4.3` * - Fix User Signup (#16667) (cherry picked from commit b4cba8a850ecd7a25aeff6ca7dea0dc432d43d86) * - Fix User Signup - p2 (cherry picked from commit d9ae6f6db9891f8e9bf7ad49c561a71dd50103da) * - Update What's new (#16669) - fix vulnerability (cherry picked from commit 1dcb1bd46f9da49764f4c61a7ac5048dd2fa956b) * Minor: Fix incorrect alert on signup page (#16666) * Fix Application enforceLimits during install * Wrap the add test button with limits wrapper for column profile tab * fix errors * fix tests * fix pylint * fix tests * fix limits * pylint * fix schedule options * fix glossary spec failure * Add domain & tags to testSuite * Update airflow-apis-tests-3_9.yml --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> Co-authored-by: Pablo Takara <pjt1991@gmail.com> Co-authored-by: Akash-Jain <15995028+akash-jain-10@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Maxim Martynov <martinov_m_s_@mail.ru> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Antoine Balliet <antoine.balliet@gorgias.com> Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:59:25 +05:30
import org.openmetadata.schema.configuration.LimitsConfiguration;
import org.openmetadata.schema.service.configuration.elasticsearch.ElasticSearchConfiguration;
import org.openmetadata.schema.services.connections.metadata.AuthProvider;
import org.openmetadata.service.apps.ApplicationContext;
import org.openmetadata.service.apps.ApplicationHandler;
import org.openmetadata.service.apps.scheduler.AppScheduler;
import org.openmetadata.service.config.OMWebBundle;
import org.openmetadata.service.config.OMWebConfiguration;
import org.openmetadata.service.events.EventFilter;
import org.openmetadata.service.events.EventPubSub;
import org.openmetadata.service.events.scheduled.EventSubscriptionScheduler;
import org.openmetadata.service.events.scheduled.ServicesStatusJobHandler;
import org.openmetadata.service.exception.CatalogGenericExceptionMapper;
import org.openmetadata.service.exception.ConstraintViolationExceptionMapper;
import org.openmetadata.service.exception.JsonMappingExceptionMapper;
import org.openmetadata.service.exception.OMErrorPageHandler;
import org.openmetadata.service.fernet.Fernet;
2024-12-15 01:16:55 +05:30
import org.openmetadata.service.governance.workflows.WorkflowHandler;
import org.openmetadata.service.jdbi3.CollectionDAO;
import org.openmetadata.service.jdbi3.EntityRepository;
import org.openmetadata.service.jdbi3.MigrationDAO;
import org.openmetadata.service.jdbi3.locator.ConnectionAwareAnnotationSqlLocator;
import org.openmetadata.service.jdbi3.locator.ConnectionType;
import org.openmetadata.service.jobs.EnumCleanupHandler;
import org.openmetadata.service.jobs.GenericBackgroundWorker;
import org.openmetadata.service.jobs.JobDAO;
import org.openmetadata.service.jobs.JobHandlerRegistry;
Pluggable API/Features Limits (#16782) * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits: add entity resource enforcer * Limits: fix rebase * update limits enforcement * Add OperationContext to limits * chore: Bump versions to `1.4.0` * chore: Bump Ingestion Versions to `1.4.0.1` for Release * chore: Bump Ingestion Versions to `1.4.0.1` in Dockerfiles for Release * Remove Retry From Abstract Event Consumer (#16405) (cherry picked from commit f8ed079731cc238dc136306fe018c5df35dd2f3b) * Fix Migrations: Add postgres migrations (#16403) (cherry picked from commit 9416a7ac5fa8fd9695063b108501790d813e8e6e) * Add Null Check for isAdmin (#16407) * Remove Retry From Abstract Event Consumer * - Add Check for null Or Empty in isAdmin * - Fix Test (cherry picked from commit fe2db2d63c5495b6c288d4252a19ab77481b6de0) * Fix OpenLineage ingestor (#16416) * Fix OpenLineage ingestor * py format --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com> * Minor: added whats new for 1.4.1 (#16420) * Minor: added whats new for 1.4.1 * added note in to whats new * Fix SSL issue (#16412) * chore: Bump Versions for `1.4.1` Release * chore(release): Prepare Branch for `1.4.2` * [MINOR] partition migration issue with redshift servics (#16452) * fix: partition migration issue with redshift servics * chore: typo in sql comment (cherry picked from commit 451d73593e813151c24f2c1d17efb3dcdebb71c8) * minor(ui): update what's new for 1.4.2 (#16457) (cherry picked from commit d55981adfd2321de706e4a043828bb473a4b05f1) * fix: ingestion for dbt > 1.8.0 resource_type is not an enum (#16415) * fix: resource_type is not an enum * feat: add log to display finis * improve readability * use getattr to be compatible * format * Add Cache Query Param for Limits * Only Parse view query (#16470) * add limit check during user creation via PUT * add limit check during user creation via PUT * MINOR: Kafka Setup SSL Arg Fix (#16469) * Fix#16404 - Show Node level lineage by default (#16445) * default to node layer * update cypress * code cleanup * fix cypress (cherry picked from commit f0cda8464f34a21f45f18fa557e980fb2f105d8e) * Invalidate count of data asset after hard delete. add limit exception to ingestion client * - Remove Change Description from Lineage (#16488) (cherry picked from commit 9e5c5529a84dfc781382b3a3b6abd80ee41f11f5) * - Non Indexable fields should be remvoed at the end (#16499) (cherry picked from commit f0b0f7a9426ca601d3bfee3989d4ce47e732a7af) * fix announcement not redirect from landing page (#16506) * fix announcement not redirect from landing page * minor changes * change in cypress test (cherry picked from commit ee7cddd169a3a1fb1e598e80035c2fc15a5a129b) * Fix Schema Field Null Issue (#16510) (cherry picked from commit 022772943f1b33f6230cb35547d1da6acfaf6cfa) * feat(ui): limits integration with application (#16206) * feat(ui): limits integration with application * support pipelineSchedules via limit api * enforce limit to all the modules * update banner styling * update * support disable option for ManageButton * limit version * fix spotlight * update tests * Add name and version history to resource limits Refactor the getEntityIcon function and add new icon mappings * limit version * hide access token tab * fix version for all the entity * fix tests * fix DQ tests * Add fallback for the icon * Revert the fallback icon changes * Apply the limit to the add ingestion button in the service details page * Fix the data quality tab add test button not working * fix banner styling * minor fix * Fix ingestion component unit test * Add InlineAlert component * update entityNameLabels mapping object * Fix the incorrect link in LimitBanner * update pricing page url * Create the GlobalSettingsClassBase * Update URLs for pricing page and upgrade options * fix global settings uncaught error * add parameters to the resource limit API * implement inline alerts for service and alert creation form * update PRIVILEGES for docker * fix layout issues * fix tests --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> * Add token limitations * Add token limitations * Add appType as part of schema in ingestion pipeline (#16519) * #16489: fix the redirect issue to new tab for tags and glossary (#16512) * fix the redirect issue to new tab for tags and glossary * fix the redirect on cancel icon and unit test issue * changes as per comments (cherry picked from commit 8d312f0853609cfef260739cf789d459838a3421) * Fix #16229 - Tag and Service filters for test cases (#16484) * fix: added test case support for tags (inherit from table/column)]" * feat: add tag and service filter for test cases * feat: add tier query param * fix: tests (cherry picked from commit 6b00dde90285924445567ee7c396c89f0fcf3f1d) * fix: None type is not iterable (#16496) (cherry picked from commit 656da03b14ca24171cf7924b9dd33663e6bed423) * minor(ui): refresh token for OIDC SSO (#16483) * minor(ui): refresh token for OIDC SSO * remove frame window timeout issue * increase iFrame timeout for oidc (cherry picked from commit 1a6c4c972052836a9b3cfa273b7ea1aa3202eafe) * feat(ui): support tag & tier filter for test case (#16502) * feat(ui): support tag & tier filter for test case * fix tag filter * allow single select for tier * added service name filter * update cypress for tags, tier & service * add specific add for filters * fix tier api call (cherry picked from commit 5b71d79e8ac2d08a154882dfe71b9b3a0f73bffc) * minor: sanitize activity feed editor content (#16533) * Add appType as part of schema in ingestion pipeline (#16519) * Fixed quicksight conn (#16537) * fix: saml auth for new user not created (#16543) * fix: saml auth for new user not created * doc: add comment * Fix#16491 - fix lineage edge description update (#16538) * fix lineage edge description update * fix tests (cherry picked from commit dff0aa8dbedcd4064ad63765cadda65bb998772e) * CYPRESS: fix announcement cypress (#16536) * fix announcement cypress * changes as per comments * fix the cypress failure (cherry picked from commit fcb87b5866ba06aa7a6db516677e311c24053db7) * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration [MINOR] Fix Test Failure for EventRegistration * Fix Event Handlers registration Issue (#16544) * Fix Event Handlers Issue * Review Comments (cherry picked from commit d374e48b7938e8ad3514dc5cf8dff619a12595e3) * [MINOR] Fix Test Failure for EventRegistration (cherry picked from commit 4563ad4fd10f9790c21fe744d8fc131ebd028ac8) * Fix Topic Schema missing messageSchema (#16545) (cherry picked from commit b612dd90c07f564d38392b1ccfe0de1505a4867b) * Add limits exception cache in rest client * MINOR: Ignore Cluster Information from columns (#16495) * minor: improve the block editor initial content history (#16540) * Minor: fixed data quality page type issue (#16556) * #16521: fix issue in userProfilePage for roles. teams and displayName (#16527) * fix update on roles and backlink them in user profile page * fix teams, displayName and profile pic issue * sonar fix * fix cypress issue * minor changes (cherry picked from commit 98945cb2db87ebb325d3a72131f049abffcba345) * Empty quick filters (#16402) * initial commit for empty quick filters * update progress * fix field title * cleanup * add tests * unit tests * fix encoding of search query * add cypress tests * add cypress * fix flaky cypress * fix review comments * revert tooltip changes * fix tests * fix tests (cherry picked from commit 5930cd7a7a4bef73f6850848c85118eb64843e2d) * Fix #16278 : Search to display Draft glossaryTerms on Explore page (#16462) * Fix #16278 : Search to display Draft glossaryTerms as well on Explore page * add term status quick filter * change aggregation key for status field * change aggregation key for status field * add lowercase_normalizer in status filed for aggregate api * add cypress tests * fix cypress --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> (cherry picked from commit ae5e9d61cc9e6a39d65972987de9149a421395b1) * [FIX] GlossaryTerm reviewers should be user or team only (#16372) * add teams as reviewer * Check Users to be reviewers * Reviewers can be a team or user * Fix check by id or name * Review can be team or user both * Validate Reviewers * add multi select control * - Fix Reviewers * - Centralize Reviewer Relationship to EntityRepository * - Sort * add team as reviewer for glossary terms * locales * cleanup * - Update Reviewer should remove existing reviewers * fix selectable owner control * fix code smells * fix reviewer issue * add glossary cypress * fix patch issue on reviewers set to null * update cypress tests * fix cypress * fix cypress * fix reviewers in glossary task and supported cypress * fix pytest * Fix * fix cypress * fix code smells * Inherited Reviewers need to be present always * filter out inherited users * fix cypress * fix backend tests failure * fix backend tests failure -checkstyle * restrict owner to accept task in case of reviewer present * fix pytest --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 9ec3d94e3b8445e63a7d77239c92c92a32536bf2) * Add testSuite tags, domain field and check for TestCase limits * fix owner not showing after refersh in teams page (#16567) (cherry picked from commit 119fcf8959732a980b75e1f795a9f2dc5288cd27) * [ISSUE-16503] Fix createUser to use EntityResource (#16549) * Fix createUser to use EntityResource * fix broken tests * Fix Tests - 3 (cherry picked from commit aeb020ae3b0cbab3a2ee5995c61480cdd1eae405) * what's new for 1.4.2 (#16568) (cherry picked from commit c86468d9929e433922886852381269b46d69c832) * address feedbacks * fix error for bots page * update banner text * allow force fetch limit * fix ingestion schedule * Revert "Merge branch '1.4.2' into limits" This reverts commit 8e965207a23ba527d0f5ba91463c1869077bf091, reversing changes made to 4d16531965fb0d489a4afdebd45ab5b7f3d1eb5c. * Merge 1.4.2 (#16578) * fix explore page conflicts * fix tests --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> * fix subheader * Updating glossary reviewers should propagate reviewers in glossary term (#16580) * highlight inherited reviewer in glossary * locales * use glossary name for search query * fix glossary version cypress * add union datatype for subfields * Adding reviewer to glossary also adds them as an assignee to the task * add glossary approval cypress --------- Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 4c8bf1cac14074df87dafe7a719e2795b0a29895) * Update documentation for Search Index apis (#16539) (cherry picked from commit d3123c49143652015c416d271d9fd0f9cfa9e324) * cypress: fixed flakiness and announcment cypress (#16579) * fetch latest limit for create / delete operations * guard datAsset limit got topic, dashboard, mlmodel etc * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (#16589) * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (cherry picked from commit 8723b8c36afe31410c31d1ebbdafe7b1770921fa) * cypress: fixed cypress AUT for mysql (#16446) * cypress: fixed cypress AUT for mysql * minor fix * skip announcment redirection cypress * Minor: Ensure correct index mapping in Elasticsearch for clusterAlias (#16598) (cherry picked from commit 04543722a6f6e2b1eaf7a451ebb1c176862bc346) * Fix Postgres Application listing (#16600) * Fix Postgres Application listing * Fix Listing (cherry picked from commit 77dfe1f6af53d187ff7a61fdb1e1416de7178f5a) * fix limit related issue * Fix Automations limits invalidation during the uninstall * cypress: fixed 1.4.2 AUT cypress (#16602) * cypress: fixed 1.4.2 AUT cypress * fix cypress around announcement,user,glossary, lineage and mydata * searchIndexApplication fix and minor changes --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> * test: add updateJWTTokenExpiryTime util (#16606) (cherry picked from commit 8c173bed6a279cb0a648bd30632ea6ebdf4a2a90) * OSS changes for adding automator cypress tests (#16611) * Fix Test Suite Filter (#16615) Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> (cherry picked from commit 3db41f08e27f388495040e5b23cc7bee5ae665f1) * MINOR: Fix Profiler for SSL Enabled Source (#16613) * Add Test Suite SSL (#16619) * MINOR: Fix ssl connection in usage & lineage (#16625) * Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners (cherry picked from commit cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3) * chore(release): Prepare Branch for `1.4.3` * - Fix User Signup (#16667) (cherry picked from commit b4cba8a850ecd7a25aeff6ca7dea0dc432d43d86) * - Fix User Signup - p2 (cherry picked from commit d9ae6f6db9891f8e9bf7ad49c561a71dd50103da) * - Update What's new (#16669) - fix vulnerability (cherry picked from commit 1dcb1bd46f9da49764f4c61a7ac5048dd2fa956b) * Minor: Fix incorrect alert on signup page (#16666) * Fix Application enforceLimits during install * Wrap the add test button with limits wrapper for column profile tab * fix errors * fix tests * fix pylint * fix tests * fix limits * pylint * fix schedule options * fix glossary spec failure * Add domain & tags to testSuite * Update airflow-apis-tests-3_9.yml --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> Co-authored-by: Pablo Takara <pjt1991@gmail.com> Co-authored-by: Akash-Jain <15995028+akash-jain-10@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Maxim Martynov <martinov_m_s_@mail.ru> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Antoine Balliet <antoine.balliet@gorgias.com> Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:59:25 +05:30
import org.openmetadata.service.limits.DefaultLimits;
import org.openmetadata.service.limits.Limits;
import org.openmetadata.service.mcp.McpServer;
import org.openmetadata.service.mcp.prompts.DefaultPromptsContext;
import org.openmetadata.service.mcp.tools.DefaultToolContext;
import org.openmetadata.service.migration.Migration;
import org.openmetadata.service.migration.MigrationValidationClient;
import org.openmetadata.service.migration.api.MigrationWorkflow;
import org.openmetadata.service.monitoring.EventMonitor;
import org.openmetadata.service.monitoring.EventMonitorConfiguration;
import org.openmetadata.service.monitoring.EventMonitorFactory;
import org.openmetadata.service.monitoring.EventMonitorPublisher;
import org.openmetadata.service.resources.CollectionRegistry;
import org.openmetadata.service.resources.databases.DatasourceConfig;
import org.openmetadata.service.resources.settings.SettingsCache;
Search refactor (#13397) * Refactor Search * Refactor Search * Fix propgation bugs * Fix propgation bugs * Fix glossary term search * Fix glossary term search * Only issue search requests if the client is configured properly * Only issue search requests if the client is configured properly * Fix glossary index * add documentation for sharded tables (#13361) * Cost analysis agg (#13408) * feat: updated DI workflow to inherit from BaseWorkflow + split processor and producer classes * feat: __init__.py files creation * feat: updated workflow import classes in code and doc * feat: moved kpi runner from runner to processor folder * fix: skip failure on list entities * feat: deleted unused files * feat: updated status reporter * feat: ran linting * feat: fix test error with typing and fqn * feat: updated test dependencies * feat: ran linting * feat: move execution order up * feat: updated cost analysis report to align with new workflow * feat: fix entity already exists for pipeline entity status * feat: ran python linting * feat: move skip_on_failure to method * feat: added unusedReport to DI * feat: added aggregated unused report * feat: ran linting * feat: reverted compose file changes --------- Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> * Add Java 17 support (#12895) * Add Java 17 support * Change Test HTTP client provider * Create Tests HTTP Client once * Create Tests HTTP Client once * fix(CI): Update CI to use jdk 17 and dockerfiles as well --------- Co-authored-by: Akash-Jain <Akash.J@deuexsolutions.com> * Refactor Search * Refactor Search * Fix propgation bugs * Fix propgation bugs * Fix glossary term search * Fix glossary term search * Only issue search requests if the client is configured properly * Only issue search requests if the client is configured properly * Fix glossary index * Merge main * fix style * deleted field propagation * Fix style * close the test client * Changing to jersey connector * Fix Authentication Exception headers --------- Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Akash-Jain <Akash.J@deuexsolutions.com>
2023-10-03 14:56:53 -07:00
import org.openmetadata.service.search.SearchRepository;
import org.openmetadata.service.secrets.SecretsManagerFactory;
import org.openmetadata.service.secrets.masker.EntityMaskerFactory;
import org.openmetadata.service.security.AuthCallbackServlet;
import org.openmetadata.service.security.AuthLoginServlet;
import org.openmetadata.service.security.AuthLogoutServlet;
import org.openmetadata.service.security.AuthRefreshServlet;
import org.openmetadata.service.security.AuthenticationCodeFlowHandler;
import org.openmetadata.service.security.Authorizer;
import org.openmetadata.service.security.NoopAuthorizer;
import org.openmetadata.service.security.NoopFilter;
import org.openmetadata.service.security.auth.AuthenticatorHandler;
import org.openmetadata.service.security.auth.BasicAuthenticator;
import org.openmetadata.service.security.auth.LdapAuthenticator;
import org.openmetadata.service.security.auth.NoopAuthenticator;
import org.openmetadata.service.security.jwt.JWTTokenGenerator;
import org.openmetadata.service.security.saml.OMMicrometerHttpFilter;
import org.openmetadata.service.security.saml.SamlAssertionConsumerServlet;
import org.openmetadata.service.security.saml.SamlLoginServlet;
import org.openmetadata.service.security.saml.SamlLogoutServlet;
import org.openmetadata.service.security.saml.SamlMetadataServlet;
import org.openmetadata.service.security.saml.SamlSettingsHolder;
import org.openmetadata.service.security.saml.SamlTokenRefreshServlet;
import org.openmetadata.service.socket.FeedServlet;
import org.openmetadata.service.socket.OpenMetadataAssetServlet;
import org.openmetadata.service.socket.SocketAddressFilter;
import org.openmetadata.service.socket.WebSocketManager;
import org.openmetadata.service.util.CustomParameterNameProvider;
import org.openmetadata.service.util.MicrometerBundleSingleton;
import org.openmetadata.service.util.incidentSeverityClassifier.IncidentSeverityClassifierInterface;
import org.pac4j.core.util.CommonHelper;
Data insight reporting + extras (#11317) * Refactor Data Insight Chart for Reusability * Data Insight Reporting * Add Schedule Info * Add Error Handling * Add Profile Field * Remove Endpoint as required field * Missing Language * Reformat * Remove Task and Test Result Settings * Fix test * fix: typescript errors * fix: send alertType for subscriptions request * feat: add alert data insights report page * Fix test * fix: alert type typescript error * fix: loading flicker on alerts page * chore: add placeholders for data insight report alert page * fix: alert icon styling * fix: confirmation is not showing up for delete operation for subscription. * fix: delete operation is not working from alert details page * fix Activity Feed Errors on update * fix: test * chore: change the description text area to the markdown editor * Data Insight Reporting should be created on system startup * Restrict DataInsight Report to only one * Review Comments * feat: show the default DataInsightReport data * sonar fixes * sonar fixes * deprecate ConfirmationModal * trigger should be updated * feta: add edit flow for data insight report * remove custom option for schedule info * chore: update data insight report icon * test: add unit test for add data insight alert form * fix: update cypress tests * update local message * test: add unit tests * move sql changes to a different file * spacing issues * add tag provider in createRequest * chore: send provider in create and update alert request. * fix: code smells * fix: comment typo * fix: permission issue for event subscription --------- Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
2023-05-08 16:54:45 +05:30
import org.quartz.SchedulerException;
2021-08-01 14:27:44 -07:00
/** Main catalog application */
@Slf4j
@OpenAPIDefinition(
info =
@Info(
title = "OpenMetadata APIs",
version = "1.8.0",
description = "Common types and API definition for OpenMetadata",
contact =
@Contact(
name = "OpenMetadata",
url = "https://open-metadata.org",
email = "openmetadata-dev@googlegroups.com"),
license =
@License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0")),
servers = {
@Server(url = "/api", description = "Current Host"),
@Server(url = "http://localhost:8585/api", description = "Endpoint URL")
},
security = @SecurityRequirement(name = "BearerAuth"))
@SecuritySchemes({
@SecurityScheme(
name = "BearerAuth",
type = SecuritySchemeType.HTTP,
scheme = "bearer",
bearerFormat = "JWT")
})
public class OpenMetadataApplication extends Application<OpenMetadataApplicationConfig> {
2025-05-20 17:26:11 +05:30
protected Authorizer authorizer;
private AuthenticatorHandler authenticatorHandler;
protected Limits limits;
protected Jdbi jdbi;
2021-08-01 14:27:44 -07:00
@Override
public void run(OpenMetadataApplicationConfig catalogConfig, Environment environment)
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException,
NoSuchMethodException,
InvocationTargetException,
IOException,
ConfigurationException,
CertificateException,
KeyStoreException,
NoSuchAlgorithmException {
validateConfiguration(catalogConfig);
// Instantiate incident severity classifier
IncidentSeverityClassifierInterface.createInstance();
// init for dataSourceFactory
DatasourceConfig.initialize(catalogConfig.getDataSourceFactory().getDriverClass());
// Initialize HTTP and JDBI timers
MicrometerBundleSingleton.initLatencyEvents();
jdbi = createAndSetupJDBI(environment, catalogConfig.getDataSourceFactory());
Entity.setCollectionDAO(getDao(jdbi));
Entity.setJobDAO(jdbi.onDemand(JobDAO.class));
2024-11-18 22:37:07 +05:30
Entity.setJdbi(jdbi);
initializeSearchRepository(catalogConfig.getElasticSearchConfiguration());
// Initialize the MigrationValidationClient, used in the Settings Repository
MigrationValidationClient.initialize(jdbi.onDemand(MigrationDAO.class), catalogConfig);
// as first step register all the repositories
Entity.initializeRepositories(catalogConfig, jdbi);
// Configure the Fernet instance
Fernet.getInstance().setFernetKey(catalogConfig);
2024-12-15 01:16:55 +05:30
// Initialize Workflow Handler
WorkflowHandler.initialize(catalogConfig);
// Init Settings Cache after repositories
SettingsCache.initialize(catalogConfig);
initializeWebsockets(catalogConfig, environment);
// init Secret Manager
SecretsManagerFactory.createSecretsManager(
catalogConfig.getSecretsManagerConfiguration(), catalogConfig.getClusterName());
// init Entity Masker
EntityMaskerFactory.createEntityMasker();
// Instantiate JWT Token Generator
JWTTokenGenerator.getInstance()
.init(
catalogConfig.getAuthenticationConfiguration().getTokenValidationAlgorithm(),
catalogConfig.getJwtTokenConfiguration());
// Set the Database type for choosing correct queries from annotations
jdbi.getConfig(SqlObjects.class)
.setSqlLocator(
new ConnectionAwareAnnotationSqlLocator(
catalogConfig.getDataSourceFactory().getDriverClass()));
// Configure validator to use simple message interpolation
environment.setValidator(
Validation.byDefaultProvider()
.configure()
.parameterNameProvider(new CustomParameterNameProvider())
.messageInterpolator(
new ResourceBundleMessageInterpolator(
new PlatformResourceBundleLocator("jakarta.validation.ValidationMessages")))
.buildValidatorFactory()
.getValidator());
// Validate flyway Migrations
validateMigrations(jdbi, catalogConfig);
2021-08-01 14:27:44 -07:00
// Register Authorizer
registerAuthorizer(catalogConfig, environment);
2021-08-01 14:27:44 -07:00
// Register Authenticator
2022-12-16 16:14:40 -08:00
registerAuthenticator(catalogConfig);
Pluggable API/Features Limits (#16782) * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits: add entity resource enforcer * Limits: fix rebase * update limits enforcement * Add OperationContext to limits * chore: Bump versions to `1.4.0` * chore: Bump Ingestion Versions to `1.4.0.1` for Release * chore: Bump Ingestion Versions to `1.4.0.1` in Dockerfiles for Release * Remove Retry From Abstract Event Consumer (#16405) (cherry picked from commit f8ed079731cc238dc136306fe018c5df35dd2f3b) * Fix Migrations: Add postgres migrations (#16403) (cherry picked from commit 9416a7ac5fa8fd9695063b108501790d813e8e6e) * Add Null Check for isAdmin (#16407) * Remove Retry From Abstract Event Consumer * - Add Check for null Or Empty in isAdmin * - Fix Test (cherry picked from commit fe2db2d63c5495b6c288d4252a19ab77481b6de0) * Fix OpenLineage ingestor (#16416) * Fix OpenLineage ingestor * py format --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com> * Minor: added whats new for 1.4.1 (#16420) * Minor: added whats new for 1.4.1 * added note in to whats new * Fix SSL issue (#16412) * chore: Bump Versions for `1.4.1` Release * chore(release): Prepare Branch for `1.4.2` * [MINOR] partition migration issue with redshift servics (#16452) * fix: partition migration issue with redshift servics * chore: typo in sql comment (cherry picked from commit 451d73593e813151c24f2c1d17efb3dcdebb71c8) * minor(ui): update what's new for 1.4.2 (#16457) (cherry picked from commit d55981adfd2321de706e4a043828bb473a4b05f1) * fix: ingestion for dbt > 1.8.0 resource_type is not an enum (#16415) * fix: resource_type is not an enum * feat: add log to display finis * improve readability * use getattr to be compatible * format * Add Cache Query Param for Limits * Only Parse view query (#16470) * add limit check during user creation via PUT * add limit check during user creation via PUT * MINOR: Kafka Setup SSL Arg Fix (#16469) * Fix#16404 - Show Node level lineage by default (#16445) * default to node layer * update cypress * code cleanup * fix cypress (cherry picked from commit f0cda8464f34a21f45f18fa557e980fb2f105d8e) * Invalidate count of data asset after hard delete. add limit exception to ingestion client * - Remove Change Description from Lineage (#16488) (cherry picked from commit 9e5c5529a84dfc781382b3a3b6abd80ee41f11f5) * - Non Indexable fields should be remvoed at the end (#16499) (cherry picked from commit f0b0f7a9426ca601d3bfee3989d4ce47e732a7af) * fix announcement not redirect from landing page (#16506) * fix announcement not redirect from landing page * minor changes * change in cypress test (cherry picked from commit ee7cddd169a3a1fb1e598e80035c2fc15a5a129b) * Fix Schema Field Null Issue (#16510) (cherry picked from commit 022772943f1b33f6230cb35547d1da6acfaf6cfa) * feat(ui): limits integration with application (#16206) * feat(ui): limits integration with application * support pipelineSchedules via limit api * enforce limit to all the modules * update banner styling * update * support disable option for ManageButton * limit version * fix spotlight * update tests * Add name and version history to resource limits Refactor the getEntityIcon function and add new icon mappings * limit version * hide access token tab * fix version for all the entity * fix tests * fix DQ tests * Add fallback for the icon * Revert the fallback icon changes * Apply the limit to the add ingestion button in the service details page * Fix the data quality tab add test button not working * fix banner styling * minor fix * Fix ingestion component unit test * Add InlineAlert component * update entityNameLabels mapping object * Fix the incorrect link in LimitBanner * update pricing page url * Create the GlobalSettingsClassBase * Update URLs for pricing page and upgrade options * fix global settings uncaught error * add parameters to the resource limit API * implement inline alerts for service and alert creation form * update PRIVILEGES for docker * fix layout issues * fix tests --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> * Add token limitations * Add token limitations * Add appType as part of schema in ingestion pipeline (#16519) * #16489: fix the redirect issue to new tab for tags and glossary (#16512) * fix the redirect issue to new tab for tags and glossary * fix the redirect on cancel icon and unit test issue * changes as per comments (cherry picked from commit 8d312f0853609cfef260739cf789d459838a3421) * Fix #16229 - Tag and Service filters for test cases (#16484) * fix: added test case support for tags (inherit from table/column)]" * feat: add tag and service filter for test cases * feat: add tier query param * fix: tests (cherry picked from commit 6b00dde90285924445567ee7c396c89f0fcf3f1d) * fix: None type is not iterable (#16496) (cherry picked from commit 656da03b14ca24171cf7924b9dd33663e6bed423) * minor(ui): refresh token for OIDC SSO (#16483) * minor(ui): refresh token for OIDC SSO * remove frame window timeout issue * increase iFrame timeout for oidc (cherry picked from commit 1a6c4c972052836a9b3cfa273b7ea1aa3202eafe) * feat(ui): support tag & tier filter for test case (#16502) * feat(ui): support tag & tier filter for test case * fix tag filter * allow single select for tier * added service name filter * update cypress for tags, tier & service * add specific add for filters * fix tier api call (cherry picked from commit 5b71d79e8ac2d08a154882dfe71b9b3a0f73bffc) * minor: sanitize activity feed editor content (#16533) * Add appType as part of schema in ingestion pipeline (#16519) * Fixed quicksight conn (#16537) * fix: saml auth for new user not created (#16543) * fix: saml auth for new user not created * doc: add comment * Fix#16491 - fix lineage edge description update (#16538) * fix lineage edge description update * fix tests (cherry picked from commit dff0aa8dbedcd4064ad63765cadda65bb998772e) * CYPRESS: fix announcement cypress (#16536) * fix announcement cypress * changes as per comments * fix the cypress failure (cherry picked from commit fcb87b5866ba06aa7a6db516677e311c24053db7) * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration [MINOR] Fix Test Failure for EventRegistration * Fix Event Handlers registration Issue (#16544) * Fix Event Handlers Issue * Review Comments (cherry picked from commit d374e48b7938e8ad3514dc5cf8dff619a12595e3) * [MINOR] Fix Test Failure for EventRegistration (cherry picked from commit 4563ad4fd10f9790c21fe744d8fc131ebd028ac8) * Fix Topic Schema missing messageSchema (#16545) (cherry picked from commit b612dd90c07f564d38392b1ccfe0de1505a4867b) * Add limits exception cache in rest client * MINOR: Ignore Cluster Information from columns (#16495) * minor: improve the block editor initial content history (#16540) * Minor: fixed data quality page type issue (#16556) * #16521: fix issue in userProfilePage for roles. teams and displayName (#16527) * fix update on roles and backlink them in user profile page * fix teams, displayName and profile pic issue * sonar fix * fix cypress issue * minor changes (cherry picked from commit 98945cb2db87ebb325d3a72131f049abffcba345) * Empty quick filters (#16402) * initial commit for empty quick filters * update progress * fix field title * cleanup * add tests * unit tests * fix encoding of search query * add cypress tests * add cypress * fix flaky cypress * fix review comments * revert tooltip changes * fix tests * fix tests (cherry picked from commit 5930cd7a7a4bef73f6850848c85118eb64843e2d) * Fix #16278 : Search to display Draft glossaryTerms on Explore page (#16462) * Fix #16278 : Search to display Draft glossaryTerms as well on Explore page * add term status quick filter * change aggregation key for status field * change aggregation key for status field * add lowercase_normalizer in status filed for aggregate api * add cypress tests * fix cypress --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> (cherry picked from commit ae5e9d61cc9e6a39d65972987de9149a421395b1) * [FIX] GlossaryTerm reviewers should be user or team only (#16372) * add teams as reviewer * Check Users to be reviewers * Reviewers can be a team or user * Fix check by id or name * Review can be team or user both * Validate Reviewers * add multi select control * - Fix Reviewers * - Centralize Reviewer Relationship to EntityRepository * - Sort * add team as reviewer for glossary terms * locales * cleanup * - Update Reviewer should remove existing reviewers * fix selectable owner control * fix code smells * fix reviewer issue * add glossary cypress * fix patch issue on reviewers set to null * update cypress tests * fix cypress * fix cypress * fix reviewers in glossary task and supported cypress * fix pytest * Fix * fix cypress * fix code smells * Inherited Reviewers need to be present always * filter out inherited users * fix cypress * fix backend tests failure * fix backend tests failure -checkstyle * restrict owner to accept task in case of reviewer present * fix pytest --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 9ec3d94e3b8445e63a7d77239c92c92a32536bf2) * Add testSuite tags, domain field and check for TestCase limits * fix owner not showing after refersh in teams page (#16567) (cherry picked from commit 119fcf8959732a980b75e1f795a9f2dc5288cd27) * [ISSUE-16503] Fix createUser to use EntityResource (#16549) * Fix createUser to use EntityResource * fix broken tests * Fix Tests - 3 (cherry picked from commit aeb020ae3b0cbab3a2ee5995c61480cdd1eae405) * what's new for 1.4.2 (#16568) (cherry picked from commit c86468d9929e433922886852381269b46d69c832) * address feedbacks * fix error for bots page * update banner text * allow force fetch limit * fix ingestion schedule * Revert "Merge branch '1.4.2' into limits" This reverts commit 8e965207a23ba527d0f5ba91463c1869077bf091, reversing changes made to 4d16531965fb0d489a4afdebd45ab5b7f3d1eb5c. * Merge 1.4.2 (#16578) * fix explore page conflicts * fix tests --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> * fix subheader * Updating glossary reviewers should propagate reviewers in glossary term (#16580) * highlight inherited reviewer in glossary * locales * use glossary name for search query * fix glossary version cypress * add union datatype for subfields * Adding reviewer to glossary also adds them as an assignee to the task * add glossary approval cypress --------- Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 4c8bf1cac14074df87dafe7a719e2795b0a29895) * Update documentation for Search Index apis (#16539) (cherry picked from commit d3123c49143652015c416d271d9fd0f9cfa9e324) * cypress: fixed flakiness and announcment cypress (#16579) * fetch latest limit for create / delete operations * guard datAsset limit got topic, dashboard, mlmodel etc * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (#16589) * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (cherry picked from commit 8723b8c36afe31410c31d1ebbdafe7b1770921fa) * cypress: fixed cypress AUT for mysql (#16446) * cypress: fixed cypress AUT for mysql * minor fix * skip announcment redirection cypress * Minor: Ensure correct index mapping in Elasticsearch for clusterAlias (#16598) (cherry picked from commit 04543722a6f6e2b1eaf7a451ebb1c176862bc346) * Fix Postgres Application listing (#16600) * Fix Postgres Application listing * Fix Listing (cherry picked from commit 77dfe1f6af53d187ff7a61fdb1e1416de7178f5a) * fix limit related issue * Fix Automations limits invalidation during the uninstall * cypress: fixed 1.4.2 AUT cypress (#16602) * cypress: fixed 1.4.2 AUT cypress * fix cypress around announcement,user,glossary, lineage and mydata * searchIndexApplication fix and minor changes --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> * test: add updateJWTTokenExpiryTime util (#16606) (cherry picked from commit 8c173bed6a279cb0a648bd30632ea6ebdf4a2a90) * OSS changes for adding automator cypress tests (#16611) * Fix Test Suite Filter (#16615) Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> (cherry picked from commit 3db41f08e27f388495040e5b23cc7bee5ae665f1) * MINOR: Fix Profiler for SSL Enabled Source (#16613) * Add Test Suite SSL (#16619) * MINOR: Fix ssl connection in usage & lineage (#16625) * Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners (cherry picked from commit cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3) * chore(release): Prepare Branch for `1.4.3` * - Fix User Signup (#16667) (cherry picked from commit b4cba8a850ecd7a25aeff6ca7dea0dc432d43d86) * - Fix User Signup - p2 (cherry picked from commit d9ae6f6db9891f8e9bf7ad49c561a71dd50103da) * - Update What's new (#16669) - fix vulnerability (cherry picked from commit 1dcb1bd46f9da49764f4c61a7ac5048dd2fa956b) * Minor: Fix incorrect alert on signup page (#16666) * Fix Application enforceLimits during install * Wrap the add test button with limits wrapper for column profile tab * fix errors * fix tests * fix pylint * fix tests * fix limits * pylint * fix schedule options * fix glossary spec failure * Add domain & tags to testSuite * Update airflow-apis-tests-3_9.yml --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> Co-authored-by: Pablo Takara <pjt1991@gmail.com> Co-authored-by: Akash-Jain <15995028+akash-jain-10@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Maxim Martynov <martinov_m_s_@mail.ru> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Antoine Balliet <antoine.balliet@gorgias.com> Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:59:25 +05:30
// Register Limits
registerLimits(catalogConfig);
2021-08-01 14:27:44 -07:00
// Unregister dropwizard default exception mappers
((DefaultServerFactory) catalogConfig.getServerFactory())
.setRegisterDefaultExceptionMappers(false);
environment.jersey().property(ServerProperties.RESPONSE_SET_STATUS_OVER_SEND_ERROR, true);
2021-08-01 14:27:44 -07:00
environment.jersey().register(MultiPartFeature.class);
// Exception Mappers
registerExceptionMappers(environment);
// Health Check
registerHealthCheck(environment);
2021-08-01 14:27:44 -07:00
// start event hub before registering publishers
EventPubSub.start();
ApplicationHandler.initialize(catalogConfig);
registerResources(catalogConfig, environment, jdbi);
2021-08-03 22:40:42 -07:00
// Register Event Handler
registerEventFilter(catalogConfig, environment);
environment.lifecycle().manage(new ManagedShutdown());
JobHandlerRegistry registry = getJobHandlerRegistry();
environment
.lifecycle()
.manage(new GenericBackgroundWorker(jdbi.onDemand(JobDAO.class), registry));
// Register Event publishers
registerEventPublisher(catalogConfig);
// start authorizer after event publishers
// authorizer creates admin/bot users, ES publisher should start before to index users created
// by authorizer
authorizer.init(catalogConfig);
// authenticationHandler Handles auth related activities
authenticatorHandler.init(catalogConfig);
registerMicrometerFilter(environment, catalogConfig.getEventMonitorConfiguration());
registerSamlServlets(catalogConfig, environment);
// Asset Servlet Registration
registerAssetServlet(catalogConfig, catalogConfig.getWebConfiguration(), environment);
// Register MCP
registerMCPServer(catalogConfig, environment);
// Handle Services Jobs
registerHealthCheckJobs(catalogConfig);
// Register Auth Handlers
registerAuthServlets(catalogConfig, environment);
}
protected void registerMCPServer(
OpenMetadataApplicationConfig catalogConfig, Environment environment) {
try {
if (ApplicationContext.getInstance().getAppIfExists("McpApplication") != null) {
McpServer mcpServer = new McpServer(new DefaultToolContext(), new DefaultPromptsContext());
mcpServer.initializeMcpServer(environment, authorizer, limits, catalogConfig);
}
} catch (Exception ex) {
LOG.error("Error initializing MCP server", ex);
}
}
protected @NotNull JobHandlerRegistry getJobHandlerRegistry() {
JobHandlerRegistry registry = new JobHandlerRegistry();
registry.register("EnumCleanupHandler", new EnumCleanupHandler(getDao(jdbi)));
return registry;
}
private void registerHealthCheckJobs(OpenMetadataApplicationConfig catalogConfig) {
ServicesStatusJobHandler healthCheckStatusHandler =
ServicesStatusJobHandler.create(
catalogConfig.getEventMonitorConfiguration(),
catalogConfig.getPipelineServiceClientConfiguration(),
catalogConfig.getClusterName());
healthCheckStatusHandler.addPipelineServiceStatusJob();
healthCheckStatusHandler.addDatabaseAndSearchStatusJobs();
}
private void registerAuthServlets(OpenMetadataApplicationConfig config, Environment environment) {
if (config.getAuthenticationConfiguration() != null
&& config
.getAuthenticationConfiguration()
.getClientType()
.equals(ClientType.CONFIDENTIAL)) {
CommonHelper.assertNotNull(
"OidcConfiguration", config.getAuthenticationConfiguration().getOidcConfiguration());
// Set up a Session Manager
MutableServletContextHandler contextHandler = environment.getApplicationContext();
if (contextHandler.getSessionHandler() == null) {
contextHandler.setSessionHandler(new SessionHandler());
}
AuthenticationCodeFlowHandler authenticationCodeFlowHandler =
new AuthenticationCodeFlowHandler(
config.getAuthenticationConfiguration(), config.getAuthorizerConfiguration());
// Register Servlets
ServletHolder authLoginHolder =
new ServletHolder(new AuthLoginServlet(authenticationCodeFlowHandler));
authLoginHolder.setName("oauth_login");
environment.getApplicationContext().addServlet(authLoginHolder, "/api/v1/auth/login");
ServletHolder authCallbackHolder =
new ServletHolder(new AuthCallbackServlet(authenticationCodeFlowHandler));
authCallbackHolder.setName("auth_callback");
environment.getApplicationContext().addServlet(authCallbackHolder, "/callback");
ServletHolder authLogoutHolder =
new ServletHolder(new AuthLogoutServlet(authenticationCodeFlowHandler));
authLogoutHolder.setName("auth_logout");
environment.getApplicationContext().addServlet(authLogoutHolder, "/api/v1/auth/logout");
ServletHolder refreshHolder =
new ServletHolder(new AuthRefreshServlet(authenticationCodeFlowHandler));
refreshHolder.setName("auth_refresh");
environment.getApplicationContext().addServlet(refreshHolder, "/api/v1/auth/refresh");
}
}
protected void initializeSearchRepository(ElasticSearchConfiguration esConfig) {
// initialize Search Repository, all repositories use SearchRepository this line should always
// before initializing repository
SearchRepository searchRepository = new SearchRepository(esConfig);
Entity.setSearchRepository(searchRepository);
}
private void registerHealthCheck(Environment environment) {
environment
.healthChecks()
.register("OpenMetadataServerHealthCheck", new OpenMetadataServerHealthCheck());
}
private void registerExceptionMappers(Environment environment) {
environment.jersey().register(CatalogGenericExceptionMapper.class);
// Override constraint violation mapper to catch Json validation errors
environment.jersey().register(new ConstraintViolationExceptionMapper());
// Restore dropwizard default exception mappers
environment.jersey().register(new LoggingExceptionMapper<>() {});
environment.jersey().register(new JsonProcessingExceptionMapper(true));
environment.jersey().register(new EarlyEofExceptionMapper());
environment.jersey().register(JsonMappingExceptionMapper.class);
}
private void registerMicrometerFilter(
Environment environment, EventMonitorConfiguration eventMonitorConfiguration) {
FilterRegistration.Dynamic micrometerFilter =
environment.servlets().addFilter("OMMicrometerHttpFilter", OMMicrometerHttpFilter.class);
micrometerFilter.addMappingForUrlPatterns(
EnumSet.allOf(DispatcherType.class), true, eventMonitorConfiguration.getPathPattern());
}
private void registerAssetServlet(
OpenMetadataApplicationConfig config,
OMWebConfiguration webConfiguration,
Environment environment) {
// Handle Asset Using Servlet
OpenMetadataAssetServlet assetServlet =
new OpenMetadataAssetServlet(
config.getBasePath(), "/assets", "/", "index.html", webConfiguration);
environment.servlets().addServlet("static", assetServlet).addMapping("/*");
}
protected CollectionDAO getDao(Jdbi jdbi) {
return jdbi.onDemand(CollectionDAO.class);
}
private void registerSamlServlets(
OpenMetadataApplicationConfig catalogConfig, Environment environment)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
if (catalogConfig.getAuthenticationConfiguration() != null
&& catalogConfig.getAuthenticationConfiguration().getProvider().equals(AuthProvider.SAML)) {
// Ensure we have a session handler
MutableServletContextHandler contextHandler = environment.getApplicationContext();
if (contextHandler.getSessionHandler() == null) {
contextHandler.setSessionHandler(new SessionHandler());
}
// Initialize default SAML settings (e.g. IDP metadata, SP keys, etc.)
SamlSettingsHolder.getInstance().initDefaultSettings(catalogConfig);
ServletRegistration.Dynamic samlRedirectServlet =
environment.servlets().addServlet("saml_login", new SamlLoginServlet());
samlRedirectServlet.addMapping("/api/v1/saml/login");
ServletRegistration.Dynamic samlReceiverServlet =
environment
.servlets()
.addServlet(
"saml_acs",
new SamlAssertionConsumerServlet(catalogConfig.getAuthorizerConfiguration()));
samlReceiverServlet.addMapping("/api/v1/saml/acs");
ServletRegistration.Dynamic samlMetadataServlet =
environment.servlets().addServlet("saml_metadata", new SamlMetadataServlet());
samlMetadataServlet.addMapping("/api/v1/saml/metadata");
// 1) SAML Login
ServletHolder samlLoginHolder = new ServletHolder();
samlLoginHolder.setName("saml_login");
samlLoginHolder.setServlet(new SamlLoginServlet());
contextHandler.addServlet(samlLoginHolder, "/api/v1/saml/login");
// 2) SAML Assertion Consumer (ACS)
ServletHolder samlAcsHolder = new ServletHolder();
samlAcsHolder.setName("saml_acs");
samlAcsHolder.setServlet(
new SamlAssertionConsumerServlet(catalogConfig.getAuthorizerConfiguration()));
contextHandler.addServlet(samlAcsHolder, "/api/v1/saml/acs");
// 3) SAML Metadata
ServletHolder samlMetadataHolder = new ServletHolder();
samlMetadataHolder.setName("saml_metadata");
samlMetadataHolder.setServlet(new SamlMetadataServlet());
contextHandler.addServlet(samlMetadataHolder, "/api/v1/saml/metadata");
// 4) SAML Token Refresh
ServletHolder samlRefreshHolder = new ServletHolder();
samlRefreshHolder.setName("saml_refresh_token");
samlRefreshHolder.setServlet(new SamlTokenRefreshServlet());
contextHandler.addServlet(samlRefreshHolder, "/api/v1/saml/refresh");
// 5) SAML Logout
ServletHolder samlLogoutHolder = new ServletHolder();
samlLogoutHolder.setName("saml_logout_token");
samlLogoutHolder.setServlet(
new SamlLogoutServlet(
catalogConfig.getAuthenticationConfiguration(),
catalogConfig.getAuthorizerConfiguration()));
contextHandler.addServlet(samlLogoutHolder, "/api/v1/saml/logout");
}
}
2021-08-01 14:27:44 -07:00
@SneakyThrows
@Override
public void initialize(Bootstrap<OpenMetadataApplicationConfig> bootstrap) {
bootstrap.setConfigurationSourceProvider(
new SubstitutingSourceProvider(
bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
// Register custom filter factories
bootstrap
.getObjectMapper()
.registerSubtypes(
org.openmetadata.service.events.AuditOnlyFilterFactory.class,
org.openmetadata.service.events.AuditExcludeFilterFactory.class);
bootstrap.addBundle(
new SwaggerBundle<>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
OpenMetadataApplicationConfig catalogConfig) {
return catalogConfig.getSwaggerBundleConfig();
}
});
bootstrap.addBundle(
new OMWebBundle<>() {
@Override
public OMWebConfiguration getWebConfiguration(
final OpenMetadataApplicationConfig configuration) {
return configuration.getWebConfiguration();
}
});
2021-08-01 14:27:44 -07:00
super.initialize(bootstrap);
}
private void validateMigrations(Jdbi jdbi, OpenMetadataApplicationConfig conf)
throws IOException {
LOG.info("Validating Flyway migrations");
Optional<String> lastMigrated = Migration.lastMigrated(jdbi);
String maxMigration = Migration.lastMigrationFile(conf.getMigrationConfiguration());
if (lastMigrated.isEmpty()) {
throw new IllegalStateException(
"Could not validate Flyway migrations in the database. Make sure you have run `./bootstrap/openmetadata-ops.sh migrate` at least once.");
}
if (lastMigrated.get().compareTo(maxMigration) < 0) {
throw new IllegalStateException(
"There are pending migrations to be run on the database."
+ " Please backup your data and run `./bootstrap/openmetadata-ops.sh migrate`."
+ " You can find more information on upgrading OpenMetadata at"
+ " https://docs.open-metadata.org/deployment/upgrade ");
}
2023-07-03 20:15:13 +05:30
LOG.info("Validating native migrations");
ConnectionType connectionType =
ConnectionType.from(conf.getDataSourceFactory().getDriverClass());
MigrationWorkflow migrationWorkflow =
new MigrationWorkflow(
jdbi,
conf.getMigrationConfiguration().getNativePath(),
connectionType,
conf.getMigrationConfiguration().getExtensionPath(),
conf,
false);
migrationWorkflow.loadMigrations();
migrationWorkflow.validateMigrationsForServer();
}
private void validateConfiguration(OpenMetadataApplicationConfig catalogConfig)
throws ConfigurationException {
if (catalogConfig.getAuthorizerConfiguration().getBotPrincipals() != null) {
throw new ConfigurationException(
"'botPrincipals' configuration is deprecated. Please remove it from "
+ "'openmetadata.yaml and restart the server");
}
if (catalogConfig.getPipelineServiceClientConfiguration().getAuthConfig() != null) {
LOG.warn(
"'authProvider' and 'authConfig' from the 'pipelineServiceClientConfiguration' option are deprecated and will be removed in future releases.");
}
}
private void registerAuthorizer(
OpenMetadataApplicationConfig catalogConfig, Environment environment)
throws NoSuchMethodException,
ClassNotFoundException,
IllegalAccessException,
InvocationTargetException,
InstantiationException {
2021-08-01 14:27:44 -07:00
AuthorizerConfiguration authorizerConf = catalogConfig.getAuthorizerConfiguration();
AuthenticationConfiguration authenticationConfiguration =
catalogConfig.getAuthenticationConfiguration();
// to authenticate request while opening websocket connections
2021-08-01 14:27:44 -07:00
if (authorizerConf != null) {
authorizer =
Class.forName(authorizerConf.getClassName())
.asSubclass(Authorizer.class)
.getConstructor()
.newInstance();
2021-08-01 14:27:44 -07:00
String filterClazzName = authorizerConf.getContainerRequestFilter();
ContainerRequestFilter filter;
if (!StringUtils.isEmpty(filterClazzName)) {
filter =
Class.forName(filterClazzName)
.asSubclass(ContainerRequestFilter.class)
.getConstructor(AuthenticationConfiguration.class, AuthorizerConfiguration.class)
.newInstance(authenticationConfiguration, authorizerConf);
LOG.info("Registering ContainerRequestFilter: {}", filter.getClass().getCanonicalName());
environment.jersey().register(filter);
2021-08-01 14:27:44 -07:00
}
} else {
LOG.info("Authorizer config not set, setting noop authorizer");
authorizer = new NoopAuthorizer();
ContainerRequestFilter filter = new NoopFilter(authenticationConfiguration, null);
2021-08-01 14:27:44 -07:00
environment.jersey().register(filter);
}
}
2022-12-16 16:14:40 -08:00
private void registerAuthenticator(OpenMetadataApplicationConfig catalogConfig) {
AuthenticationConfiguration authenticationConfiguration =
catalogConfig.getAuthenticationConfiguration();
switch (authenticationConfiguration.getProvider()) {
case BASIC -> authenticatorHandler = new BasicAuthenticator();
case LDAP -> authenticatorHandler = new LdapAuthenticator();
default ->
// For all other types, google, okta etc. auth is handled externally
authenticatorHandler = new NoopAuthenticator();
}
}
Pluggable API/Features Limits (#16782) * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits: add entity resource enforcer * Limits: fix rebase * update limits enforcement * Add OperationContext to limits * chore: Bump versions to `1.4.0` * chore: Bump Ingestion Versions to `1.4.0.1` for Release * chore: Bump Ingestion Versions to `1.4.0.1` in Dockerfiles for Release * Remove Retry From Abstract Event Consumer (#16405) (cherry picked from commit f8ed079731cc238dc136306fe018c5df35dd2f3b) * Fix Migrations: Add postgres migrations (#16403) (cherry picked from commit 9416a7ac5fa8fd9695063b108501790d813e8e6e) * Add Null Check for isAdmin (#16407) * Remove Retry From Abstract Event Consumer * - Add Check for null Or Empty in isAdmin * - Fix Test (cherry picked from commit fe2db2d63c5495b6c288d4252a19ab77481b6de0) * Fix OpenLineage ingestor (#16416) * Fix OpenLineage ingestor * py format --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com> * Minor: added whats new for 1.4.1 (#16420) * Minor: added whats new for 1.4.1 * added note in to whats new * Fix SSL issue (#16412) * chore: Bump Versions for `1.4.1` Release * chore(release): Prepare Branch for `1.4.2` * [MINOR] partition migration issue with redshift servics (#16452) * fix: partition migration issue with redshift servics * chore: typo in sql comment (cherry picked from commit 451d73593e813151c24f2c1d17efb3dcdebb71c8) * minor(ui): update what's new for 1.4.2 (#16457) (cherry picked from commit d55981adfd2321de706e4a043828bb473a4b05f1) * fix: ingestion for dbt > 1.8.0 resource_type is not an enum (#16415) * fix: resource_type is not an enum * feat: add log to display finis * improve readability * use getattr to be compatible * format * Add Cache Query Param for Limits * Only Parse view query (#16470) * add limit check during user creation via PUT * add limit check during user creation via PUT * MINOR: Kafka Setup SSL Arg Fix (#16469) * Fix#16404 - Show Node level lineage by default (#16445) * default to node layer * update cypress * code cleanup * fix cypress (cherry picked from commit f0cda8464f34a21f45f18fa557e980fb2f105d8e) * Invalidate count of data asset after hard delete. add limit exception to ingestion client * - Remove Change Description from Lineage (#16488) (cherry picked from commit 9e5c5529a84dfc781382b3a3b6abd80ee41f11f5) * - Non Indexable fields should be remvoed at the end (#16499) (cherry picked from commit f0b0f7a9426ca601d3bfee3989d4ce47e732a7af) * fix announcement not redirect from landing page (#16506) * fix announcement not redirect from landing page * minor changes * change in cypress test (cherry picked from commit ee7cddd169a3a1fb1e598e80035c2fc15a5a129b) * Fix Schema Field Null Issue (#16510) (cherry picked from commit 022772943f1b33f6230cb35547d1da6acfaf6cfa) * feat(ui): limits integration with application (#16206) * feat(ui): limits integration with application * support pipelineSchedules via limit api * enforce limit to all the modules * update banner styling * update * support disable option for ManageButton * limit version * fix spotlight * update tests * Add name and version history to resource limits Refactor the getEntityIcon function and add new icon mappings * limit version * hide access token tab * fix version for all the entity * fix tests * fix DQ tests * Add fallback for the icon * Revert the fallback icon changes * Apply the limit to the add ingestion button in the service details page * Fix the data quality tab add test button not working * fix banner styling * minor fix * Fix ingestion component unit test * Add InlineAlert component * update entityNameLabels mapping object * Fix the incorrect link in LimitBanner * update pricing page url * Create the GlobalSettingsClassBase * Update URLs for pricing page and upgrade options * fix global settings uncaught error * add parameters to the resource limit API * implement inline alerts for service and alert creation form * update PRIVILEGES for docker * fix layout issues * fix tests --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> * Add token limitations * Add token limitations * Add appType as part of schema in ingestion pipeline (#16519) * #16489: fix the redirect issue to new tab for tags and glossary (#16512) * fix the redirect issue to new tab for tags and glossary * fix the redirect on cancel icon and unit test issue * changes as per comments (cherry picked from commit 8d312f0853609cfef260739cf789d459838a3421) * Fix #16229 - Tag and Service filters for test cases (#16484) * fix: added test case support for tags (inherit from table/column)]" * feat: add tag and service filter for test cases * feat: add tier query param * fix: tests (cherry picked from commit 6b00dde90285924445567ee7c396c89f0fcf3f1d) * fix: None type is not iterable (#16496) (cherry picked from commit 656da03b14ca24171cf7924b9dd33663e6bed423) * minor(ui): refresh token for OIDC SSO (#16483) * minor(ui): refresh token for OIDC SSO * remove frame window timeout issue * increase iFrame timeout for oidc (cherry picked from commit 1a6c4c972052836a9b3cfa273b7ea1aa3202eafe) * feat(ui): support tag & tier filter for test case (#16502) * feat(ui): support tag & tier filter for test case * fix tag filter * allow single select for tier * added service name filter * update cypress for tags, tier & service * add specific add for filters * fix tier api call (cherry picked from commit 5b71d79e8ac2d08a154882dfe71b9b3a0f73bffc) * minor: sanitize activity feed editor content (#16533) * Add appType as part of schema in ingestion pipeline (#16519) * Fixed quicksight conn (#16537) * fix: saml auth for new user not created (#16543) * fix: saml auth for new user not created * doc: add comment * Fix#16491 - fix lineage edge description update (#16538) * fix lineage edge description update * fix tests (cherry picked from commit dff0aa8dbedcd4064ad63765cadda65bb998772e) * CYPRESS: fix announcement cypress (#16536) * fix announcement cypress * changes as per comments * fix the cypress failure (cherry picked from commit fcb87b5866ba06aa7a6db516677e311c24053db7) * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration [MINOR] Fix Test Failure for EventRegistration * Fix Event Handlers registration Issue (#16544) * Fix Event Handlers Issue * Review Comments (cherry picked from commit d374e48b7938e8ad3514dc5cf8dff619a12595e3) * [MINOR] Fix Test Failure for EventRegistration (cherry picked from commit 4563ad4fd10f9790c21fe744d8fc131ebd028ac8) * Fix Topic Schema missing messageSchema (#16545) (cherry picked from commit b612dd90c07f564d38392b1ccfe0de1505a4867b) * Add limits exception cache in rest client * MINOR: Ignore Cluster Information from columns (#16495) * minor: improve the block editor initial content history (#16540) * Minor: fixed data quality page type issue (#16556) * #16521: fix issue in userProfilePage for roles. teams and displayName (#16527) * fix update on roles and backlink them in user profile page * fix teams, displayName and profile pic issue * sonar fix * fix cypress issue * minor changes (cherry picked from commit 98945cb2db87ebb325d3a72131f049abffcba345) * Empty quick filters (#16402) * initial commit for empty quick filters * update progress * fix field title * cleanup * add tests * unit tests * fix encoding of search query * add cypress tests * add cypress * fix flaky cypress * fix review comments * revert tooltip changes * fix tests * fix tests (cherry picked from commit 5930cd7a7a4bef73f6850848c85118eb64843e2d) * Fix #16278 : Search to display Draft glossaryTerms on Explore page (#16462) * Fix #16278 : Search to display Draft glossaryTerms as well on Explore page * add term status quick filter * change aggregation key for status field * change aggregation key for status field * add lowercase_normalizer in status filed for aggregate api * add cypress tests * fix cypress --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> (cherry picked from commit ae5e9d61cc9e6a39d65972987de9149a421395b1) * [FIX] GlossaryTerm reviewers should be user or team only (#16372) * add teams as reviewer * Check Users to be reviewers * Reviewers can be a team or user * Fix check by id or name * Review can be team or user both * Validate Reviewers * add multi select control * - Fix Reviewers * - Centralize Reviewer Relationship to EntityRepository * - Sort * add team as reviewer for glossary terms * locales * cleanup * - Update Reviewer should remove existing reviewers * fix selectable owner control * fix code smells * fix reviewer issue * add glossary cypress * fix patch issue on reviewers set to null * update cypress tests * fix cypress * fix cypress * fix reviewers in glossary task and supported cypress * fix pytest * Fix * fix cypress * fix code smells * Inherited Reviewers need to be present always * filter out inherited users * fix cypress * fix backend tests failure * fix backend tests failure -checkstyle * restrict owner to accept task in case of reviewer present * fix pytest --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 9ec3d94e3b8445e63a7d77239c92c92a32536bf2) * Add testSuite tags, domain field and check for TestCase limits * fix owner not showing after refersh in teams page (#16567) (cherry picked from commit 119fcf8959732a980b75e1f795a9f2dc5288cd27) * [ISSUE-16503] Fix createUser to use EntityResource (#16549) * Fix createUser to use EntityResource * fix broken tests * Fix Tests - 3 (cherry picked from commit aeb020ae3b0cbab3a2ee5995c61480cdd1eae405) * what's new for 1.4.2 (#16568) (cherry picked from commit c86468d9929e433922886852381269b46d69c832) * address feedbacks * fix error for bots page * update banner text * allow force fetch limit * fix ingestion schedule * Revert "Merge branch '1.4.2' into limits" This reverts commit 8e965207a23ba527d0f5ba91463c1869077bf091, reversing changes made to 4d16531965fb0d489a4afdebd45ab5b7f3d1eb5c. * Merge 1.4.2 (#16578) * fix explore page conflicts * fix tests --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> * fix subheader * Updating glossary reviewers should propagate reviewers in glossary term (#16580) * highlight inherited reviewer in glossary * locales * use glossary name for search query * fix glossary version cypress * add union datatype for subfields * Adding reviewer to glossary also adds them as an assignee to the task * add glossary approval cypress --------- Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 4c8bf1cac14074df87dafe7a719e2795b0a29895) * Update documentation for Search Index apis (#16539) (cherry picked from commit d3123c49143652015c416d271d9fd0f9cfa9e324) * cypress: fixed flakiness and announcment cypress (#16579) * fetch latest limit for create / delete operations * guard datAsset limit got topic, dashboard, mlmodel etc * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (#16589) * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (cherry picked from commit 8723b8c36afe31410c31d1ebbdafe7b1770921fa) * cypress: fixed cypress AUT for mysql (#16446) * cypress: fixed cypress AUT for mysql * minor fix * skip announcment redirection cypress * Minor: Ensure correct index mapping in Elasticsearch for clusterAlias (#16598) (cherry picked from commit 04543722a6f6e2b1eaf7a451ebb1c176862bc346) * Fix Postgres Application listing (#16600) * Fix Postgres Application listing * Fix Listing (cherry picked from commit 77dfe1f6af53d187ff7a61fdb1e1416de7178f5a) * fix limit related issue * Fix Automations limits invalidation during the uninstall * cypress: fixed 1.4.2 AUT cypress (#16602) * cypress: fixed 1.4.2 AUT cypress * fix cypress around announcement,user,glossary, lineage and mydata * searchIndexApplication fix and minor changes --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> * test: add updateJWTTokenExpiryTime util (#16606) (cherry picked from commit 8c173bed6a279cb0a648bd30632ea6ebdf4a2a90) * OSS changes for adding automator cypress tests (#16611) * Fix Test Suite Filter (#16615) Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> (cherry picked from commit 3db41f08e27f388495040e5b23cc7bee5ae665f1) * MINOR: Fix Profiler for SSL Enabled Source (#16613) * Add Test Suite SSL (#16619) * MINOR: Fix ssl connection in usage & lineage (#16625) * Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners (cherry picked from commit cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3) * chore(release): Prepare Branch for `1.4.3` * - Fix User Signup (#16667) (cherry picked from commit b4cba8a850ecd7a25aeff6ca7dea0dc432d43d86) * - Fix User Signup - p2 (cherry picked from commit d9ae6f6db9891f8e9bf7ad49c561a71dd50103da) * - Update What's new (#16669) - fix vulnerability (cherry picked from commit 1dcb1bd46f9da49764f4c61a7ac5048dd2fa956b) * Minor: Fix incorrect alert on signup page (#16666) * Fix Application enforceLimits during install * Wrap the add test button with limits wrapper for column profile tab * fix errors * fix tests * fix pylint * fix tests * fix limits * pylint * fix schedule options * fix glossary spec failure * Add domain & tags to testSuite * Update airflow-apis-tests-3_9.yml --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> Co-authored-by: Pablo Takara <pjt1991@gmail.com> Co-authored-by: Akash-Jain <15995028+akash-jain-10@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Maxim Martynov <martinov_m_s_@mail.ru> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Antoine Balliet <antoine.balliet@gorgias.com> Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:59:25 +05:30
private void registerLimits(OpenMetadataApplicationConfig serverConfig)
throws NoSuchMethodException,
ClassNotFoundException,
IllegalAccessException,
InvocationTargetException,
InstantiationException {
LimitsConfiguration limitsConfiguration = serverConfig.getLimitsConfiguration();
if (limitsConfiguration != null && limitsConfiguration.getEnable()) {
Pluggable API/Features Limits (#16782) * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits: add entity resource enforcer * Limits: fix rebase * update limits enforcement * Add OperationContext to limits * chore: Bump versions to `1.4.0` * chore: Bump Ingestion Versions to `1.4.0.1` for Release * chore: Bump Ingestion Versions to `1.4.0.1` in Dockerfiles for Release * Remove Retry From Abstract Event Consumer (#16405) (cherry picked from commit f8ed079731cc238dc136306fe018c5df35dd2f3b) * Fix Migrations: Add postgres migrations (#16403) (cherry picked from commit 9416a7ac5fa8fd9695063b108501790d813e8e6e) * Add Null Check for isAdmin (#16407) * Remove Retry From Abstract Event Consumer * - Add Check for null Or Empty in isAdmin * - Fix Test (cherry picked from commit fe2db2d63c5495b6c288d4252a19ab77481b6de0) * Fix OpenLineage ingestor (#16416) * Fix OpenLineage ingestor * py format --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com> * Minor: added whats new for 1.4.1 (#16420) * Minor: added whats new for 1.4.1 * added note in to whats new * Fix SSL issue (#16412) * chore: Bump Versions for `1.4.1` Release * chore(release): Prepare Branch for `1.4.2` * [MINOR] partition migration issue with redshift servics (#16452) * fix: partition migration issue with redshift servics * chore: typo in sql comment (cherry picked from commit 451d73593e813151c24f2c1d17efb3dcdebb71c8) * minor(ui): update what's new for 1.4.2 (#16457) (cherry picked from commit d55981adfd2321de706e4a043828bb473a4b05f1) * fix: ingestion for dbt > 1.8.0 resource_type is not an enum (#16415) * fix: resource_type is not an enum * feat: add log to display finis * improve readability * use getattr to be compatible * format * Add Cache Query Param for Limits * Only Parse view query (#16470) * add limit check during user creation via PUT * add limit check during user creation via PUT * MINOR: Kafka Setup SSL Arg Fix (#16469) * Fix#16404 - Show Node level lineage by default (#16445) * default to node layer * update cypress * code cleanup * fix cypress (cherry picked from commit f0cda8464f34a21f45f18fa557e980fb2f105d8e) * Invalidate count of data asset after hard delete. add limit exception to ingestion client * - Remove Change Description from Lineage (#16488) (cherry picked from commit 9e5c5529a84dfc781382b3a3b6abd80ee41f11f5) * - Non Indexable fields should be remvoed at the end (#16499) (cherry picked from commit f0b0f7a9426ca601d3bfee3989d4ce47e732a7af) * fix announcement not redirect from landing page (#16506) * fix announcement not redirect from landing page * minor changes * change in cypress test (cherry picked from commit ee7cddd169a3a1fb1e598e80035c2fc15a5a129b) * Fix Schema Field Null Issue (#16510) (cherry picked from commit 022772943f1b33f6230cb35547d1da6acfaf6cfa) * feat(ui): limits integration with application (#16206) * feat(ui): limits integration with application * support pipelineSchedules via limit api * enforce limit to all the modules * update banner styling * update * support disable option for ManageButton * limit version * fix spotlight * update tests * Add name and version history to resource limits Refactor the getEntityIcon function and add new icon mappings * limit version * hide access token tab * fix version for all the entity * fix tests * fix DQ tests * Add fallback for the icon * Revert the fallback icon changes * Apply the limit to the add ingestion button in the service details page * Fix the data quality tab add test button not working * fix banner styling * minor fix * Fix ingestion component unit test * Add InlineAlert component * update entityNameLabels mapping object * Fix the incorrect link in LimitBanner * update pricing page url * Create the GlobalSettingsClassBase * Update URLs for pricing page and upgrade options * fix global settings uncaught error * add parameters to the resource limit API * implement inline alerts for service and alert creation form * update PRIVILEGES for docker * fix layout issues * fix tests --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> * Add token limitations * Add token limitations * Add appType as part of schema in ingestion pipeline (#16519) * #16489: fix the redirect issue to new tab for tags and glossary (#16512) * fix the redirect issue to new tab for tags and glossary * fix the redirect on cancel icon and unit test issue * changes as per comments (cherry picked from commit 8d312f0853609cfef260739cf789d459838a3421) * Fix #16229 - Tag and Service filters for test cases (#16484) * fix: added test case support for tags (inherit from table/column)]" * feat: add tag and service filter for test cases * feat: add tier query param * fix: tests (cherry picked from commit 6b00dde90285924445567ee7c396c89f0fcf3f1d) * fix: None type is not iterable (#16496) (cherry picked from commit 656da03b14ca24171cf7924b9dd33663e6bed423) * minor(ui): refresh token for OIDC SSO (#16483) * minor(ui): refresh token for OIDC SSO * remove frame window timeout issue * increase iFrame timeout for oidc (cherry picked from commit 1a6c4c972052836a9b3cfa273b7ea1aa3202eafe) * feat(ui): support tag & tier filter for test case (#16502) * feat(ui): support tag & tier filter for test case * fix tag filter * allow single select for tier * added service name filter * update cypress for tags, tier & service * add specific add for filters * fix tier api call (cherry picked from commit 5b71d79e8ac2d08a154882dfe71b9b3a0f73bffc) * minor: sanitize activity feed editor content (#16533) * Add appType as part of schema in ingestion pipeline (#16519) * Fixed quicksight conn (#16537) * fix: saml auth for new user not created (#16543) * fix: saml auth for new user not created * doc: add comment * Fix#16491 - fix lineage edge description update (#16538) * fix lineage edge description update * fix tests (cherry picked from commit dff0aa8dbedcd4064ad63765cadda65bb998772e) * CYPRESS: fix announcement cypress (#16536) * fix announcement cypress * changes as per comments * fix the cypress failure (cherry picked from commit fcb87b5866ba06aa7a6db516677e311c24053db7) * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration [MINOR] Fix Test Failure for EventRegistration * Fix Event Handlers registration Issue (#16544) * Fix Event Handlers Issue * Review Comments (cherry picked from commit d374e48b7938e8ad3514dc5cf8dff619a12595e3) * [MINOR] Fix Test Failure for EventRegistration (cherry picked from commit 4563ad4fd10f9790c21fe744d8fc131ebd028ac8) * Fix Topic Schema missing messageSchema (#16545) (cherry picked from commit b612dd90c07f564d38392b1ccfe0de1505a4867b) * Add limits exception cache in rest client * MINOR: Ignore Cluster Information from columns (#16495) * minor: improve the block editor initial content history (#16540) * Minor: fixed data quality page type issue (#16556) * #16521: fix issue in userProfilePage for roles. teams and displayName (#16527) * fix update on roles and backlink them in user profile page * fix teams, displayName and profile pic issue * sonar fix * fix cypress issue * minor changes (cherry picked from commit 98945cb2db87ebb325d3a72131f049abffcba345) * Empty quick filters (#16402) * initial commit for empty quick filters * update progress * fix field title * cleanup * add tests * unit tests * fix encoding of search query * add cypress tests * add cypress * fix flaky cypress * fix review comments * revert tooltip changes * fix tests * fix tests (cherry picked from commit 5930cd7a7a4bef73f6850848c85118eb64843e2d) * Fix #16278 : Search to display Draft glossaryTerms on Explore page (#16462) * Fix #16278 : Search to display Draft glossaryTerms as well on Explore page * add term status quick filter * change aggregation key for status field * change aggregation key for status field * add lowercase_normalizer in status filed for aggregate api * add cypress tests * fix cypress --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> (cherry picked from commit ae5e9d61cc9e6a39d65972987de9149a421395b1) * [FIX] GlossaryTerm reviewers should be user or team only (#16372) * add teams as reviewer * Check Users to be reviewers * Reviewers can be a team or user * Fix check by id or name * Review can be team or user both * Validate Reviewers * add multi select control * - Fix Reviewers * - Centralize Reviewer Relationship to EntityRepository * - Sort * add team as reviewer for glossary terms * locales * cleanup * - Update Reviewer should remove existing reviewers * fix selectable owner control * fix code smells * fix reviewer issue * add glossary cypress * fix patch issue on reviewers set to null * update cypress tests * fix cypress * fix cypress * fix reviewers in glossary task and supported cypress * fix pytest * Fix * fix cypress * fix code smells * Inherited Reviewers need to be present always * filter out inherited users * fix cypress * fix backend tests failure * fix backend tests failure -checkstyle * restrict owner to accept task in case of reviewer present * fix pytest --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 9ec3d94e3b8445e63a7d77239c92c92a32536bf2) * Add testSuite tags, domain field and check for TestCase limits * fix owner not showing after refersh in teams page (#16567) (cherry picked from commit 119fcf8959732a980b75e1f795a9f2dc5288cd27) * [ISSUE-16503] Fix createUser to use EntityResource (#16549) * Fix createUser to use EntityResource * fix broken tests * Fix Tests - 3 (cherry picked from commit aeb020ae3b0cbab3a2ee5995c61480cdd1eae405) * what's new for 1.4.2 (#16568) (cherry picked from commit c86468d9929e433922886852381269b46d69c832) * address feedbacks * fix error for bots page * update banner text * allow force fetch limit * fix ingestion schedule * Revert "Merge branch '1.4.2' into limits" This reverts commit 8e965207a23ba527d0f5ba91463c1869077bf091, reversing changes made to 4d16531965fb0d489a4afdebd45ab5b7f3d1eb5c. * Merge 1.4.2 (#16578) * fix explore page conflicts * fix tests --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> * fix subheader * Updating glossary reviewers should propagate reviewers in glossary term (#16580) * highlight inherited reviewer in glossary * locales * use glossary name for search query * fix glossary version cypress * add union datatype for subfields * Adding reviewer to glossary also adds them as an assignee to the task * add glossary approval cypress --------- Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 4c8bf1cac14074df87dafe7a719e2795b0a29895) * Update documentation for Search Index apis (#16539) (cherry picked from commit d3123c49143652015c416d271d9fd0f9cfa9e324) * cypress: fixed flakiness and announcment cypress (#16579) * fetch latest limit for create / delete operations * guard datAsset limit got topic, dashboard, mlmodel etc * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (#16589) * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (cherry picked from commit 8723b8c36afe31410c31d1ebbdafe7b1770921fa) * cypress: fixed cypress AUT for mysql (#16446) * cypress: fixed cypress AUT for mysql * minor fix * skip announcment redirection cypress * Minor: Ensure correct index mapping in Elasticsearch for clusterAlias (#16598) (cherry picked from commit 04543722a6f6e2b1eaf7a451ebb1c176862bc346) * Fix Postgres Application listing (#16600) * Fix Postgres Application listing * Fix Listing (cherry picked from commit 77dfe1f6af53d187ff7a61fdb1e1416de7178f5a) * fix limit related issue * Fix Automations limits invalidation during the uninstall * cypress: fixed 1.4.2 AUT cypress (#16602) * cypress: fixed 1.4.2 AUT cypress * fix cypress around announcement,user,glossary, lineage and mydata * searchIndexApplication fix and minor changes --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> * test: add updateJWTTokenExpiryTime util (#16606) (cherry picked from commit 8c173bed6a279cb0a648bd30632ea6ebdf4a2a90) * OSS changes for adding automator cypress tests (#16611) * Fix Test Suite Filter (#16615) Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> (cherry picked from commit 3db41f08e27f388495040e5b23cc7bee5ae665f1) * MINOR: Fix Profiler for SSL Enabled Source (#16613) * Add Test Suite SSL (#16619) * MINOR: Fix ssl connection in usage & lineage (#16625) * Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners (cherry picked from commit cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3) * chore(release): Prepare Branch for `1.4.3` * - Fix User Signup (#16667) (cherry picked from commit b4cba8a850ecd7a25aeff6ca7dea0dc432d43d86) * - Fix User Signup - p2 (cherry picked from commit d9ae6f6db9891f8e9bf7ad49c561a71dd50103da) * - Update What's new (#16669) - fix vulnerability (cherry picked from commit 1dcb1bd46f9da49764f4c61a7ac5048dd2fa956b) * Minor: Fix incorrect alert on signup page (#16666) * Fix Application enforceLimits during install * Wrap the add test button with limits wrapper for column profile tab * fix errors * fix tests * fix pylint * fix tests * fix limits * pylint * fix schedule options * fix glossary spec failure * Add domain & tags to testSuite * Update airflow-apis-tests-3_9.yml --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> Co-authored-by: Pablo Takara <pjt1991@gmail.com> Co-authored-by: Akash-Jain <15995028+akash-jain-10@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Maxim Martynov <martinov_m_s_@mail.ru> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Antoine Balliet <antoine.balliet@gorgias.com> Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:59:25 +05:30
limits =
Class.forName(limitsConfiguration.getClassName())
.asSubclass(Limits.class)
.getConstructor()
.newInstance();
} else {
LOG.info("Limits config not set, setting DefaultLimits");
limits = new DefaultLimits();
}
limits.init(serverConfig, jdbi);
}
private void registerEventFilter(
OpenMetadataApplicationConfig catalogConfig, Environment environment) {
if (catalogConfig.getEventHandlerConfiguration() != null) {
ContainerResponseFilter eventFilter = new EventFilter(catalogConfig);
environment.jersey().register(eventFilter);
}
2021-08-03 22:40:42 -07:00
}
private void registerEventPublisher(OpenMetadataApplicationConfig openMetadataApplicationConfig) {
if (openMetadataApplicationConfig.getEventMonitorConfiguration() != null) {
final EventMonitor eventMonitor =
EventMonitorFactory.createEventMonitor(
openMetadataApplicationConfig.getEventMonitorConfiguration(),
openMetadataApplicationConfig.getClusterName());
EventMonitorPublisher eventMonitorPublisher =
new EventMonitorPublisher(
openMetadataApplicationConfig.getEventMonitorConfiguration(), eventMonitor);
EventPubSub.addEventHandler(eventMonitorPublisher);
}
}
private void registerResources(
OpenMetadataApplicationConfig config, Environment environment, Jdbi jdbi) {
CollectionRegistry.initialize();
CollectionRegistry.getInstance()
Pluggable API/Features Limits (#16782) * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits * Limits * - Mismatched Types * Update Limits config response * Update Limits feature response * Limits: add entity resource enforcer * Limits: fix rebase * update limits enforcement * Add OperationContext to limits * chore: Bump versions to `1.4.0` * chore: Bump Ingestion Versions to `1.4.0.1` for Release * chore: Bump Ingestion Versions to `1.4.0.1` in Dockerfiles for Release * Remove Retry From Abstract Event Consumer (#16405) (cherry picked from commit f8ed079731cc238dc136306fe018c5df35dd2f3b) * Fix Migrations: Add postgres migrations (#16403) (cherry picked from commit 9416a7ac5fa8fd9695063b108501790d813e8e6e) * Add Null Check for isAdmin (#16407) * Remove Retry From Abstract Event Consumer * - Add Check for null Or Empty in isAdmin * - Fix Test (cherry picked from commit fe2db2d63c5495b6c288d4252a19ab77481b6de0) * Fix OpenLineage ingestor (#16416) * Fix OpenLineage ingestor * py format --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com> * Minor: added whats new for 1.4.1 (#16420) * Minor: added whats new for 1.4.1 * added note in to whats new * Fix SSL issue (#16412) * chore: Bump Versions for `1.4.1` Release * chore(release): Prepare Branch for `1.4.2` * [MINOR] partition migration issue with redshift servics (#16452) * fix: partition migration issue with redshift servics * chore: typo in sql comment (cherry picked from commit 451d73593e813151c24f2c1d17efb3dcdebb71c8) * minor(ui): update what's new for 1.4.2 (#16457) (cherry picked from commit d55981adfd2321de706e4a043828bb473a4b05f1) * fix: ingestion for dbt > 1.8.0 resource_type is not an enum (#16415) * fix: resource_type is not an enum * feat: add log to display finis * improve readability * use getattr to be compatible * format * Add Cache Query Param for Limits * Only Parse view query (#16470) * add limit check during user creation via PUT * add limit check during user creation via PUT * MINOR: Kafka Setup SSL Arg Fix (#16469) * Fix#16404 - Show Node level lineage by default (#16445) * default to node layer * update cypress * code cleanup * fix cypress (cherry picked from commit f0cda8464f34a21f45f18fa557e980fb2f105d8e) * Invalidate count of data asset after hard delete. add limit exception to ingestion client * - Remove Change Description from Lineage (#16488) (cherry picked from commit 9e5c5529a84dfc781382b3a3b6abd80ee41f11f5) * - Non Indexable fields should be remvoed at the end (#16499) (cherry picked from commit f0b0f7a9426ca601d3bfee3989d4ce47e732a7af) * fix announcement not redirect from landing page (#16506) * fix announcement not redirect from landing page * minor changes * change in cypress test (cherry picked from commit ee7cddd169a3a1fb1e598e80035c2fc15a5a129b) * Fix Schema Field Null Issue (#16510) (cherry picked from commit 022772943f1b33f6230cb35547d1da6acfaf6cfa) * feat(ui): limits integration with application (#16206) * feat(ui): limits integration with application * support pipelineSchedules via limit api * enforce limit to all the modules * update banner styling * update * support disable option for ManageButton * limit version * fix spotlight * update tests * Add name and version history to resource limits Refactor the getEntityIcon function and add new icon mappings * limit version * hide access token tab * fix version for all the entity * fix tests * fix DQ tests * Add fallback for the icon * Revert the fallback icon changes * Apply the limit to the add ingestion button in the service details page * Fix the data quality tab add test button not working * fix banner styling * minor fix * Fix ingestion component unit test * Add InlineAlert component * update entityNameLabels mapping object * Fix the incorrect link in LimitBanner * update pricing page url * Create the GlobalSettingsClassBase * Update URLs for pricing page and upgrade options * fix global settings uncaught error * add parameters to the resource limit API * implement inline alerts for service and alert creation form * update PRIVILEGES for docker * fix layout issues * fix tests --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> * Add token limitations * Add token limitations * Add appType as part of schema in ingestion pipeline (#16519) * #16489: fix the redirect issue to new tab for tags and glossary (#16512) * fix the redirect issue to new tab for tags and glossary * fix the redirect on cancel icon and unit test issue * changes as per comments (cherry picked from commit 8d312f0853609cfef260739cf789d459838a3421) * Fix #16229 - Tag and Service filters for test cases (#16484) * fix: added test case support for tags (inherit from table/column)]" * feat: add tag and service filter for test cases * feat: add tier query param * fix: tests (cherry picked from commit 6b00dde90285924445567ee7c396c89f0fcf3f1d) * fix: None type is not iterable (#16496) (cherry picked from commit 656da03b14ca24171cf7924b9dd33663e6bed423) * minor(ui): refresh token for OIDC SSO (#16483) * minor(ui): refresh token for OIDC SSO * remove frame window timeout issue * increase iFrame timeout for oidc (cherry picked from commit 1a6c4c972052836a9b3cfa273b7ea1aa3202eafe) * feat(ui): support tag & tier filter for test case (#16502) * feat(ui): support tag & tier filter for test case * fix tag filter * allow single select for tier * added service name filter * update cypress for tags, tier & service * add specific add for filters * fix tier api call (cherry picked from commit 5b71d79e8ac2d08a154882dfe71b9b3a0f73bffc) * minor: sanitize activity feed editor content (#16533) * Add appType as part of schema in ingestion pipeline (#16519) * Fixed quicksight conn (#16537) * fix: saml auth for new user not created (#16543) * fix: saml auth for new user not created * doc: add comment * Fix#16491 - fix lineage edge description update (#16538) * fix lineage edge description update * fix tests (cherry picked from commit dff0aa8dbedcd4064ad63765cadda65bb998772e) * CYPRESS: fix announcement cypress (#16536) * fix announcement cypress * changes as per comments * fix the cypress failure (cherry picked from commit fcb87b5866ba06aa7a6db516677e311c24053db7) * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration * [MINOR] Fix Test Failure for EventRegistration [MINOR] Fix Test Failure for EventRegistration * Fix Event Handlers registration Issue (#16544) * Fix Event Handlers Issue * Review Comments (cherry picked from commit d374e48b7938e8ad3514dc5cf8dff619a12595e3) * [MINOR] Fix Test Failure for EventRegistration (cherry picked from commit 4563ad4fd10f9790c21fe744d8fc131ebd028ac8) * Fix Topic Schema missing messageSchema (#16545) (cherry picked from commit b612dd90c07f564d38392b1ccfe0de1505a4867b) * Add limits exception cache in rest client * MINOR: Ignore Cluster Information from columns (#16495) * minor: improve the block editor initial content history (#16540) * Minor: fixed data quality page type issue (#16556) * #16521: fix issue in userProfilePage for roles. teams and displayName (#16527) * fix update on roles and backlink them in user profile page * fix teams, displayName and profile pic issue * sonar fix * fix cypress issue * minor changes (cherry picked from commit 98945cb2db87ebb325d3a72131f049abffcba345) * Empty quick filters (#16402) * initial commit for empty quick filters * update progress * fix field title * cleanup * add tests * unit tests * fix encoding of search query * add cypress tests * add cypress * fix flaky cypress * fix review comments * revert tooltip changes * fix tests * fix tests (cherry picked from commit 5930cd7a7a4bef73f6850848c85118eb64843e2d) * Fix #16278 : Search to display Draft glossaryTerms on Explore page (#16462) * Fix #16278 : Search to display Draft glossaryTerms as well on Explore page * add term status quick filter * change aggregation key for status field * change aggregation key for status field * add lowercase_normalizer in status filed for aggregate api * add cypress tests * fix cypress --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> (cherry picked from commit ae5e9d61cc9e6a39d65972987de9149a421395b1) * [FIX] GlossaryTerm reviewers should be user or team only (#16372) * add teams as reviewer * Check Users to be reviewers * Reviewers can be a team or user * Fix check by id or name * Review can be team or user both * Validate Reviewers * add multi select control * - Fix Reviewers * - Centralize Reviewer Relationship to EntityRepository * - Sort * add team as reviewer for glossary terms * locales * cleanup * - Update Reviewer should remove existing reviewers * fix selectable owner control * fix code smells * fix reviewer issue * add glossary cypress * fix patch issue on reviewers set to null * update cypress tests * fix cypress * fix cypress * fix reviewers in glossary task and supported cypress * fix pytest * Fix * fix cypress * fix code smells * Inherited Reviewers need to be present always * filter out inherited users * fix cypress * fix backend tests failure * fix backend tests failure -checkstyle * restrict owner to accept task in case of reviewer present * fix pytest --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 9ec3d94e3b8445e63a7d77239c92c92a32536bf2) * Add testSuite tags, domain field and check for TestCase limits * fix owner not showing after refersh in teams page (#16567) (cherry picked from commit 119fcf8959732a980b75e1f795a9f2dc5288cd27) * [ISSUE-16503] Fix createUser to use EntityResource (#16549) * Fix createUser to use EntityResource * fix broken tests * Fix Tests - 3 (cherry picked from commit aeb020ae3b0cbab3a2ee5995c61480cdd1eae405) * what's new for 1.4.2 (#16568) (cherry picked from commit c86468d9929e433922886852381269b46d69c832) * address feedbacks * fix error for bots page * update banner text * allow force fetch limit * fix ingestion schedule * Revert "Merge branch '1.4.2' into limits" This reverts commit 8e965207a23ba527d0f5ba91463c1869077bf091, reversing changes made to 4d16531965fb0d489a4afdebd45ab5b7f3d1eb5c. * Merge 1.4.2 (#16578) * fix explore page conflicts * fix tests --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> * fix subheader * Updating glossary reviewers should propagate reviewers in glossary term (#16580) * highlight inherited reviewer in glossary * locales * use glossary name for search query * fix glossary version cypress * add union datatype for subfields * Adding reviewer to glossary also adds them as an assignee to the task * add glossary approval cypress --------- Co-authored-by: sonikashah <sonikashah94@gmail.com> (cherry picked from commit 4c8bf1cac14074df87dafe7a719e2795b0a29895) * Update documentation for Search Index apis (#16539) (cherry picked from commit d3123c49143652015c416d271d9fd0f9cfa9e324) * cypress: fixed flakiness and announcment cypress (#16579) * fetch latest limit for create / delete operations * guard datAsset limit got topic, dashboard, mlmodel etc * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (#16589) * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias * Fix: Ensure correct index mapping in Elasticsearch for clusterAlias (cherry picked from commit 8723b8c36afe31410c31d1ebbdafe7b1770921fa) * cypress: fixed cypress AUT for mysql (#16446) * cypress: fixed cypress AUT for mysql * minor fix * skip announcment redirection cypress * Minor: Ensure correct index mapping in Elasticsearch for clusterAlias (#16598) (cherry picked from commit 04543722a6f6e2b1eaf7a451ebb1c176862bc346) * Fix Postgres Application listing (#16600) * Fix Postgres Application listing * Fix Listing (cherry picked from commit 77dfe1f6af53d187ff7a61fdb1e1416de7178f5a) * fix limit related issue * Fix Automations limits invalidation during the uninstall * cypress: fixed 1.4.2 AUT cypress (#16602) * cypress: fixed 1.4.2 AUT cypress * fix cypress around announcement,user,glossary, lineage and mydata * searchIndexApplication fix and minor changes --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> * test: add updateJWTTokenExpiryTime util (#16606) (cherry picked from commit 8c173bed6a279cb0a648bd30632ea6ebdf4a2a90) * OSS changes for adding automator cypress tests (#16611) * Fix Test Suite Filter (#16615) Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com> (cherry picked from commit 3db41f08e27f388495040e5b23cc7bee5ae665f1) * MINOR: Fix Profiler for SSL Enabled Source (#16613) * Add Test Suite SSL (#16619) * MINOR: Fix ssl connection in usage & lineage (#16625) * Fix owner notification (#16629) * - Fix Task notification not getting sent to owners * - Fix Task notification not getting sent to owners (cherry picked from commit cc2d581eb0524604b6dcf0523e9ca96e0b8a6ce3) * chore(release): Prepare Branch for `1.4.3` * - Fix User Signup (#16667) (cherry picked from commit b4cba8a850ecd7a25aeff6ca7dea0dc432d43d86) * - Fix User Signup - p2 (cherry picked from commit d9ae6f6db9891f8e9bf7ad49c561a71dd50103da) * - Update What's new (#16669) - fix vulnerability (cherry picked from commit 1dcb1bd46f9da49764f4c61a7ac5048dd2fa956b) * Minor: Fix incorrect alert on signup page (#16666) * Fix Application enforceLimits during install * Wrap the add test button with limits wrapper for column profile tab * fix errors * fix tests * fix pylint * fix tests * fix limits * pylint * fix schedule options * fix glossary spec failure * Add domain & tags to testSuite * Update airflow-apis-tests-3_9.yml --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Chira Madlani <chirag@getcollate.io> Co-authored-by: Pablo Takara <pjt1991@gmail.com> Co-authored-by: Akash-Jain <15995028+akash-jain-10@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Maxim Martynov <martinov_m_s_@mail.ru> Co-authored-by: ulixius9 <mayursingal9@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: Antoine Balliet <antoine.balliet@gorgias.com> Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com> Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:59:25 +05:30
.registerResources(jdbi, environment, config, authorizer, authenticatorHandler, limits);
2021-08-01 14:27:44 -07:00
environment.jersey().register(new JsonPatchProvider());
environment.jersey().register(new JsonPatchMessageBodyReader());
OMErrorPageHandler eph = new OMErrorPageHandler(config.getWebConfiguration());
2021-08-01 14:27:44 -07:00
eph.addErrorPage(Response.Status.NOT_FOUND.getStatusCode(), "/");
environment.getApplicationContext().setErrorHandler(eph);
}
private void initializeWebsockets(
OpenMetadataApplicationConfig catalogConfig, Environment environment) {
SocketAddressFilter socketAddressFilter;
String pathSpec = "/api/v1/push/feed/*";
if (catalogConfig.getAuthorizerConfiguration() != null) {
socketAddressFilter =
new SocketAddressFilter(
catalogConfig.getAuthenticationConfiguration(),
catalogConfig.getAuthorizerConfiguration());
} else {
socketAddressFilter = new SocketAddressFilter();
}
EngineIoServerOptions eioOptions = EngineIoServerOptions.newFromDefault();
eioOptions.setAllowedCorsOrigins(null);
WebSocketManager.WebSocketManagerBuilder.build(eioOptions);
environment.getApplicationContext().setContextPath("/");
FilterHolder socketAddressFilterHolder = new FilterHolder();
socketAddressFilterHolder.setFilter(socketAddressFilter);
environment
.getApplicationContext()
.addFilter(socketAddressFilterHolder, pathSpec, EnumSet.of(DispatcherType.REQUEST));
environment.getApplicationContext().addServlet(new ServletHolder(new FeedServlet()), pathSpec);
// Upgrade connection to websocket from Http
try {
JettyWebSocketServletContainerInitializer.configure(
environment.getApplicationContext(),
(servletContext, wsContainer) -> {
wsContainer.setMaxTextMessageSize(65535);
wsContainer.setMaxBinaryMessageSize(65535);
// Register endpoint using Jetty WebSocket API
wsContainer.addMapping(
pathSpec,
(req, resp) ->
new JettyWebSocketHandler(WebSocketManager.getInstance().getEngineIoServer()));
});
} catch (Exception ex) {
LOG.error("Websocket configuration error: {}", ex.getMessage());
}
}
2021-08-01 14:27:44 -07:00
public static void main(String[] args) throws Exception {
OpenMetadataApplication openMetadataApplication = new OpenMetadataApplication();
openMetadataApplication.run(args);
2021-08-01 14:27:44 -07:00
}
public static class ManagedShutdown implements Managed {
@Override
public void start() {
2022-01-09 21:03:50 -08:00
LOG.info("Starting the application");
}
@Override
Data insight reporting + extras (#11317) * Refactor Data Insight Chart for Reusability * Data Insight Reporting * Add Schedule Info * Add Error Handling * Add Profile Field * Remove Endpoint as required field * Missing Language * Reformat * Remove Task and Test Result Settings * Fix test * fix: typescript errors * fix: send alertType for subscriptions request * feat: add alert data insights report page * Fix test * fix: alert type typescript error * fix: loading flicker on alerts page * chore: add placeholders for data insight report alert page * fix: alert icon styling * fix: confirmation is not showing up for delete operation for subscription. * fix: delete operation is not working from alert details page * fix Activity Feed Errors on update * fix: test * chore: change the description text area to the markdown editor * Data Insight Reporting should be created on system startup * Restrict DataInsight Report to only one * Review Comments * feat: show the default DataInsightReport data * sonar fixes * sonar fixes * deprecate ConfirmationModal * trigger should be updated * feta: add edit flow for data insight report * remove custom option for schedule info * chore: update data insight report icon * test: add unit test for add data insight alert form * fix: update cypress tests * update local message * test: add unit tests * move sql changes to a different file * spacing issues * add tag provider in createRequest * chore: send provider in create and update alert request. * fix: code smells * fix: comment typo * fix: permission issue for event subscription --------- Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
2023-05-08 16:54:45 +05:30
public void stop() throws InterruptedException, SchedulerException {
LOG.info("Cache with Id Stats {}", EntityRepository.CACHE_WITH_ID.stats());
LOG.info("Cache with name Stats {}", EntityRepository.CACHE_WITH_NAME.stats());
EventPubSub.shutdown();
AppScheduler.shutDown();
EventSubscriptionScheduler.shutDown();
2022-01-09 21:03:50 -08:00
LOG.info("Stopping the application");
}
}
2021-08-01 14:27:44 -07:00
}