Skip to content

Commit

Permalink
add check command to test task (#8521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conor committed Aug 25, 2023
1 parent df7d0f5 commit ddafb27
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ void testEnvMapSet() throws IOException, WorkerException, InterruptedException {

final WorkerConfigs workerConfigs = spy(new WorkerConfigs(new EnvConfigs()));
when(workerConfigs.getEnvMap()).thenReturn(Map.of("ENV_VAR_1", "ENV_VALUE_1"));
when(workerConfigs.getEnvMap()).thenReturn(Map.of("ENV_VAR_1", "ENV_VALUE_1"));

final DockerProcessFactory processFactory =
new DockerProcessFactory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ public List<StandardWorkspace> listWorkspacesByOrganizationId(final ResourcesByO
.toList();
}

/**
* Find the workspace with the given ID and check if its organization ID is null. If so, update it.
* Otherwise, log a warning and do nothing.
*/
public void setOrganizationIdIfNull(final UUID workspaceId, final UUID organizationId) throws IOException {
// find the workspace with the given ID and check if its organization ID is null. If so, update it.
// otherwise, log a warning and do nothing.
database.transaction(ctx -> {
final boolean isExistingWorkspace = ctx.fetchExists(ctx.selectFrom(WORKSPACE).where(WORKSPACE.ID.eq(workspaceId)));
if (isExistingWorkspace) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ private UUID getDefaultVersionIdForActorId(final DSLContext ctx, final UUID acto
return actor.get(DEFAULT_VERSION_ID_COL);
}

@SuppressWarnings("PMD.AvoidDuplicateLiterals")
static void insertDependencies(final DSLContext ctx) {
ctx.insertInto(WORKSPACE)
.columns(
Expand Down
3 changes: 1 addition & 2 deletions ci/oss/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ async def build_oss_backend_task(settings: OssSettings, ctx: PipelineContext, cl
.with_env_variable("VERSION", "dev")
.with_workdir("/airbyte/oss" if base_dir == "oss" else "/airbyte")
.with_exec(["./gradlew", ":airbyte-config:specs:downloadConnectorRegistry", "--rerun", "--build-cache", "--no-daemon"])
.with_exec(["./gradlew", "spotlessCheck"])
.with_exec(gradle_command + ["--scan"] if scan else gradle_command)
.with_exec(["rsync", "-az", "/root/.gradle/", "/root/gradle-cache"]) #TODO: Move this to a context manager
)
Expand Down Expand Up @@ -176,7 +175,7 @@ async def test_oss_backend_task(client: Client, oss_build_result: Container, set
.with_exec(["./run.sh"])
)

gradle_command = ["./gradlew", "test", "-x", ":airbyte-webapp:test", "-x", "buildDockerImage", "--build-cache", "--no-daemon"]
gradle_command = ["./gradlew", "checK", "test", "-x", ":airbyte-webapp:test", "-x", "buildDockerImage", "--build-cache", "--no-daemon"]

result = (
with_gradle(client, ctx, settings, directory=base_dir)
Expand Down

0 comments on commit ddafb27

Please sign in to comment.