mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-13 09:54:10 +00:00
fix(nocode): fix no-code upgrade (#12494)
This commit is contained in:
parent
d0af9d59aa
commit
a35bfddba2
@ -152,6 +152,18 @@ task runRestoreIndicesUrn(type: Exec) {
|
||||
bootJar.getArchiveFile().get(), "-u", "RestoreIndices", "-a", "batchSize=100", "-a", "urnBasedPagination=true"
|
||||
}
|
||||
|
||||
task runNoCode(type: Exec) {
|
||||
dependsOn bootJar
|
||||
group = "Execution"
|
||||
description = "Run the NoCodeDataMigration process locally."
|
||||
environment "ENTITY_REGISTRY_CONFIG_PATH", "../metadata-models/src/main/resources/entity-registry.yml"
|
||||
commandLine "java", "-agentlib:jdwp=transport=dt_socket,address=5003,server=y,suspend=n",
|
||||
"-jar",
|
||||
"-Dkafka.schemaRegistry.url=http://localhost:8080/schema-registry/api",
|
||||
"-Dserver.port=8083",
|
||||
bootJar.getArchiveFile().get(), "-u", "NoCodeDataMigration", "-a", "batchSize=100", "-a", "dbType=MYSQL"
|
||||
}
|
||||
|
||||
docker {
|
||||
name "${docker_registry}/${docker_repo}:v${version}"
|
||||
version "v${version}"
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.linkedin.datahub.upgrade.config;
|
||||
|
||||
import com.linkedin.gms.factory.system_telemetry.OpenTelemetryBaseFactory;
|
||||
import io.datahubproject.metadata.context.TraceContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class OpenTelemetryConfig extends OpenTelemetryBaseFactory {
|
||||
|
||||
@Override
|
||||
protected String getApplicationComponent() {
|
||||
return "datahub-upgrade";
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
protected TraceContext traceContext() {
|
||||
return super.traceContext();
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ import com.linkedin.datahub.upgrade.system.BlockingSystemUpgrade;
|
||||
import com.linkedin.metadata.dao.throttle.NoOpSensor;
|
||||
import com.linkedin.metadata.dao.throttle.ThrottleSensor;
|
||||
import com.linkedin.metadata.search.elasticsearch.indexbuilder.ESIndexBuilder;
|
||||
import io.datahubproject.metadata.context.TraceContext;
|
||||
import javax.inject.Named;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
@ -38,6 +39,8 @@ public class UpgradeCliApplicationTest extends AbstractTestNGSpringContextTests
|
||||
@Autowired
|
||||
private ThrottleSensor kafkaThrottle;
|
||||
|
||||
@Autowired private TraceContext traceContext;
|
||||
|
||||
@Test
|
||||
public void testRestoreIndicesInit() {
|
||||
/*
|
||||
@ -62,4 +65,9 @@ public class UpgradeCliApplicationTest extends AbstractTestNGSpringContextTests
|
||||
assertEquals(
|
||||
new NoOpSensor(), kafkaThrottle, "No kafka throttle controls expected in datahub-upgrade");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTraceContext() {
|
||||
assertNotNull(traceContext);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user