Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Arctic-1293][Imporvement][CI]: Run code style check first when run github ci actions. #1326

Closed
9 changes: 7 additions & 2 deletions .github/workflows/core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ jobs:
distribution: 'temurin'
cache: maven


- name: Build all module with Maven
run: mvn clean install -pl '!trino'
run: mvn clean install -pl '!trino' -B -X

- name: debug jacoco EOF problems
if: ${{ always() }}
run: ls -lha /home/runner/work/arctic/arctic/flink/v1.12/flink/target/jacoco.exec

- name: Code coverage
uses: codecov/codecov-action@v3
with:
verbose: true
flags: core
flags: core
7 changes: 5 additions & 2 deletions .github/workflows/trino-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ jobs:
distribution: 'temurin'
cache: maven

- name: Run code checkstyle
run: mvn validate

- name: Install dependency with Maven
run: mvn clean install -DskipTests -pl 'ams/ams-api,core,hive' -am
run: mvn clean install -DskipTests -Dcheckstyle.skip=true -pl 'ams/ams-api,core,hive' -am

- name: Build with Maven
run: mvn clean test -pl 'trino'
run: mvn clean test -pl 'trino' -Dcheckstyle.skip=true

- name: Code coverage
uses: codecov/codecov-action@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,18 +317,34 @@ protected static void commit(KeyedTable keyedTable, WriteResult result, boolean
}
}

protected static TaskWriter<RowData> createKeyedTaskWriter(KeyedTable keyedTable, RowType rowType,
boolean base) {
protected static TaskWriter<RowData> createKeyedTaskWriter(
KeyedTable keyedTable, RowType rowType,
boolean base) {
return createKeyedTaskWriter(keyedTable, rowType, base, 3);
}

protected static TaskWriter<RowData> createKeyedTaskWriter(KeyedTable keyedTable, RowType rowType,
boolean base, long mask) {
protected static TaskWriter<RowData> createKeyedTaskWriter(
KeyedTable keyedTable, RowType rowType,
boolean base, long mask) {
ArcticRowDataTaskWriterFactory taskWriterFactory =
new ArcticRowDataTaskWriterFactory(keyedTable, rowType, base);
taskWriterFactory.setMask(mask);
taskWriterFactory.initialize(0, 0);
return taskWriterFactory.create();
}

static {
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public synchronized void start() {
LOG.info("JACOCO SHUTDOWN HOOK START");
super.start();
}

@Override
public void run() {
LOG.info("JACOCO SHUTDOWN HOOK RUN");
}
});
}
}
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven-scala-plugin.version>4.3.0</maven-scala-plugin.version>
<maven-antlr4-plugin.version>4.3</maven-antlr4-plugin.version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-dependency-plugin.version>3.3.0</maven-dependency-plugin.version>
<maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
Expand Down Expand Up @@ -522,23 +522,23 @@
<file>.scalafmt.conf</file>
</scalafmt>
</scala>
<pom>
<includes>
<include>pom.xml</include>
</includes>
<sortPom>
<encoding>${project.build.sourceEncoding}</encoding>
<expandEmptyElements>true</expandEmptyElements>
<indentSchemaLocation>true</indentSchemaLocation>
<nrOfIndentSpace>4</nrOfIndentSpace>
</sortPom>
</pom>
<pom>
<includes>
<include>pom.xml</include>
</includes>
<sortPom>
<encoding>${project.build.sourceEncoding}</encoding>
<expandEmptyElements>true</expandEmptyElements>
<indentSchemaLocation>true</indentSchemaLocation>
<nrOfIndentSpace>4</nrOfIndentSpace>
</sortPom>
</pom>

</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
Expand Down