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

DBZ-7813: Fix Exclude Column List - back-port #54

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 43 additions & 26 deletions .github/workflows/cross-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ on:
pull_request:
branches:
- main
- 1.*
- 2.*
- 3.*
paths-ignore:
- '*.md'

jobs:
build-core:
build_core:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key-generator.outputs.cache-key }}
Expand All @@ -39,76 +39,93 @@ jobs:
echo "BRANCH_FOUND=true" >> $GITHUB_OUTPUT
fi
done < SORTED_PULLS.txt

- name: Checkout core repository with pull request branch
if: ${{ steps.branch.outputs.BRANCH_FOUND == 'true' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.user.login }}/debezium
ref: ${{ github.head_ref }}
path: core

- name: Checkout core repository with default base branch
if: ${{ steps.branch.outputs.BRANCH_FOUND != 'true' }}
uses: actions/checkout@v4
with:
repository: debezium/debezium
ref: ${{ github.base_ref }}
path: core
- name: Set up JDK

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Cache Maven packages

- name: Cache Maven Repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven build core
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('core/**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('core/**/pom.xml') }}

- name: Build Debezium (Core)
run: >
./core/mvnw clean install -B -f core/pom.xml
-pl debezium-bom,debezium-core,debezium-embedded,debezium-storage/debezium-storage-file,debezium-storage/debezium-storage-kafka -am
-DskipTests=true
./core/mvnw clean install -B -ntp -f core/pom.xml
-pl debezium-assembly-descriptors,debezium-bom,debezium-core,debezium-embedded,:debezium-ide-configs,:debezium-checkstyle,:debezium-revapi,:debezium-storage-file,:debezium-storage-kafka
-am
-DskipTests=true
-DskipITs=true
-Dcheckstyle.skip=true
-Dformat.skip=true
-Drevapi.skip=true
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120

# This job builds and creates/restores the cache based on the hash of the POM files from the core
# This job builds and creates/restores the cache based on the hash of the POM files from the core
# repository; therefore, we need to output this so that the matrix job can reuse this cache.
- name: Generate Cache Key
id: cache-key-generator
run: echo "cache-key=${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}" >> "$GITHUB_OUTPUT"
run: echo "cache-key=${{ runner.os }}-m2-${{ hashFiles('core/**/pom.xml') }}" >> "$GITHUB_OUTPUT"

build-ifx:
needs: build-core
runs-on: ubuntu-latest
build_informix:
strategy:
# Runs each combination concurrently
matrix:
informix-plugin: [ "assembly,informix12", "assembly,informix14" ]
profile: [ "assembly,informix12", "assembly,informix14" ]
fail-fast: false
name: "Informix - ${{ matrix.profile }}"
needs: [ build_core ]
runs-on: ubuntu-latest
steps:
- name: Checkout informix repository
- name: Checkout Action (Informix)
uses: actions/checkout@v4
with:
path: informix
- name: Set up JDK

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Cache Maven packages

- name: Cache Maven Repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ needs.build-core.outputs.cache-key }}
restore-keys: ${{ needs.build-core.outputs.cache-key }}
- name: Maven build Informix (${{ matrix.informix-plugin }})
path: ~/.m2/repository
key: ${{ needs.build_core.outputs.cache-key }}
restore-keys: ${{ needs.build_core.outputs.cache-key }}

- name: Build Informix
run: >
./informix/mvnw clean install -B -f informix/pom.xml
-P${{ matrix.informix-plugin }}
./informix/mvnw clean install -B -ntp -f informix/pom.xml
-P${{ matrix.profile }}
-Dformat.formatter.goal=validate
-Dformat.imports.goal=check
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Ddebezium.test.records.waittime=7
-Ddebezium.test.records.waittime.after.nulls=13
-DfailFlakyTests=false
78 changes: 51 additions & 27 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,94 @@ on:
push:
branches:
- main
- 1.*
- 2.*
- 3.*
paths-ignore:
- '*.md'
- '*.md'

jobs:
build-core:
build_core:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key-generator.outputs.cache-key }}
steps:
- name: Checkout core repository
- name: Checkout Action (Core)
uses: actions/checkout@v4
with:
repository: debezium/debezium
ref: ${{ github.ref }}
path: core
- name: Set up JDK

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Cache Maven packages

