Skip to content

Commit 07d16eb

Browse files
committed
added a timestamp.timezone configuration in SplunkSinkConnectorConfig
2 parents 9576ca7 + 2cbcbf8 commit 07d16eb

File tree

13 files changed

+151
-78
lines changed

13 files changed

+151
-78
lines changed

.github/workflows/ci_build_test.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
description: Publish token for Semgrep
1616
required: true
1717

18+
permissions:
19+
checks: write
20+
pull-requests: write
21+
1822
jobs:
1923
workflow_approval:
2024
name: Approve workflow
@@ -43,7 +47,7 @@ jobs:
4347
env:
4448
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
4549
- name: upload THIRDPARTY file
46-
uses: actions/upload-artifact@v2
50+
uses: actions/upload-artifact@v3
4751
with:
4852
name: THIRDPARTY
4953
path: /tmp/THIRDPARTY
@@ -78,7 +82,7 @@ jobs:
7882
- workflow_approval
7983
steps:
8084
- name: Checkout
81-
uses: actions/checkout@v2
85+
uses: actions/checkout@v3
8286
with:
8387
ref: ${{github.event.pull_request.head.sha}}
8488
repository: ${{github.event.pull_request.head.repo.full_name}}
@@ -93,13 +97,13 @@ jobs:
9397
cp -R target/splunk-kafka-connect*.jar /tmp
9498
9599
- name: Upload artifact
96-
uses: actions/upload-artifact@v2
100+
uses: actions/upload-artifact@v3
97101
with:
98102
name: splunk-kafka-connector
99103
path: /tmp/splunk-kafka-connect*.jar
100104

101105
- name: Publish Unit Test Results
102-
uses: EnricoMi/publish-unit-test-result-action/composite@v1
106+
uses: EnricoMi/publish-unit-test-result-action@v2
103107
if: always()
104108
with:
105109
check_name: Unit Test Results
@@ -145,11 +149,10 @@ jobs:
145149
CI_KAFKA_HEADER_INDEX: kafka
146150
CI_DATAGEN_IMAGE: rock1017/log-generator:latest
147151
CI_OLD_CONNECTOR_VERSION: v2.0.1
148-
SCHEMA_REGISTRY_URL: ${{ Secrets.SCHEMA_REGISTRY_URL }}
149152

150153
steps:
151154
- name: Checkout
152-
uses: actions/checkout@v2
155+
uses: actions/checkout@v3
153156
with:
154157
ref: ${{github.event.pull_request.head.sha}}
155158
repository: ${{github.event.pull_request.head.repo.full_name}}
@@ -208,16 +211,29 @@ jobs:
208211
echo "Start kafka server"
209212
sudo bin/kafka-server-start.sh config/server.properties &
210213
211-
- uses: actions/setup-python@v2
214+
- uses: actions/setup-python@v4
212215
with:
213-
python-version: 3.7
216+
python-version: 3.11
217+
check-latest: true
214218

215219
- name: Download artifact
216-
uses: actions/download-artifact@v2
220+
uses: actions/download-artifact@v3
217221
with:
218222
name: splunk-kafka-connector
219223
path: /tmp
220224

