Skip to content

Commit 33e7838

Browse files
authored
GEOMESA-3540 Spark - Move runtime JARs to classifier (#3451)
* Split CI jobs into separate files * Reduce unnecessary dash checks in CI
1 parent a347343 commit 33e7838

File tree

41 files changed

+1619
-1517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1619
-1517
lines changed
Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
1-
name: weekly-dash-check
1+
name: assembly
22

33
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: '20 21 * * 0'
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+.x'
8+
tags:
9+
- '**'
10+
pull_request:
711

812
permissions: # added using https://github.com/step-security/secure-repo
913
contents: read
1014

1115
env:
1216
JAVA_VERSION: 17
13-
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode
17+
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode -Dlicense.skip=true
18+
MAVEN_COMPILE_NO_OP_ARGS: clean install -Dmaven.test.skip -Dmaven.assembly.skip=true -Dmaven.source.skip -Pskip-spark-runtimes -T4 -Dmaven.main.skip
19+
MAVEN_ASSEMBLY_ARGS: assembly:single@make-assembly -Dassembly.ignoreMissingDescriptor=true -T2
1420

1521
jobs:
16-
dash:
22+
assembly:
23+
name: build-assembly / ${{ matrix.scala-version }}
1724
runs-on: ubuntu-latest
1825
strategy:
1926
fail-fast: false
2027
matrix:
21-
version: [ "2.12", "2.13" ]
28+
scala-version: [ "2.12", "2.13" ]
2229
steps:
2330
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2431
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
2532
with:
2633
distribution: temurin
2734
java-version: "${{ env.JAVA_VERSION }}"
28-
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
35+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
2936
with:
30-
key: ${{ hashFiles('**/pom.xml') }}-dash-scheduled-${{ matrix.version }}
37+
key: ${{ hashFiles('**/pom.xml') }}-assembly-${{ matrix.scala-version }}
3138
path: ~/.m2/repository/
3239
- name: Set Scala version
33-
run: ./build/scripts/change-scala-version.sh ${{ matrix.version }}
40+
run: ./build/scripts/change-scala-version.sh ${{ matrix.scala-version }}
3441
- name: Build with Maven
35-
run: mvn clean install -Dmaven.assembly.skip=true -Dmaven.source.skip -T4 $MAVEN_CLI_OPTS
36-
- name: License check
37-
run: mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.fail=true -Ddash.projectId=locationtech.geomesa -DexcludeGroupIds=org.locationtech.geomesa $MAVEN_CLI_OPTS
38-
- name: Show license
39-
if: success() || failure()
40-
run: cat target/dash/summary
42+
run: mvn $MAVEN_COMPILE_NO_OP_ARGS $MAVEN_CLI_OPTS
43+
- name: Build assemblies
44+
run: mvn $MAVEN_ASSEMBLY_ARGS $MAVEN_CLI_OPTS
4145
- name: Remove geomesa artifacts
4246
if: success() || failure()
4347
run: rm -rf ~/.m2/repository/org/locationtech/geomesa

.github/workflows/build-and-test.yml

Lines changed: 14 additions & 166 deletions
Large diffs are not rendered by default.

.github/workflows/dash.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: dash
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '20 21 * * 0'
8+
9+
permissions: # added using https://github.com/step-security/secure-repo
10+
contents: read
11+
12+
env:
13+
JAVA_VERSION: 17
14+
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode -Dlicense.skip=true
15+
MAVEN_COMPILE_NO_OP_ARGS: clean install -Dmaven.test.skip -Dmaven.assembly.skip=true -Dmaven.source.skip -Pskip-spark-runtimes -T4 -Dmaven.main.skip
16+
MAVEN_DASH_ARGS: org.eclipse.dash:license-tool-plugin:license-check -Ddash.fail=true -Ddash.projectId=locationtech.geomesa -DexcludeGroupIds=org.locationtech.geomesa
17+
18+
jobs:
19+
license-check:
20+
name: license-check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
25+
with:
26+
distribution: temurin
27+
java-version: "${{ env.JAVA_VERSION }}"
28+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
29+
with:
30+
key: ${{ hashFiles('**/pom.xml') }}-dash
31+
path: ~/.m2/repository/
32+
- name: Check for dependency changes
33+
id: dependency_changes
34+
run: |
35+
changed="false"
36+
if [[ "${{ github.event_name }}" == 'pull_request' ]]; then
37+
# get the changed files
38+
git fetch --depth=1 origin ${{ github.base_ref }}
39+
IFS=$'\n' read -r -d '' -a changedFiles < <( git diff --name-only origin/${{ github.base_ref }} && printf '\0' )
40+
echo "Changed files:"
41+
for file in "${changedFiles[@]}"; do
42+
echo " $file"
43+
if [[ -z "$changed" ]] && [[ $file =~ .*pom.xml ]]; then
44+
changed="pom"
45+
elif [[ "$file" == "build/dependencies.txt" ]]; then
46+
changed="true"
47+
fi
48+
done
49+
if [[ "$changed" == "pom" ]]; then
50+
mvn $MAVEN_COMPILE_NO_OP_ARGS $MAVEN_CLI_OPTS
51+
./build/scripts/calculate-cqs.sh
52+
git diff --exit-code --quiet || {
53+
echo 'Detected dependency changes - please run `./build/scripts/calculate-cqs.sh` and commit the results'
54+
exit 1
55+
}
56+
changed="false"
57+
fi
58+
else
59+
# weekly or dispatch requests
60+
changed="true"
61+
fi
62+
echo "changed=$changed" >> "$GITHUB_OUTPUT"
63+
- name: License check
64+
if: steps.dependency_changes.outputs.changed == 'true'
65+
run: |
66+
mvn $MAVEN_COMPILE_NO_OP_ARGS $MAVEN_CLI_OPTS
67+
mvn $MAVEN_DASH_ARGS $MAVEN_CLI_OPTS
68+
- name: Show license
69+
if: success() || failure()
70+
run: |
71+
if [[ -f target/dash/summary ]]; then
72+
cat target/dash/summary
73+
else
74+
echo "No dependency changes detected - skipping license check"
75+
fi
76+
- name: Remove geomesa artifacts
77+
if: success() || failure()
78+
run: |
79+
if [[ -d ~/.m2/repository/org/locationtech/geomesa ]]; then
80+
rm -rf ~/.m2/repository/org/locationtech/geomesa
81+
fi

.github/workflows/javadocs.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: javadocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+.x'
8+
tags:
9+
- '**'
10+
pull_request:
11+
12+
permissions: # added using https://github.com/step-security/secure-repo
13+
contents: read
14+
15+
env:
16+
JAVA_VERSION: 17
17+
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode -Dlicense.skip=true
18+
MAVEN_COMPILE_ARGS: clean install -Dmaven.test.skip -Dmaven.assembly.skip=true -Dmaven.source.skip -Pskip-spark-runtimes -T4
19+
MAVEN_SCALADOC_ARGS: generate-sources scala:doc-jar
20+
MAVEN_JAVADOC_ARGS: generate-sources javadoc:jar -Psite
21+
22+
jobs:
23+
javadocs:
24+
name: build-javadocs / ${{ matrix.projects.name }} / ${{ matrix.scala-version }}
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
scala-version: [ "2.12", "2.13" ]
30+
projects:
31+
- name: accumulo
32+
list: geomesa-accumulo/geomesa-accumulo-datastore,geomesa-accumulo/geomesa-accumulo-dist,geomesa-accumulo/geomesa-accumulo-distributed-runtime,geomesa-accumulo/geomesa-accumulo-gs-plugin,geomesa-accumulo/geomesa-accumulo-indices,geomesa-accumulo/geomesa-accumulo-iterators,geomesa-accumulo/geomesa-accumulo-jobs,geomesa-accumulo/geomesa-accumulo-spark,geomesa-accumulo/geomesa-accumulo-tools
33+
- name: arrow
34+
list: geomesa-arrow/geomesa-arrow-datastore,geomesa-arrow/geomesa-arrow-dist,geomesa-arrow/geomesa-arrow-gt,geomesa-arrow/geomesa-arrow-jts,geomesa-arrow/geomesa-arrow-tools
35+
- name: cassandra
36+
list: geomesa-cassandra/geomesa-cassandra-datastore,geomesa-cassandra/geomesa-cassandra-dist,geomesa-cassandra/geomesa-cassandra-gs-plugin,geomesa-cassandra/geomesa-cassandra-tools
37+
- name: convert
38+
list: geomesa-convert/geomesa-convert-all,geomesa-convert/geomesa-convert-avro,geomesa-convert/geomesa-convert-avro-schema-registry,geomesa-convert/geomesa-convert-common,geomesa-convert/geomesa-convert-fixedwidth,geomesa-convert/geomesa-convert-jdbc,geomesa-convert/geomesa-convert-json,geomesa-convert/geomesa-convert-parquet,geomesa-convert/geomesa-convert-redis-cache,geomesa-convert/geomesa-convert-shp,geomesa-convert/geomesa-convert-simplefeature,geomesa-convert/geomesa-convert-text,geomesa-convert/geomesa-convert-xml
39+
- name: features
40+
list: geomesa-features/geomesa-feature-all,geomesa-features/geomesa-feature-avro,geomesa-features/geomesa-feature-common,geomesa-features/geomesa-feature-exporters,geomesa-features/geomesa-feature-kryo
41+
- name: fs
42+
list: geomesa-fs/geomesa-fs-datastore,geomesa-fs/geomesa-fs-dist,geomesa-fs/geomesa-fs-gs-plugin,geomesa-fs/geomesa-fs-spark,geomesa-fs/geomesa-fs-tools
43+
- name: fs-storage
44+
list: geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-api,geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-common,geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-convert,geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc,geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc-io,geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-parquet,geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-parquet-io
45+
- name: gt
46+
list: geomesa-gt/geomesa-gt-dist,geomesa-gt/geomesa-gt-gs-plugin,geomesa-gt/geomesa-gt-partitioning,geomesa-gt/geomesa-gt-spark,geomesa-gt/geomesa-gt-tools
47+
- name: hbase
48+
list: geomesa-hbase/geomesa-hbase-datastore,geomesa-hbase/geomesa-hbase-dist,geomesa-hbase/geomesa-hbase-distributed-runtime-hbase2,geomesa-hbase/geomesa-hbase-gs-plugin,geomesa-hbase/geomesa-hbase-jobs,geomesa-hbase/geomesa-hbase-rpc,geomesa-hbase/geomesa-hbase-server,geomesa-hbase/geomesa-hbase-server-hbase2,geomesa-hbase/geomesa-hbase-spark,geomesa-hbase/geomesa-hbase-tools
49+
- name: kafka
50+
list: geomesa-kafka/geomesa-kafka-confluent,geomesa-kafka/geomesa-kafka-datastore,geomesa-kafka/geomesa-kafka-dist,geomesa-kafka/geomesa-kafka-gs-plugin,geomesa-kafka/geomesa-kafka-tools,geomesa-kafka/geomesa-kafka-utils
51+
- name: lambda
52+
list: geomesa-lambda/geomesa-lambda-datastore,geomesa-lambda/geomesa-lambda-dist,geomesa-lambda/geomesa-lambda-gs-plugin,geomesa-lambda/geomesa-lambda-tools
53+
- name: misc-1
54+
list: geomesa-memory/geomesa-cqengine,geomesa-memory/geomesa-cqengine-datastore,geomesa-metrics/geomesa-metrics-micrometer,geomesa-process/geomesa-process-vector
55+
- name: misc-2
56+
list: geomesa-filter,geomesa-index-api,geomesa-jobs,geomesa-security,geomesa-tools,geomesa-z3
57+
- name: redis
58+
list: geomesa-redis/geomesa-redis-datastore,geomesa-redis/geomesa-redis-dist,geomesa-redis/geomesa-redis-gs-plugin,geomesa-redis/geomesa-redis-tools
59+
- name: spark
60+
list: geomesa-spark/geomesa_pyspark,geomesa-spark/geomesa-spark-converter,geomesa-spark/geomesa-spark-core,geomesa-spark/geomesa-spark-jts,geomesa-spark/geomesa-spark-jupyter-leaflet,geomesa-spark/geomesa-spark-sql,geomesa-spark/geomesa-spark-test,geomesa-spark/geomesa-spark-test-with-sedona
61+
- name: utils
62+
list: geomesa-utils-parent/geomesa-bom,geomesa-utils-parent/geomesa-hadoop-utils,geomesa-utils-parent/geomesa-utils
63+
steps:
64+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
65+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
66+
with:
67+
distribution: temurin
68+
java-version: "${{ env.JAVA_VERSION }}"
69+
- name: Generate cache key
70+
run: echo "MOD_SELECTOR=$(echo '${{ matrix.projects.list }}' | sed 's/[^a-zA-Z0-9_.-]/-/g' | head -c 256)" >> "$GITHUB_ENV"
71+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
72+
with:
73+
key: ${{ hashFiles('**/pom.xml') }}-javadocs-${{ matrix.scala-version }}-${{ env.MOD_SELECTOR }}
74+
path: ~/.m2/repository/
75+
- name: Set Scala version
76+
run: ./build/scripts/change-scala-version.sh ${{ matrix.scala-version }}
77+
- name: Build with Maven
78+
run: mvn $MAVEN_COMPILE_ARGS $MAVEN_CLI_OPTS -am -pl ${{ matrix.projects.list }},geomesa-arrow/geomesa-arrow-jts
79+
- name: Build scaladocs
80+
run: mvn $MAVEN_SCALADOC_ARGS $MAVEN_CLI_OPTS -pl ${{ matrix.projects.list }}
81+
- name: Build javadocs
82+
run: mvn $MAVEN_JAVADOC_ARGS $MAVEN_CLI_OPTS -pl geomesa-arrow/geomesa-arrow-jts
83+
- name: Remove geomesa artifacts
84+
if: success() || failure()
85+
run: rm -rf ~/.m2/repository/org/locationtech/geomesa
86+
validate-ci:
87+
# validates that we haven't missed any projects in our build matrix
88+
name: validate-ci
89+
runs-on: ubuntu-latest
90+
if: github.event_name == 'pull_request'
91+
steps:
92+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
93+
- name: Validate project list
94+
run: |
95+
while IFS= read -r -d '' pom; do
96+
grep -q 'packaging>pom' "$pom" || {
97+
module="${pom%/pom.xml}"
98+
module="${module#./}"
99+
echo "Checking $module"
100+
yq -e '.jobs.javadocs.strategy.matrix.projects[].list | select(test("(^|[, ])'"${module}"'($|[, ])"))' .github/workflows/javadocs.yml >/dev/null 2>&1 || exit 1
101+
}
102+
done < <(find . -name pom.xml -print0)
103+
echo "done"

README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,19 @@ geospatial analytics.
4949

5050
### Verifying Downloads
5151

52-
Downloads hosted on GitHub include SHA-256 hashes and gpg signatures (.asc files). To verify a download using gpg,
53-
import the appropriate key:
52+
Downloads hosted on GitHub include SHA-256 hashes and `gpg` signatures (`.asc` files). To verify a download using `gpg`,
53+
import the appropriate key then verify:
5454

5555
```bash
56-
gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys CD24F317
56+
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys CD24F317
57+
gpg --verify geomesa-accumulo_2.12-5.4.0-bin.tar.gz.asc geomesa-accumulo_2.12-5.4.0-bin.tar.gz
5758
```
5859

59-
Then verify the file:
60-
61-
```bash
62-
gpg2 --verify geomesa-accumulo_2.12-5.4.0-bin.tar.gz.asc geomesa-accumulo_2.12-5.4.0-bin.tar.gz
60+
The keys used for signing are:
61+
```
62+
CD24F317 Emilio Lahr-Vivaz <elahrvivaz(-at-)ccri.com>
63+
1E679A56 James Hughes <jnh5y(-at-)ccri.com>
6364
```
64-
65-
The keys currently used for signing are:
66-
67-
| Key ID | Name |
68-
|------------|----------------------------------------------------|
69-
| `CD24F317` | Emilio Lahr-Vivaz &lt;elahrvivaz(-at-)ccri.com&gt; |
70-
| `1E679A56` | James Hughes &lt;jnh5y(-at-)ccri.com&gt; |
7165

7266
## Maven Integration
7367

@@ -144,11 +138,11 @@ DataStore implementations:
144138
```xml
145139
<dependency>
146140
<groupId>org.locationtech.geomesa</groupId>
147-
<artifactId>geomesa-gt-spark-runtime_2.12</artifactId>
141+
<artifactId>geomesa-gt-spark_2.12</artifactId>
142+
<classifier>runtime</classifier>
148143
<version>5.4.0</version>
149144
<exclusions>
150145
<exclusion>
151-
<!-- if groupId wildcards are not supported, the two main ones are jline:* and org.geotools:* -->
152146
<groupId>*</groupId>
153147
<artifactId>*</artifactId>
154148
</exclusion>

0 commit comments

Comments
 (0)