- name: Cache Maven Repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven build core
run: >
./core/mvnw clean install -B -f core/pom.xml
-pl debezium-bom,debezium-core,debezium-embedded,debezium-storage/debezium-storage-file,debezium-storage/debezium-storage-kafka -am
-DskipTests=true
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('core/**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('core/**/pom.xml') }}

- name: Build Debezium (Core)
run: >
./core/mvnw clean install -B -ntp -f core/pom.xml
-pl debezium-assembly-descriptors,debezium-bom,debezium-core,debezium-embedded,:debezium-ide-configs,:debezium-checkstyle,:debezium-revapi,:debezium-storage-file,:debezium-storage-kafka
-am
-DskipTests=true
-DskipITs=true
-Dcheckstyle.skip=true
-Dformat.skip=true
-Drevapi.skip=true
build-ifx:
needs: build-core
runs-on: ubuntu-latest
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120

# This job builds and creates/restores the cache based on the hash of the POM files from the core
# repository; therefore, we need to output this so that the matrix job can reuse this cache.
- name: Generate Cache Key
id: cache-key-generator
run: echo "cache-key=${{ runner.os }}-m2-${{ hashFiles('core/**/pom.xml') }}" >> "$GITHUB_OUTPUT"

build_informix:
strategy:
# Runs each combination concurrently
matrix:
informix-plugin: [ "assembly,informix12", "assembly,informix14" ]
profile: [ "assembly,informix12", "assembly,informix14" ]
fail-fast: false
name: "Informix - ${{ matrix.profile }}"
needs: [ build_core ]
runs-on: ubuntu-latest
steps:
- name: Checkout informix repository
- name: Checkout Action (Informix)
uses: actions/checkout@v4
with:
path: informix
- name: Set up JDK

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Cache Maven packages

- name: Cache Maven Repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven build Informix (${{ matrix.informix-plugin }})
path: ~/.m2/repository
key: ${{ needs.build_core.outputs.cache-key }}
restore-keys: ${{ needs.build_core.outputs.cache-key }}

- name: Build Informix
run: >
./informix/mvnw clean install -B -f informix/pom.xml
-P${{ matrix.informix-plugin }}
./informix/mvnw clean install -B -ntp -f informix/pom.xml
-P${{ matrix.profile }}
-Dformat.formatter.goal=validate
-Dformat.imports.goal=check
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Ddebezium.test.records.waittime=7
-Ddebezium.test.records.waittime.after.nulls=13
-DfailFlakyTests=false
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
<name>${docker.dbs}:${informix.version}</name>
<run>
<env>
<SIZE>small</SIZE>
<SIZE>medium</SIZE>
<LICENSE>accept</LICENSE>
<USEOSTIME>1</USEOSTIME>
</env>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import com.informix.jdbc.IfmxReadableType;

import io.debezium.DebeziumException;
import io.debezium.data.Envelope.Operation;
import io.debezium.relational.RelationalChangeRecordEmitter;
import io.debezium.relational.TableSchema;
Expand Down Expand Up @@ -56,7 +57,8 @@ protected Object[] getNewColumnValues() {
@Override
protected void emitTruncateRecord(Receiver<InformixPartition> receiver, TableSchema tableSchema) throws InterruptedException {
receiver.changeRecord(getPartition(), tableSchema, Operation.TRUNCATE, null,
tableSchema.getEnvelopeSchema().truncate(getOffset().getSourceInfo(), getClock().currentTimeAsInstant()), getOffset(), null);
tableSchema.getEnvelopeSchema().truncate(getOffset().getSourceInfo(), getClock().currentTimeAsInstant()),
getOffset(), null);
}

/**
Expand All @@ -79,8 +81,11 @@ private static <X> X propagate(Callable<X> callable) {
try {
return callable.call();
}
catch (Exception e) {
throw (e instanceof RuntimeException) ? (RuntimeException) e : new RuntimeException(e);
catch (RuntimeException rex) {
throw rex;
}
catch (Exception ex) {
throw new DebeziumException(ex);
}
}
}
Loading
Loading