225+
- name: Up the Schema Registry
226+
run: |
227+
cd /tmp && wget https://packages.confluent.io/archive/7.1/confluent-community-7.1.1.tar.gz
228+
sudo tar xzf confluent-community-7.1.1.tar.gz
229+
cd confluent-7.1.1
230+
bin/schema-registry-start ./etc/schema-registry/schema-registry.properties &
231+
232+
- name: Register the protobuf schema
233+
run: |
234+
sleep 10
235+
curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" --data "{\"schemaType\": \"PROTOBUF\",\"schema\": \"syntax = \\\"proto3\\\";\\npackage com.mycorp.mynamespace;\\n\\nmessage MyRecord {\\n string id = 1;\\n float amount = 2;\\n string customer_id = 3;\\n}\\n\"}" http://localhost:8081/subjects/prototopic-value/versions
236+
221237
- name: Test kafka connect upgrade
222238
run: |
223239
echo "Download kafka connect "$CI_OLD_CONNECTOR_VERSION

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Use the below schema to configure Splunk Connect for Kafka
232232
|-------- |----------------------------|-----------------------|
233233
| `enable.timestamp.extraction` | To enable timestamp extraction ,set the value of this field to `true`. <br/> **NOTE:** <br/> Applicable only if `splunk.hec.raw` is `false` | `false` |
234234
| `timestamp.regex` | Regex for timestamp extraction. <br/> **NOTE:** <br/> Regex must have name captured group `"time"` For eg.: `\\\"time\\\":\\s*\\\"(?<time>.*?)\"` | `""` |
235-
| `timestamp.format` | Time-format for timestamp extraction .<br/>For eg.: <br/>If timestamp is `1555209605000` , set `timestamp.format` to `"epoch"` format .<br/> If timestamp is `Jun 13 2010 23:11:52.454 UTC` , set `timestamp.format` to `"MMM dd yyyy HH:mm:ss.SSS zzz"` | `""` |
235+
| `timestamp.format` | Time-format for timestamp extraction .<br/>For eg.: <br/>If timestamp is `1555209605000` , set `timestamp.format` to `"epoch"` format.<br/> If timestamp is `Jun 13 2010 23:11:52.454 UTC` , set `timestamp.format` to `"MMM dd yyyy HH:mm:ss.SSS zzz".`. <br/> If timestamp is in ISO8601 format `2022-03-29'T'23:11:52.054` , set `timestamp.format` to `"yyyy-MM-dd'\''T'\''HH:mm:ss.SSS"` | `""` |
236236

237237
### Out-of-band Health Checks and In-band Health Checks
238238
| Health Checks | Description |

dependency-reduced-pom.xml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<groupId>com.github.splunk.kafka.connect</groupId>
55
<artifactId>splunk-kafka-connect</artifactId>
66
<name>splunk-kafka-connect</name>
7-
<version>v2.1.2</version>
7+
<version>v2.1.1</version>
88
<build>
99
<plugins>
1010
<plugin>
1111
<artifactId>maven-shade-plugin</artifactId>
12-
<version>3.1.0</version>
12+
<version>3.4.1</version>
1313
<executions>
1414
<execution>
1515
<phase>package</phase>
@@ -29,7 +29,7 @@
2929
</plugin>
3030
<plugin>
3131
<artifactId>maven-compiler-plugin</artifactId>
32-
<version>3.7.0</version>
32+
<version>3.11.0</version>
3333
<configuration>
3434
<source>${java.version}</source>
3535
<target>${java.version}</target>
@@ -40,7 +40,7 @@
4040
</plugin>
4141
<plugin>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>2.17</version>
43+
<version>3.2.1</version>
4444
<executions>
4545
<execution>
4646
<id>validate</id>
@@ -57,7 +57,7 @@
5757
<plugin>
5858
<groupId>org.jacoco</groupId>
5959
<artifactId>jacoco-maven-plugin</artifactId>
60-
<version>0.8.6</version>
60+
<version>0.8.9</version>
6161
<executions>
6262
<execution>
6363
<id>pre-unit-test</id>
@@ -89,7 +89,7 @@
8989
</plugin>
9090
<plugin>
9191
<artifactId>maven-surefire-plugin</artifactId>
92-
<version>2.22.2</version>
92+
<version>3.0.0</version>
9393
<configuration>
9494
<argLine>${surefireArgLine}</argLine>
9595
<skipTests>${skip.unit.tests}</skipTests>
@@ -117,7 +117,7 @@
117117
<dependency>
118118
<groupId>org.junit.jupiter</groupId>
119119
<artifactId>junit-jupiter-api</artifactId>
120-
<version>5.3.2</version>
120+
<version>5.9.2</version>
121121
<scope>test</scope>
122122
<exclusions>
123123
<exclusion>
@@ -145,7 +145,7 @@
145145
<dependency>
146146
<groupId>org.junit.platform</groupId>
147147
<artifactId>junit-platform-launcher</artifactId>
148-
<version>1.3.2</version>
148+
<version>1.9.2</version>
149149
<scope>test</scope>
150150
<exclusions>
151151
<exclusion>
@@ -157,7 +157,7 @@
157157
<dependency>
158158
<groupId>org.junit.jupiter</groupId>
159159
<artifactId>junit-jupiter-engine</artifactId>
160-
<version>5.3.2</version>
160+
<version>5.9.2</version>
161161
<scope>test</scope>
162162
<exclusions>
163163
<exclusion>
@@ -169,7 +169,7 @@
169169
<dependency>
170170
<groupId>org.junit.vintage</groupId>
171171
<artifactId>junit-vintage-engine</artifactId>
172-
<version>5.3.2</version>
172+
<version>5.9.2</version>
173173
<scope>test</scope>
174174
<exclusions>
175175
<exclusion>
@@ -181,33 +181,35 @@
181181
<dependency>
182182
<groupId>org.slf4j</groupId>
183183
<artifactId>slf4j-simple</artifactId>
184-
<version>1.7.26</version>
184+
<version>2.0.7</version>
185185
<scope>test</scope>
186186
</dependency>
187187
<dependency>
188188
<groupId>org.apiguardian</groupId>
189189
<artifactId>apiguardian-api</artifactId>
190-
<version>1.0.0</version>
190+
<version>1.1.2</version>
191191
<scope>test</scope>
192192
</dependency>
193193
</dependencies>
194194
<reporting>
195195
<plugins>
196196
<plugin>
197197
<artifactId>maven-jxr-plugin</artifactId>
198-
<version>2.3</version>
198+
<version>3.3.0</version>
199199
</plugin>
200200
</plugins>
201201
</reporting>
202202
<properties>
203-
<maven.compiler.target>1.8</maven.compiler.target>
204-
<java.version>1.8</java.version>
205-
<maven.compiler.source>1.8</maven.compiler.source>
203+
<jackson.version>2.14.2</jackson.version>
204+
<junit.platform.version>1.9.2</junit.platform.version>
205+
<slf4j.version>2.0.7</slf4j.version>
206206
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
207207
<junit.version>4.13.2</junit.version>
208-
<junit.jupiter.version>5.3.2</junit.jupiter.version>
209-
<junit.vintage.version>5.3.2</junit.vintage.version>
210-
<junit.platform.version>1.3.2</junit.platform.version>
208+
<junit.vintage.version>5.9.2</junit.vintage.version>
209+
<java.version>1.8</java.version>
210+
<maven.compiler.source>1.8</maven.compiler.source>
211+
<junit.jupiter.version>5.9.2</junit.jupiter.version>
212+
<kafka.version>3.4.0</kafka.version>
213+
<maven.compiler.target>1.8</maven.compiler.target>
211214
</properties>
212215
</project>
213-

0 commit comments

Comments
 (0)