Skip to content

Commit

Permalink
Remove Oracle DB support. (#895)
Browse files Browse the repository at this point in the history
* Remove Oracle DB support.

* remove trackit.

Co-authored-by: Lars van der Bijl <[email protected]>
  • Loading branch information
larsbijl and Lars van der Bijl committed Apr 24, 2021
1 parent 481e12c commit 49bdf56
Show file tree
Hide file tree
Showing 101 changed files with 6 additions and 27,810 deletions.
12 changes: 1 addition & 11 deletions cuebot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,7 @@ jacocoTestReport {
fileTree(dir: it,
exclude: [
// Exclude proto files' generated Java code.
'com/imageworks/spcue/grpc/**',
// Exclude Oracle classes; our standard test environment isn't currently
// able to run Oracle unit tests, so coverage of those files will always
// read as 0% even though tests do exist.
'com/imageworks/spcue/dao/oracle/**',
'com/imageworks/spcue/dao/criteria/oracle/**',])
'com/imageworks/spcue/grpc/**'])
}))
}
}
Expand All @@ -146,11 +141,6 @@ sonarqube {
property "sonar.organization", "academysoftwarefoundation"
property "sonar.projectKey", "AcademySoftwareFoundation_OpenCue_Cuebot"
property "sonar.projectName", "OpenCue Cuebot"
// SonarCloud will pick up the JaCoCo report automatically, but has its own options
// for excluding files. We don't need to exclude generated code here as it isn't
// checked into the repository, so SonarCloud doesn't even know it exists.
property "sonar.coverage.exclusions", "src/main/java/com/imageworks/spcue/dao/oracle/**," +
"src/main/java/com/imageworks/spcue/dao/criteria/oracle/**"
// NOTE: sonar.login must be provided manually, like:
// ./gradlew sonarqube -Dsonar.login=<login key>

Expand Down
1 change: 0 additions & 1 deletion cuebot/oracle/xe/.gitignore

This file was deleted.

43 changes: 0 additions & 43 deletions cuebot/oracle/xe/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions cuebot/oracle/xe/apply_schema.py

This file was deleted.

14 changes: 0 additions & 14 deletions cuebot/oracle/xe/apply_schema.sh

This file was deleted.

42 changes: 0 additions & 42 deletions cuebot/oracle/xe/build_oracle_base_image.sh

This file was deleted.

61 changes: 0 additions & 61 deletions cuebot/oracle/xe/run_db_container.sh

This file was deleted.

16 changes: 0 additions & 16 deletions cuebot/oracle/xe/setup_db.sh

This file was deleted.

12 changes: 0 additions & 12 deletions cuebot/src/main/java/com/imageworks/spcue/config/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,11 @@
"classpath:conf/spring/applicationContext-grpcServer.xml",
"classpath:conf/spring/applicationContext-service.xml",
"classpath:conf/spring/applicationContext-jms.xml",
"classpath:conf/spring/applicationContext-trackit.xml",
"classpath:conf/spring/applicationContext-criteria.xml"})
@EnableConfigurationProperties
@PropertySource({"classpath:opencue.properties"})
public class AppConfig {

@Configuration
@Conditional(OracleDatabaseCondition.class)
@ImportResource({"classpath:conf/spring/applicationContext-dao-oracle.xml"})
static class OracleEngineConfig {}

@Configuration
@Conditional(PostgresDatabaseCondition.class)
@ImportResource({"classpath:conf/spring/applicationContext-dao-postgres.xml"})
Expand All @@ -63,12 +57,6 @@ public DataSource cueDataSource() {
return DataSourceBuilder.create().build();
}

@Bean
@ConfigurationProperties(prefix="datasource.trackit-data-source")
public DataSource trackitDataSource() {
return DataSourceBuilder.create().build();
}

@Bean
public ServletRegistrationBean<JobLaunchServlet> jobLaunchServlet() {
ServletRegistrationBean<JobLaunchServlet> b = new ServletRegistrationBean<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package com.imageworks.spcue.config;

public enum DatabaseEngine {
ORACLE,
POSTGRES;

public static DatabaseEngine fromEnv() {
String envValue = System.getenv("CUEBOT_DB_ENGINE");
if (envValue == null) {
return POSTGRES;
}
return DatabaseEngine.valueOf(envValue.toUpperCase());
return POSTGRES;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ public class FrameSearchFactory {
private DatabaseEngine dbEngine;

public FrameSearchInterface create() {
if (dbEngine.equals(DatabaseEngine.POSTGRES)) {
return new FrameSearch();
} else if (dbEngine.equals(DatabaseEngine.ORACLE)) {
return new com.imageworks.spcue.dao.criteria.oracle.FrameSearch();
} else {
throw new RuntimeException(
"current database engine is not supported by FrameSearchFactory");
}
return new FrameSearch();
}

public FrameSearchInterface create(List<String> frameIds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ public class HostSearchFactory {
private DatabaseEngine dbEngine;

public HostSearchInterface create(HostSearchCriteria criteria) {
if (dbEngine.equals(DatabaseEngine.POSTGRES)) {
return new HostSearch(criteria);
} else if (dbEngine.equals(DatabaseEngine.ORACLE)) {
return new com.imageworks.spcue.dao.criteria.oracle.HostSearch(criteria);
} else {
throw new RuntimeException(
"current database engine is not supported by HostSearchFactory");
}

return new HostSearch(criteria);
}

public HostSearchInterface create(AllocationEntity allocEntity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@ public class JobSearchFactory {
private DatabaseEngine dbEngine;

public JobSearchInterface create() {
if (dbEngine.equals(DatabaseEngine.POSTGRES)) {
return new JobSearch();
} else if (dbEngine.equals(DatabaseEngine.ORACLE)) {
return new com.imageworks.spcue.dao.criteria.oracle.JobSearch();
} else {
throw new RuntimeException(
"current database engine is not supported by JobSearchFactory");
}
return new JobSearch();
}

public JobSearchInterface create(JobSearchCriteria criteria) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ public class ProcSearchFactory {
private DatabaseEngine dbEngine;

public ProcSearchInterface create() {
if (dbEngine.equals(DatabaseEngine.POSTGRES)) {
return new ProcSearch();
} else if (dbEngine.equals(DatabaseEngine.ORACLE)) {
return new com.imageworks.spcue.dao.criteria.oracle.ProcSearch();
} else {
throw new RuntimeException(
"current database engine is not supported by ProcSearchFactory");
}
return new ProcSearch();
}

public ProcSearchInterface create(ProcSearchCriteria criteria) {
Expand Down

0 comments on commit 49bdf56

Please sign in to comment.